I have this multi modules project:
Parent Pom
|
|----Main module (@SpringBootApplcation and application.properties)
|
|----Module I
|
|----Module II
|
|----Module III
The main module depends on other modules and contains messages.properties and messages_fr.properties under resources/messages/ and also the application.properties where I defined MessageResource bean spring.messages.basename=messages/messages.
Now I would like to put the messages.properties files in each module. Eg for Module I, under src/main/resources/messages/messages.properties same thing for Module II.
My question is, how can I add the module's messages in the MessageResource bean defined in application.properties?
I tried several declarations like these:
spring.messages.basename=messages/messages,classpath:/com/company/moduleI/resources/messages/messages or spring.messages.basename=messages/messages,classpath:moduleI/resources/messages/messages but none works.
Is there a way to achieve this?