Class DruidDataSourceAutoConfigure
java.lang.Object
com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
@Configuration
@ConditionalOnProperty(name="spring.datasource.type",
havingValue="com.alibaba.druid.pool.DruidDataSource",
matchIfMissing=true)
@ConditionalOnClass(com.alibaba.druid.pool.DruidDataSource.class)
@AutoConfigureBefore(org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration.class)
@EnableConfigurationProperties({DruidStatProperties.class,org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.class})
@Import({DruidSpringAopConfiguration.class,DruidStatViewServletConfiguration.class,DruidWebStatFilterConfiguration.class,DruidFilterConfiguration.class})
public class DruidDataSourceAutoConfigure
extends Object
- Author:
- lihengming [[email protected]]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionNot setting initMethod of annotation@Bean
is to avoid failure when inspecting the bean definition at the build time.
-
Constructor Details
-
DruidDataSourceAutoConfigure
public DruidDataSourceAutoConfigure()
-
-
Method Details
-
dataSource
Not setting initMethod of annotation@Bean
is to avoid failure when inspecting the bean definition at the build time. TheDruidDataSource.init()
will be called at the end ofDruidDataSourceWrapper.afterPropertiesSet()
.- Returns:
- druid data source wrapper
-