If I have 2 .properties files setup in my Spring XML as so:
<util:properties id="serverProperties" location="file:./applications/MyApplication/server.properties"/>
<util:properties id="someConfig" location="file:./applications/MyApplication/config.properties"/>
How can I inject via annotations these properties files into a bean with java.util.Properties?
How can I grab specific properties via Spring annotations?
Cheers!
or
Typically, @Autowired is used for by-type autowiring in Spring, and @Resource is used for by-name. @Autowired+@Qualifier can double as by-name autowiring, but it’s really meant for by-type autowiring with the ability to fine-tune the type.