作記録

記憶代わり

Spring Boot Application の application.properties にとりあえず記述しておくと良さそうなもの

1. 結論

# 2-1
logging.pattern.dateformat=yyyy/MM/dd HH:mm:ss.SSS,Asia/Tokyo

# 2-2
spring.thymeleaf.cache=false

# 2-3
spring.flyway.clean-disabled=false

2. 説明

2-1. logging.pattern.dateformat=yyyy/MM/dd HH:mm:ss.SSS,Asia/Tokyo

Spring Boot Application の logback が記録する時刻を日本標準時刻にする。

以下、参考 - https://jtnsaku.hatenablog.com/entry/2022/08/27/215629 - https://spring.pleiades.io/spring-boot/docs/current/reference/html/application-properties.html#application-properties.core.logging.pattern.dateformat

2-2. spring.thymeleaf.cache=false

ローカル環境でcacheが有効だと開発しづらいので Thymeleaf の cache を無効にする。 本番環境では有効にする。

以下、参考 - https://spring.pleiades.io/spring-boot/docs/current/reference/html/application-properties.html#application-properties.templating.spring.thymeleaf.cache

2-3. spring.flyway.clean-disabled=false

Flywayを使用している場合に記述する。
デフォルトでfalseだが、本番環境で有効にするよう明示するために記述する。

以下、参考 - https://spring.pleiades.io/spring-boot/docs/current/reference/html/application-properties.html#application-properties.data-migration.spring.flyway.clean-disabled