Hi Chris, I give a tried to this:
Code:
@Configuration
@PropertySource("classpath:jdbc.properties")
public class AppConfig {
@Value("${jdbc.driverClassName}")
private String driverClassName;
@Bean(destroyMethod = "close")
public DataSource dataSource() {
BasicDataSource dataSource = new BasicDataSource();
dataSource.setDriverClassName(driverClassName);
.......
Results is it cannot resolve the properties jdbc.driverClassName. I think it could work by Autowiring Environment instance and using the env.getProperty("jdbc.properties"), but I would like to understand why it doesn't work the way I first tried based on what you wrote in the preceding post?
I am using 3.1.0.RC1
Thanks!