Skip to content

Commit

Permalink
Add scope annotation to dataSource and jdbcTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
jacodg committed Apr 17, 2024
1 parent a68ad85 commit 4e88c3e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/nl/nn/testtool/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,13 @@ String xsltResource() {
}

@Bean
@Scope("singleton")
DataSource dataSource() {
return new SimpleDriverDataSource();
}

@Bean
@Scope("prototype")
JdbcTemplate jdbcTemplate(DataSource dataSource) {
JdbcTemplate jdbcTemplate = new JdbcTemplate();
jdbcTemplate.setDataSource(dataSource);
Expand Down

0 comments on commit 4e88c3e

Please sign in to comment.