Java 类org.springframework.boot.autoconfigure.jdbc.EmbeddedDatabaseConnection 实例源码
项目:spring-boot-multidatasource
文件:DataSourceAutoConfiguration.java
@Override
public ConditionOutcome getMatchOutcome(ConditionContext context,
AnnotatedTypeMetadata metadata) {
ConditionMessage.Builder message = ConditionMessage
.forCondition("EmbeddedDataSource");
if (anyMatches(context, metadata, this.pooledCondition)) {
return ConditionOutcome
.noMatch(message.foundExactly("supported pooled data source"));
}
EmbeddedDatabaseType type = EmbeddedDatabaseConnection
.get(context.getClassLoader()).getType();
if (type == null) {
return ConditionOutcome
.noMatch(message.didNotFind("embedded database").atAll());
}
return ConditionOutcome.match(message.found("embedded database").items(type));
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot
文件:TestDatabaseAutoConfiguration.java
public EmbeddedDatabase getEmbeddedDatabase() {
EmbeddedDatabaseConnection connection = this.environment.getProperty(
"spring.test.database.connection", EmbeddedDatabaseConnection.class,
EmbeddedDatabaseConnection.NONE);
if (EmbeddedDatabaseConnection.NONE.equals(connection)) {
connection = EmbeddedDatabaseConnection.get(getClass().getClassLoader());
}
return new EmbeddedDatabaseBuilder().setType(connection.getType()).build();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot
文件:DataSourceHealthIndicatorTests.java
@Before
public void init() {
EmbeddedDatabaseConnection db = EmbeddedDatabaseConnection.HSQL;
this.dataSource = new SingleConnectionDataSource(db.getUrl() + ";shutdown=true",
"sa", "", false);
this.dataSource.setDriverClassName(db.getDriverClassName());
}
项目:spring-boot-concourse
文件:TestDatabaseAutoConfiguration.java
public EmbeddedDatabase getEmbeddedDatabase() {
EmbeddedDatabaseConnection connection = this.environment.getProperty(
"spring.test.database.connection", EmbeddedDatabaseConnection.class,
EmbeddedDatabaseConnection.NONE);
if (EmbeddedDatabaseConnection.NONE.equals(connection)) {
connection = EmbeddedDatabaseConnection.get(getClass().getClassLoader());
}
return new EmbeddedDatabaseBuilder().setType(connection.getType()).build();
}
项目:spring-boot-concourse
文件:DataSourceHealthIndicatorTests.java
@Before
public void init() {
EmbeddedDatabaseConnection db = EmbeddedDatabaseConnection.HSQL;
this.dataSource = new SingleConnectionDataSource(db.getUrl() + ";shutdown=true",
"sa", "", false);
this.dataSource.setDriverClassName(db.getDriverClassName());
}
项目:contestparser
文件:DataSourceHealthIndicatorTests.java
@Before
public void init() {
EmbeddedDatabaseConnection db = EmbeddedDatabaseConnection.HSQL;
this.dataSource = new SingleConnectionDataSource(db.getUrl() + ";shutdown=true",
"sa", "", false);
this.dataSource.setDriverClassName(db.getDriverClassName());
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot
文件:JpaProperties.java
private String getDefaultDdlAuto(DataSource dataSource) {
if (EmbeddedDatabaseConnection.isEmbedded(dataSource)) {
return "create-drop";
}
return "none";
}
项目:spring-boot-concourse
文件:JpaProperties.java
private String getDefaultDdlAuto(DataSource dataSource) {
if (EmbeddedDatabaseConnection.isEmbedded(dataSource)) {
return "create-drop";
}
return "none";
}
项目:contestparser
文件:JpaProperties.java
private String getDefaultDdlAuto(DataSource dataSource) {
if (EmbeddedDatabaseConnection.isEmbedded(dataSource)) {
return "create-drop";
}
return "none";
}