GradleでSpark Frameworkを使ったAppを実行するとWarnが出てキモいので直した話
フツーにdependenciesにcompile "com.sparkjava:spark-core:2.5.2"
を書くと、こんなエラーが出る。
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
なんかないって言われてる。ググるとあるあるらしいことが判明。 ログ関係のライブラリだそうで。
とりあえずGradleの依存関係をぱっぱと調べて適当に対応することにする。 やることはdependenciesにもう一つ行を足すだけ。
compile "org.slf4j:slf4j-simple:1.7.13"
いじょ。これでちゃんとログも出るようになります。