Reputation: 24532
Is it possible to place messages.properties and all other locale-specific messages_xx.properties files in a sub-folder of the resources folder in a Spring Boot application? For example to move them all in langs folder:
āāā š src
āāāā š main
āāāā š java
āāāā š resources
āāāā š langs
ā āāāā messages.properties
ā āāāā messages_fa.properties
āāāā ...
Upvotes: 0
Views: 989
Reputation: 24532
Yes, it is possible. You just need to add this property in the application.properties
or application.yml
file:
spring.messages.basename=langs.messages
Here langs is the name of the folder and messages is the base name of files.
Upvotes: 2