1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

fix checkstyle

Signed-off-by: slievrly <slievrly@163.com>
This commit is contained in:
slievrly
2020-01-01 14:29:54 +08:00
parent fbd72a6000
commit f36c94d3ed
6 changed files with 44 additions and 44 deletions

View File

@@ -32,23 +32,24 @@ import org.springframework.jdbc.core.JdbcTemplate;
@Configuration
public class DatabaseConfiguration {
@Bean
@Primary
@ConfigurationProperties("spring.datasource")
public DataSource storageDataSource() {
return new DruidDataSource();
}
@Bean
@Primary
@ConfigurationProperties("spring.datasource")
public DataSource storageDataSource() {
return new DruidDataSource();
}
@Bean
public JdbcTemplate jdbcTemplate(DataSource dataSource) {
@Bean
public JdbcTemplate jdbcTemplate(DataSource dataSource) {
JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
jdbcTemplate.update("delete from storage_tbl where commodity_code = 'C00321'");
jdbcTemplate.update("insert into storage_tbl(commodity_code, count) values ('C00321', 100)");
jdbcTemplate.update("delete from storage_tbl where commodity_code = 'C00321'");
jdbcTemplate.update(
"insert into storage_tbl(commodity_code, count) values ('C00321', 100)");
return jdbcTemplate;
return jdbcTemplate;
}
}
}