- 履歴一覧
- 現在との差分 を表示
- ソース を表示
- 履歴 を表示
- 障害メモ/openしてないからとkotlinでSpring Bootが起動しない へ行く。
- 1 (2017-12-13 (水) 16:27:07)
- 追加された行はこの色です。
- 削除された行はこの色です。
#author("2017-12-13T07:27:07+00:00","default:haruki","haruki") * キーワード [#h00bc4a3] - STS - Kotlin - Spring Boot * 現象 [#qd1465fd] STSでKotlinを使ってSpring Bootを立ち上げようとするができない。 class 'Application' may not be final. Remove the final modifier to continue. * 原因 [#xd0c2759] classをopenしてないから。final classじゃだめよということ。 ただ、これはkotlin-allopenがkotlin-springによって解決してくれるはず。だが、STSの「Spring Boot App」としての実行ではうまくいかない。 * 対策 [#p9c4e104] IntelliJでなら大丈夫とのことだが試してない。また、gradleタスクとして実行するのでも大丈夫。BuildshipのGradle Tasksから実行するか、コンソールで次のようにして実行する。 $ gradle bootRun * 備考 [#be30750e] IntelliJに乗り換えかなあ。。Vimのキーバインド使える?? * 参考 [#ca9c149e] - [[Spring Boot + Gradle + Kotlin の開発環境を構築してみた(結構ハマった) - IT探検記>http://itexplorer.hateblo.jp/entry/20170724-create-spring-boot-gradle-kotlin-env]] - [[Kotlin+Spring Bootにて「@Configuration class may not be final」的なエラーが出たとき - Qiita>https://qiita.com/n_morioka/items/7b4f8f96c85223cdb176]]