From a6141a6e535d4372e3ee4144fe4b8a17a2892da5 Mon Sep 17 00:00:00 2001 From: monkeyk7 Date: Mon, 4 Dec 2017 23:42:50 +0800 Subject: [PATCH] Reset by spring-boot 1.5.9 --- .../monkeyk/sos/config/ContextConfigurer.java | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/src/main/java/com/monkeyk/sos/config/ContextConfigurer.java b/src/main/java/com/monkeyk/sos/config/ContextConfigurer.java index 910f803..1aaad46 100644 --- a/src/main/java/com/monkeyk/sos/config/ContextConfigurer.java +++ b/src/main/java/com/monkeyk/sos/config/ContextConfigurer.java @@ -1,14 +1,10 @@ package com.monkeyk.sos.config; -import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; -import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.datasource.DataSourceTransactionManager; -import org.springframework.jdbc.datasource.DriverManagerDataSource; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.EnableTransactionManagement; @@ -28,41 +24,8 @@ import javax.sql.DataSource; public class ContextConfigurer { - @Bean - public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { - return new PropertySourcesPlaceholderConfigurer(); - } - @Value("${jdbc.driverClassName}") - private String driverClassName; - - @Value("${jdbc.url}") - private String jdbcUrl; - - @Value("${jdbc.username}") - private String jdbcUsername; - - @Value("${jdbc.password}") - private String jdbcPassword; - - @Bean(name = "dataSource") - public DataSource dataSource() { - DriverManagerDataSource dataSource = new DriverManagerDataSource(); - dataSource.setDriverClassName(driverClassName); - dataSource.setUrl(jdbcUrl); - dataSource.setUsername(jdbcUsername); - dataSource.setPassword(jdbcPassword); - -// dataSource.setValidationQuery("SELECT 1"); -// dataSource.setTestOnReturn(false); -// dataSource.setTestOnBorrow(true); -// -// dataSource.setMaxActive(20); -// dataSource.setMaxIdle(5); - - return dataSource; - } @Bean(name = "transactionManager")