mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 21:15:50 +00:00
Fix #156 jdbcTemplate bean naming
This commit is contained in:
parent
b0c1d7a0ec
commit
ed540a3d07
1 changed files with 2 additions and 5 deletions
|
@ -49,22 +49,19 @@ public class JdbcConfig {
|
||||||
@Autowired
|
@Autowired
|
||||||
private DataSource dataSource;
|
private DataSource dataSource;
|
||||||
|
|
||||||
|
@Bean(name="transactionManager")
|
||||||
@Bean
|
|
||||||
public DataSourceTransactionManager dataSourceTransactionManager() {
|
public DataSourceTransactionManager dataSourceTransactionManager() {
|
||||||
return new DataSourceTransactionManager(dataSource);
|
return new DataSourceTransactionManager(dataSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean(name="transactionManager")
|
@Bean
|
||||||
public JdbcTemplate jdbcTemplate() {
|
public JdbcTemplate jdbcTemplate() {
|
||||||
return new JdbcTemplate(dataSource);
|
return new JdbcTemplate(dataSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
|
||||||
public NamedParameterJdbcTemplate namedParameterJdbcTemplate() {
|
public NamedParameterJdbcTemplate namedParameterJdbcTemplate() {
|
||||||
return new NamedParameterJdbcTemplate(dataSource);
|
return new NamedParameterJdbcTemplate(dataSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue