Make all @ConfigurationPropertiesBinding @Bean methods static

See gh-45640

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
This commit is contained in:
Tran Ngoc Nhan 2025-05-23 01:17:06 +07:00 committed by Andy Wilkinson
parent 380bfa398f
commit c9bf87be7d
4 changed files with 9 additions and 9 deletions

View File

@ -112,7 +112,7 @@ public class FlywayAutoConfiguration {
@Bean @Bean
@ConfigurationPropertiesBinding @ConfigurationPropertiesBinding
public StringOrNumberToMigrationVersionConverter stringOrNumberMigrationVersionConverter() { public static StringOrNumberToMigrationVersionConverter stringOrNumberMigrationVersionConverter() {
return new StringOrNumberToMigrationVersionConverter(); return new StringOrNumberToMigrationVersionConverter();
} }

View File

@ -264,7 +264,7 @@ class SecurityAutoConfigurationTests {
@Bean @Bean
@ConfigurationPropertiesBinding @ConfigurationPropertiesBinding
Converter<String, TargetType> targetTypeConverter() { static Converter<String, TargetType> targetTypeConverter() {
return new Converter<>() { return new Converter<>() {
@Override @Override

View File

@ -1560,7 +1560,7 @@ class ConfigurationPropertiesTests {
@Bean @Bean
@ConfigurationPropertiesBinding @ConfigurationPropertiesBinding
Converter<String, Person> personConverter() { static Converter<String, Person> personConverter() {
return new PersonConverter(); return new PersonConverter();
} }
@ -1571,7 +1571,7 @@ class ConfigurationPropertiesTests {
@Bean @Bean
@ConfigurationPropertiesBinding @ConfigurationPropertiesBinding
Converter<String, Alien> alienConverter() { static Converter<String, Alien> alienConverter() {
return new AlienConverter(); return new AlienConverter();
} }
@ -1592,7 +1592,7 @@ class ConfigurationPropertiesTests {
@Bean @Bean
@ConfigurationPropertiesBinding @ConfigurationPropertiesBinding
GenericConverter genericPersonConverter() { static GenericConverter genericPersonConverter() {
return new GenericPersonConverter(); return new GenericPersonConverter();
} }
@ -1603,7 +1603,7 @@ class ConfigurationPropertiesTests {
@Bean @Bean
@ConfigurationPropertiesBinding @ConfigurationPropertiesBinding
Formatter<Person> personFormatter() { static Formatter<Person> personFormatter() {
return new PersonFormatter(); return new PersonFormatter();
} }
@ -3031,7 +3031,7 @@ class ConfigurationPropertiesTests {
@Bean @Bean
@ConfigurationPropertiesBinding @ConfigurationPropertiesBinding
WithObjectToObjectMethodConverter withObjectToObjectMethodConverter() { static WithObjectToObjectMethodConverter withObjectToObjectMethodConverter() {
return new WithObjectToObjectMethodConverter(); return new WithObjectToObjectMethodConverter();
} }

View File

@ -102,13 +102,13 @@ class ConversionServiceDeducerTests {
@Bean @Bean
@ConfigurationPropertiesBinding @ConfigurationPropertiesBinding
TestConverter testConverter() { static TestConverter testConverter() {
return new TestConverter(); return new TestConverter();
} }
@Bean @Bean
@ConfigurationPropertiesBinding @ConfigurationPropertiesBinding
StringConverter stringConverter() { static StringConverter stringConverter() {
return new StringConverter(); return new StringConverter();
} }