LoginSignup
3
5

More than 5 years have passed since last update.

Spring boot の i18n 対応で message.properties をデフォルトとするには spring.messages.fallback-to-system-locale: false が必要

Last updated at Posted at 2018-01-29

Spring Boot のアプリで多言語対応をしていて、 message.propertiesの値が使われずjpの値が使われなくて困ったのでメモ。
デフォルトの設定だと、言語ファイルが存在しない場合サーバのシステム言語がデフォルトとして使われる。

この挙動はspring.messages.fallback-to-system-localeがデフォルトでtrueになっているため。
これをfalseにすると、言語ファイルが存在しないlocaleの場合はmessage.propertiesの値が使われる。

3
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
5