Polish
This commit is contained in:
@@ -100,6 +100,7 @@ public class BatchAutoConfiguration {
|
||||
return factory;
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnBean(DataSource.class)
|
||||
@ConditionalOnClass(DatabasePopulator.class)
|
||||
static class DataSourceInitializerConfiguration {
|
||||
|
||||
@@ -42,7 +42,6 @@ import org.springframework.boot.jdbc.DataSourceBuilder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.core.io.ResourceLoader;
|
||||
import org.springframework.jdbc.core.JdbcOperations;
|
||||
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations;
|
||||
import org.springframework.orm.jpa.AbstractEntityManagerFactoryBean;
|
||||
@@ -84,18 +83,15 @@ public class LiquibaseAutoConfiguration {
|
||||
|
||||
private final DataSourceProperties dataSourceProperties;
|
||||
|
||||
private final ResourceLoader resourceLoader;
|
||||
|
||||
private final DataSource dataSource;
|
||||
|
||||
private final DataSource liquibaseDataSource;
|
||||
|
||||
public LiquibaseConfiguration(LiquibaseProperties properties, DataSourceProperties dataSourceProperties,
|
||||
ResourceLoader resourceLoader, ObjectProvider<DataSource> dataSource,
|
||||
ObjectProvider<DataSource> dataSource,
|
||||
@LiquibaseDataSource ObjectProvider<DataSource> liquibaseDataSource) {
|
||||
this.properties = properties;
|
||||
this.dataSourceProperties = dataSourceProperties;
|
||||
this.resourceLoader = resourceLoader;
|
||||
this.dataSource = dataSource.getIfUnique();
|
||||
this.liquibaseDataSource = liquibaseDataSource.getIfAvailable();
|
||||
}
|
||||
|
||||
@@ -126,6 +126,7 @@ public class RabbitAutoConfigurationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void testConnectionFactoryWithOverrides() {
|
||||
this.contextRunner.withUserConfiguration(TestConfiguration.class)
|
||||
.withPropertyValues("spring.rabbitmq.host:remote-server", "spring.rabbitmq.port:9000",
|
||||
@@ -143,6 +144,7 @@ public class RabbitAutoConfigurationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void testConnectionFactoryWithCustomConnectionNameStrategy() {
|
||||
this.contextRunner.withUserConfiguration(ConnectionNameStrategyConfiguration.class).run((context) -> {
|
||||
CachingConnectionFactory connectionFactory = context.getBean(CachingConnectionFactory.class);
|
||||
|
||||
Reference in New Issue
Block a user