mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Merge branch '7.0.x'
This commit is contained in:
@@ -20,6 +20,10 @@ antora {
|
||||
]
|
||||
}
|
||||
|
||||
node {
|
||||
version = '24.15.0'
|
||||
}
|
||||
|
||||
tasks.named("generateAntoraYml") {
|
||||
asciidocAttributes = project.provider( {
|
||||
return ["spring-version": project.version ]
|
||||
|
||||
+13
@@ -610,6 +610,19 @@ Kotlin::
|
||||
See the {spring-framework-api}/context/annotation/Conditional.html[`@Conditional`]
|
||||
javadoc for more detail.
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
A `@Conditional` annotation declared on an enclosing `@Configuration` class is only
|
||||
applied to the registration of a nested `@Configuration` class if the nested class is
|
||||
reached through the parser's recursion from its enclosing class, or via `@Import`. If a
|
||||
nested class is discovered independently of its enclosing class — for example, via
|
||||
`@ComponentScan` or by directly registering it against the application context — it is
|
||||
processed using only its own `@Conditional` annotations. Thus, if you wish to ensure that
|
||||
the same `@Conditional` annotations apply in such scenarios, you must redeclare the
|
||||
relevant annotations on the nested class, or extract them into a composed annotation
|
||||
which you apply to both the enclosing class and the nested class.
|
||||
====
|
||||
|
||||
|
||||
[[beans-java-combining]]
|
||||
== Combining Java and XML Configuration
|
||||
|
||||
+12
@@ -341,6 +341,18 @@ import org.springframework.stereotype.Component;
|
||||
* with the {@code @Profile} annotation to provide two options of the same bean to the
|
||||
* enclosing {@code @Configuration} class.
|
||||
*
|
||||
* <p>A {@link Conditional @Conditional} annotation declared on an enclosing
|
||||
* {@code @Configuration} class is only applied to the registration of a nested
|
||||
* {@code @Configuration} class if the nested class is reached through the parser's
|
||||
* recursion from its enclosing class, or via {@link Import @Import}. If a nested
|
||||
* class is discovered independently of its enclosing class — for example,
|
||||
* via {@link ComponentScan @ComponentScan} or by directly registering it against
|
||||
* the application context — it is processed using only its own
|
||||
* {@code @Conditional} annotations. Thus, if you wish to ensure that the same
|
||||
* {@code @Conditional} annotations apply in such scenarios, you must redeclare
|
||||
* the relevant annotations on the nested class, or extract them into a composed
|
||||
* annotation which you apply to both the enclosing class and the nested class.
|
||||
*
|
||||
* <h2>Configuring lazy initialization</h2>
|
||||
*
|
||||
* <p>By default, {@code @Bean} methods will be <em>eagerly instantiated</em> at container
|
||||
|
||||
Reference in New Issue
Block a user