mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Fix warnings
This commit is contained in:
parent
5ed00b3501
commit
ec73144240
@ -613,7 +613,6 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.kafka</groupId>
|
||||
<artifactId>spring-kafka-test</artifactId>
|
||||
<version>${spring-kafka.version}</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
|
@ -103,6 +103,7 @@ public class DataSourceAutoConfiguration {
|
||||
@Import({ DataSourceConfiguration.Tomcat.class, DataSourceConfiguration.Hikari.class,
|
||||
DataSourceConfiguration.Dbcp.class, DataSourceConfiguration.Dbcp2.class,
|
||||
DataSourceConfiguration.Generic.class })
|
||||
@SuppressWarnings("deprecation")
|
||||
protected static class PooledDataSourceConfiguration {
|
||||
|
||||
}
|
||||
|
@ -42,6 +42,9 @@ abstract class DataSourceConfiguration {
|
||||
return (T) properties.initializeDataSourceBuilder().type(type).build();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tomcat Pool DataSource configuration.
|
||||
*/
|
||||
@ConditionalOnClass(org.apache.tomcat.jdbc.pool.DataSource.class)
|
||||
@ConditionalOnProperty(name = "spring.datasource.type", havingValue = "org.apache.tomcat.jdbc.pool.DataSource", matchIfMissing = true)
|
||||
static class Tomcat extends DataSourceConfiguration {
|
||||
@ -64,6 +67,9 @@ abstract class DataSourceConfiguration {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Hikari DataSource configuration.
|
||||
*/
|
||||
@ConditionalOnClass(HikariDataSource.class)
|
||||
@ConditionalOnProperty(name = "spring.datasource.type", havingValue = "com.zaxxer.hikari.HikariDataSource", matchIfMissing = true)
|
||||
static class Hikari extends DataSourceConfiguration {
|
||||
@ -75,6 +81,10 @@ abstract class DataSourceConfiguration {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* DBCP DataSource configuration.
|
||||
* @deprecated as of Spring Boot 1.5 in favor of DBCP2
|
||||
*/
|
||||
@ConditionalOnClass(org.apache.commons.dbcp.BasicDataSource.class)
|
||||
@ConditionalOnProperty(name = "spring.datasource.type", havingValue = "org.apache.commons.dbcp.BasicDataSource", matchIfMissing = true)
|
||||
@Deprecated
|
||||
@ -97,6 +107,9 @@ abstract class DataSourceConfiguration {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* DBCP DataSource configuration.
|
||||
*/
|
||||
@ConditionalOnClass(org.apache.commons.dbcp2.BasicDataSource.class)
|
||||
@ConditionalOnProperty(name = "spring.datasource.type", havingValue = "org.apache.commons.dbcp2.BasicDataSource", matchIfMissing = true)
|
||||
static class Dbcp2 extends DataSourceConfiguration {
|
||||
@ -110,6 +123,9 @@ abstract class DataSourceConfiguration {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic DataSource configuration.
|
||||
*/
|
||||
@ConditionalOnMissingBean(DataSource.class)
|
||||
@ConditionalOnProperty(name = "spring.datasource.type")
|
||||
static class Generic {
|
||||
|
Loading…
Reference in New Issue
Block a user