Skip to content

Commit 0187e51

Browse files
committed
Polish "Set up SpringLiquibase beans' dependencies by type rather than name"
See gh-17805
1 parent b69f9e9 commit 0187e51

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/jpa/EntityManagerFactoryDependsOnPostProcessor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
* @author Dave Syer
3232
* @author Phillip Webb
3333
* @author Andy Wilkinson
34+
* @author Andrii Hrytsiuk
3435
* @since 1.1.0
3536
* @see BeanDefinition#setDependsOn(String[])
3637
*/
@@ -49,6 +50,7 @@ public EntityManagerFactoryDependsOnPostProcessor(String... dependsOn) {
4950
* Creates a new {@code EntityManagerFactoryDependsOnPostProcessor} that will set up
5051
* dependencies upon beans with the given types.
5152
* @param dependsOn types of the beans to depend upon
53+
* @since 2.1.8
5254
*/
5355
public EntityManagerFactoryDependsOnPostProcessor(Class<?>... dependsOn) {
5456
super(EntityManagerFactory.class, AbstractEntityManagerFactoryBean.class, dependsOn);

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/JdbcOperationsDependsOnPostProcessor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* @author Dave Syer
3030
* @author Phillip Webb
3131
* @author Andy Wilkinson
32+
* @author Andrii Hrytsiuk
3233
* @since 2.0.4
3334
* @see BeanDefinition#setDependsOn(String[])
3435
*/
@@ -47,6 +48,7 @@ public JdbcOperationsDependsOnPostProcessor(String... dependsOn) {
4748
* Creates a new {@code JdbcOperationsDependsOnPostProcessor} that will set up
4849
* dependencies upon beans with the given types.
4950
* @param dependsOn types of the beans to depend upon
51+
* @since 2.1.8
5052
*/
5153
public JdbcOperationsDependsOnPostProcessor(Class<?>... dependsOn) {
5254
super(JdbcOperations.class, dependsOn);

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/NamedParameterJdbcOperationsDependsOnPostProcessor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
* beans.
2828
*
2929
* @author Dan Zheng
30+
* @author Andrii Hrytsiuk
3031
* @since 2.1.4
3132
* @see BeanDefinition#setDependsOn(String[])
3233
*/
@@ -45,6 +46,7 @@ public NamedParameterJdbcOperationsDependsOnPostProcessor(String... dependsOn) {
4546
* Creates a new {@code NamedParameterJdbcOperationsDependsOnPostProcessor} that will
4647
* set up dependencies upon beans with the given types.
4748
* @param dependsOn types of the beans to depend upon
49+
* @since 2.1.8
4850
*/
4951
public NamedParameterJdbcOperationsDependsOnPostProcessor(Class<?>... dependsOn) {
5052
super(NamedParameterJdbcOperations.class, dependsOn);

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfigurationTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
* @author Stephane Nicoll
6464
* @author Dominic Gunn
6565
* @author András Deák
66+
* @author Andrii Hrytsiuk
6667
*/
6768
public class LiquibaseAutoConfigurationTests {
6869

@@ -303,7 +304,7 @@ public void liquibaseDataSourceWithoutDataSourceAutoConfiguration() {
303304
}
304305

305306
@Test
306-
void userConfigurationBeans() {
307+
public void userConfigurationBeans() {
307308
this.contextRunner
308309
.withUserConfiguration(LiquibaseUserConfiguration.class, EmbeddedDataSourceConfiguration.class)
309310
.run((context) -> {
@@ -313,7 +314,7 @@ void userConfigurationBeans() {
313314
}
314315

315316
@Test
316-
void userConfigurationJdbcTemplateDependency() {
317+
public void userConfigurationJdbcTemplateDependency() {
317318
this.contextRunner.withConfiguration(AutoConfigurations.of(JdbcTemplateAutoConfiguration.class))
318319
.withUserConfiguration(LiquibaseUserConfiguration.class, EmbeddedDataSourceConfiguration.class)
319320
.run((context) -> {

0 commit comments

Comments
 (0)