Can you please tell me how to use Spring Javaconfig to directly load/autowire a properties file to a java.util.Properties field?
Thanks!
Later edit - st
You can try this
@Configuration public class PropertyConfig { @Bean("mailProperties") @ConfigurationProperties(prefix = "mail") public Properties getProperties() { return new Properties(); } }
Make sure to define properties in application.properties