Polish "Set up SpringLiquibase beans' dependencies by type rather than name"
See gh-17805
This commit is contained in:
parent
b69f9e9fdf
commit
0187e5106d
|
@ -31,6 +31,7 @@ import org.springframework.orm.jpa.AbstractEntityManagerFactoryBean;
|
|||
* @author Dave Syer
|
||||
* @author Phillip Webb
|
||||
* @author Andy Wilkinson
|
||||
* @author Andrii Hrytsiuk
|
||||
* @since 1.1.0
|
||||
* @see BeanDefinition#setDependsOn(String[])
|
||||
*/
|
||||
|
@ -49,6 +50,7 @@ public class EntityManagerFactoryDependsOnPostProcessor extends AbstractDependsO
|
|||
* Creates a new {@code EntityManagerFactoryDependsOnPostProcessor} that will set up
|
||||
* dependencies upon beans with the given types.
|
||||
* @param dependsOn types of the beans to depend upon
|
||||
* @since 2.1.8
|
||||
*/
|
||||
public EntityManagerFactoryDependsOnPostProcessor(Class<?>... dependsOn) {
|
||||
super(EntityManagerFactory.class, AbstractEntityManagerFactoryBean.class, dependsOn);
|
||||
|
|
|
@ -29,6 +29,7 @@ import org.springframework.jdbc.core.JdbcOperations;
|
|||
* @author Dave Syer
|
||||
* @author Phillip Webb
|
||||
* @author Andy Wilkinson
|
||||
* @author Andrii Hrytsiuk
|
||||
* @since 2.0.4
|
||||
* @see BeanDefinition#setDependsOn(String[])
|
||||
*/
|
||||
|
@ -47,6 +48,7 @@ public class JdbcOperationsDependsOnPostProcessor extends AbstractDependsOnBeanF
|
|||
* Creates a new {@code JdbcOperationsDependsOnPostProcessor} that will set up
|
||||
* dependencies upon beans with the given types.
|
||||
* @param dependsOn types of the beans to depend upon
|
||||
* @since 2.1.8
|
||||
*/
|
||||
public JdbcOperationsDependsOnPostProcessor(Class<?>... dependsOn) {
|
||||
super(JdbcOperations.class, dependsOn);
|
||||
|
|
|
@ -27,6 +27,7 @@ import org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations;
|
|||
* beans.
|
||||
*
|
||||
* @author Dan Zheng
|
||||
* @author Andrii Hrytsiuk
|
||||
* @since 2.1.4
|
||||
* @see BeanDefinition#setDependsOn(String[])
|
||||
*/
|
||||
|
@ -45,6 +46,7 @@ public class NamedParameterJdbcOperationsDependsOnPostProcessor extends Abstract
|
|||
* Creates a new {@code NamedParameterJdbcOperationsDependsOnPostProcessor} that will
|
||||
* set up dependencies upon beans with the given types.
|
||||
* @param dependsOn types of the beans to depend upon
|
||||
* @since 2.1.8
|
||||
*/
|
||||
public NamedParameterJdbcOperationsDependsOnPostProcessor(Class<?>... dependsOn) {
|
||||
super(NamedParameterJdbcOperations.class, dependsOn);
|
||||
|
|
|
@ -63,6 +63,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
* @author Stephane Nicoll
|
||||
* @author Dominic Gunn
|
||||
* @author András Deák
|
||||
* @author Andrii Hrytsiuk
|
||||
*/
|
||||
public class LiquibaseAutoConfigurationTests {
|
||||
|
||||
|
@ -303,7 +304,7 @@ public class LiquibaseAutoConfigurationTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
void userConfigurationBeans() {
|
||||
public void userConfigurationBeans() {
|
||||
this.contextRunner
|
||||
.withUserConfiguration(LiquibaseUserConfiguration.class, EmbeddedDataSourceConfiguration.class)
|
||||
.run((context) -> {
|
||||
|
@ -313,7 +314,7 @@ public class LiquibaseAutoConfigurationTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
void userConfigurationJdbcTemplateDependency() {
|
||||
public void userConfigurationJdbcTemplateDependency() {
|
||||
this.contextRunner.withConfiguration(AutoConfigurations.of(JdbcTemplateAutoConfiguration.class))
|
||||
.withUserConfiguration(LiquibaseUserConfiguration.class, EmbeddedDataSourceConfiguration.class)
|
||||
.run((context) -> {
|
||||
|
|
Loading…
Reference in New Issue