IntelliJ IDEA BootRun時のコンソール出力の文字化け

  • windows 環境
  • 4:Run windowの出力

build.gradleにこういう記述を追加して状況は改善

def defaultEncoding = 'UTF-8'
tasks.withType(org.springframework.boot.gradle.tasks.run.BootRun) { defaultCharacterEncoding = defaultEncoding }

部分的にまだ文字化け

Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: SQLス�?ートメントに�?法エラーがありま�? " 

vmoptionsにfile.encodingを指定すれば解消するかもしれない

IntelliJ IDEA 2020.1 で、vmoptions ファイルに指定すると起動しない問題があり、設定できていない。

IDE起動時に参照されるJava VM Option file(.vmopitons設定ファイル)に「-Dfile.encoding=UTF-8」が指定されている