No need for get set method
@Value("#{propertiesReader}") public Properties props; @Value("#{propertiesReader['username']}") public String username;
Since you want to inject the entire properties, you should write:
@Value("#{propertiesReader}") public void setProps(Properties props) { this.props = props; }
instead of
@Value("#{propertiesReader[username]}")
No need for get set method
Since you want to inject the entire properties, you should write:
instead of