I have properties files and I need to set them both to be loaded, but I have no idea how to do this with multiple properties
resources `-- messages.properties `-- handle.properties
Advertisement
Answer
Use @PropertySources
. Annotate either a config class that holds the attributes of the files, or your Main
class.
e.g.:
@PropertySources( { @PropertySource("classpath:messages.properties"), @PropertySource("classpath:handle.properties") } )