Skip to content

Commit c9bf87b

Browse files
ngocnhan-tran1996wilkinsona
authored andcommitted
Make all @ConfigurationPropertiesBinding @bean methods static
See gh-45640 Signed-off-by: Tran Ngoc Nhan <[email protected]>
1 parent 380bfa3 commit c9bf87b

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public class FlywayAutoConfiguration {
112112

113113
@Bean
114114
@ConfigurationPropertiesBinding
115-
public StringOrNumberToMigrationVersionConverter stringOrNumberMigrationVersionConverter() {
115+
public static StringOrNumberToMigrationVersionConverter stringOrNumberMigrationVersionConverter() {
116116
return new StringOrNumberToMigrationVersionConverter();
117117
}
118118

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/servlet/SecurityAutoConfigurationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ static class ConverterConfiguration {
264264

265265
@Bean
266266
@ConfigurationPropertiesBinding
267-
Converter<String, TargetType> targetTypeConverter() {
267+
static Converter<String, TargetType> targetTypeConverter() {
268268
return new Converter<>() {
269269

270270
@Override

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,7 +1560,7 @@ static class PersonConverterConfiguration {
15601560

15611561
@Bean
15621562
@ConfigurationPropertiesBinding
1563-
Converter<String, Person> personConverter() {
1563+
static Converter<String, Person> personConverter() {
15641564
return new PersonConverter();
15651565
}
15661566

@@ -1571,7 +1571,7 @@ static class AlienConverterConfiguration {
15711571

15721572
@Bean
15731573
@ConfigurationPropertiesBinding
1574-
Converter<String, Alien> alienConverter() {
1574+
static Converter<String, Alien> alienConverter() {
15751575
return new AlienConverter();
15761576
}
15771577

@@ -1592,7 +1592,7 @@ static class GenericConverterConfiguration {
15921592

15931593
@Bean
15941594
@ConfigurationPropertiesBinding
1595-
GenericConverter genericPersonConverter() {
1595+
static GenericConverter genericPersonConverter() {
15961596
return new GenericPersonConverter();
15971597
}
15981598

@@ -1603,7 +1603,7 @@ static class FormatterConfiguration {
16031603

16041604
@Bean
16051605
@ConfigurationPropertiesBinding
1606-
Formatter<Person> personFormatter() {
1606+
static Formatter<Person> personFormatter() {
16071607
return new PersonFormatter();
16081608
}
16091609

@@ -3031,7 +3031,7 @@ static class WithCustomConverterAndObjectToObjectMethodConfiguration {
30313031

30323032
@Bean
30333033
@ConfigurationPropertiesBinding
3034-
WithObjectToObjectMethodConverter withObjectToObjectMethodConverter() {
3034+
static WithObjectToObjectMethodConverter withObjectToObjectMethodConverter() {
30353035
return new WithObjectToObjectMethodConverter();
30363036
}
30373037

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConversionServiceDeducerTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ static class CustomConverterConfiguration {
102102

103103
@Bean
104104
@ConfigurationPropertiesBinding
105-
TestConverter testConverter() {
105+
static TestConverter testConverter() {
106106
return new TestConverter();
107107
}
108108

109109
@Bean
110110
@ConfigurationPropertiesBinding
111-
StringConverter stringConverter() {
111+
static StringConverter stringConverter() {
112112
return new StringConverter();
113113
}
114114

0 commit comments

Comments
 (0)