Merge branch '3.3.x' into 3.4.x
Closes gh-45625
This commit is contained in:
@@ -1143,11 +1143,10 @@ If you need custom type conversion, you can provide a javadoc:org.springframewor
|
||||
====
|
||||
Beans used for property conversion are requested very early during the application lifecycle so make sure to limit the dependencies that your javadoc:org.springframework.core.convert.ConversionService[] is using.
|
||||
Typically, any dependency that you require may not be fully initialized at creation time.
|
||||
|
||||
You should also declare any javadoc:org.springframework.boot.context.properties.ConfigurationProperties[format=annotation] beans using `static` methods to avoid "`bean is not eligible for getting processed by all BeanPostProcessors`" warnings.
|
||||
====
|
||||
|
||||
TIP: You may want to rename your custom javadoc:org.springframework.core.convert.ConversionService[] if it is not required for configuration keys coercion and only rely on custom converters qualified with javadoc:org.springframework.boot.context.properties.ConfigurationPropertiesBinding[format=annotation].
|
||||
When qualifying a `@Bean` method with `@ConfigurationPropertiesBinding`, the method should be `static` to avoid "`bean is not eligible for getting processed by all BeanPostProcessors`" warnings.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -37,10 +37,6 @@ import org.springframework.stereotype.Indexed;
|
||||
* <p>
|
||||
* Note that contrary to {@code @Value}, SpEL expressions are not evaluated since property
|
||||
* values are externalized.
|
||||
* <p>
|
||||
* Static methods should be used when declaring {@code @ConfigurationProperties} beans to
|
||||
* ensure that "bean is not eligible for getting processed by all BeanPostProcessors"
|
||||
* warnings are not produced.
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @since 1.0.0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -23,10 +23,15 @@ import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
* Qualifier for beans that are needed to configure the binding of
|
||||
* {@link ConfigurationProperties @ConfigurationProperties} (e.g. Converters).
|
||||
* <p>
|
||||
* {@link Bean @Bean} methods that declare a {@code @ConfigurationPropertiesBinding} bean
|
||||
* should be {@code static} to ensure that "bean is not eligible for getting processed by
|
||||
* all BeanPostProcessors" warnings are not produced.
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @since 1.3.0
|
||||
|
||||
Reference in New Issue
Block a user