Commit 2b4dee9a authored by zero-mac's avatar zero-mac

去掉DynamicDataSourceRegister的@Configuration注解,避免自动生效

parent 2435dae8
...@@ -5,6 +5,7 @@ import org.springframework.beans.MutablePropertyValues; ...@@ -5,6 +5,7 @@ import org.springframework.beans.MutablePropertyValues;
import org.springframework.beans.PropertyValues; import org.springframework.beans.PropertyValues;
import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.GenericBeanDefinition; import org.springframework.beans.factory.support.GenericBeanDefinition;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder; import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
import org.springframework.boot.bind.RelaxedDataBinder; import org.springframework.boot.bind.RelaxedDataBinder;
import org.springframework.boot.bind.RelaxedPropertyResolver; import org.springframework.boot.bind.RelaxedPropertyResolver;
...@@ -26,12 +27,11 @@ import java.util.Map; ...@@ -26,12 +27,11 @@ import java.util.Map;
* @author ag * @author ag
*/ */
@Slf4j @Slf4j
@Configuration
public class DynamicDataSourceRegister implements ImportBeanDefinitionRegistrar, EnvironmentAware { public class DynamicDataSourceRegister implements ImportBeanDefinitionRegistrar, EnvironmentAware {
private ConversionService conversionService = new DefaultConversionService(); private ConversionService conversionService = new DefaultConversionService();
/** /**
* 默认的数据库连接池类型 * 默认的数据lter库连接池类型
*/ */
private static final String DATASOURCE_TYPE_DEFAULT = "com.zaxxer.hikari.HikariDataSource"; private static final String DATASOURCE_TYPE_DEFAULT = "com.zaxxer.hikari.HikariDataSource";
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment