I know that by default a Spring application will look for message files containing internationalization keys and values in the src/main/resources
folder. What is the best way to specify an alternate location for these message files (i.e. other than src/main/resources
)?
Asked
Active
Viewed 18 times
1

Sandeep
- 1,245
- 1
- 13
- 33
-
Does this answer your question? [Spring Boot and multiple external configuration files](https://stackoverflow.com/questions/25855795/spring-boot-and-multiple-external-configuration-files) – lakshman Feb 15 '20 at 18:00
1 Answers
0
The more simple way to achieve this is to use in your properties file: spring.messages.basename
,
There is another more complicated way is to define your own Bean of type: MessageSource
.
Of course, the first way should be the one to use.

EFOE
- 609
- 1
- 10
- 20