Juergen Hoeller
d2a8b56742
Merge branch '6.2.x'
2025-03-13 18:49:30 +01:00
Juergen Hoeller
911cdb2ad0
Add resolveAutowireCandidates variant with includeNonSingletons and allowEagerInit
...
Closes gh-34591
2025-03-13 18:48:43 +01:00
Sébastien Deleuze
1eec0382d7
Polishing
...
See gh-34557
2025-03-12 12:35:30 +01:00
Sébastien Deleuze
762831e742
Add BeanRegistrarDsl.register
...
See gh-34557
2025-03-12 12:34:04 +01:00
Juergen Hoeller
86b21d9b5c
Add support for BeanRegistrar registration on GenericApplicationContext
...
Closes gh-34574
2025-03-11 21:18:20 +01:00
Sébastien Deleuze
91d0ebe327
Refine BeanRegistryAdapterTests
...
Closes gh-34557
2025-03-10 10:39:21 +01:00
Phillip Webb
789791e186
Allow chained BeanRegistry registration
...
Add a `register(BeanRegistry registry)` method to `BeanRegistry`
to allow registration chaining.
See gh-34557
2025-03-10 10:38:50 +01:00
Sébastien Deleuze
a0e2d3a221
Add support for target type to BeanRegistry
...
Closes gh-34560
2025-03-10 10:14:28 +01:00
Juergen Hoeller
c74f897fac
Merge branch '6.2.x'
...
# Conflicts:
# spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java
2025-03-08 12:23:43 +01:00
Juergen Hoeller
143985e862
Add tests for primary/fallback/defaultCandidate precedence
...
Closes gh-34449
2025-03-08 12:22:14 +01:00
Juergen Hoeller
4bd280b87e
Explain availability and uniqueness (including primary/fallback/default) in javadoc
...
Closes gh-34447
2025-03-08 12:22:04 +01:00
Yanming Zhou
639af7befa
Add tests to ensure bean definition flag "fallback" take precedence over "defaultCandidate"
...
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com >
2025-03-08 12:21:31 +01:00
Sébastien Deleuze
fda9b9a696
Polishing
...
See gh-18353
2025-03-07 09:00:06 +01:00
Sébastien Deleuze
682e2d6d84
Introduce BeanRegistrarDsl
...
This commit introduces a new BeanRegistrarDsl that supersedes
BeanDefinitionDsl which is now deprecated.
See BeanRegistrarDslConfigurationTests for a concrete example.
See gh-18353
2025-03-06 19:15:56 +01:00
Sébastien Deleuze
496be9ca98
Introduce first-class support for programmatic bean registration
...
This commit introduces a new BeanRegistrar interface that can be
implemented to register beans programmatically in a concise and
flexible way.
Those bean registrar implementations are typically imported with
an `@Import` annotation on `@Configuration` classes.
See BeanRegistrarConfigurationTests for a concrete example.
See gh-18353
2025-03-06 19:14:03 +01:00
Juergen Hoeller
a605f07100
Merge branch '6.2.x'
...
# Conflicts:
# spring-core/src/main/java/org/springframework/core/convert/support/GenericConversionService.java
2025-03-05 22:47:24 +01:00
Juergen Hoeller
f3b50c9a58
Ignore null beans in SimpleAutowireCandidateResolver.resolveAutowireCandidates
...
Closes gh-34543
2025-03-05 22:44:09 +01:00
Juergen Hoeller
2fbd54078b
Merge branch '6.2.x'
...
# Conflicts:
# spring-webflux/src/main/java/org/springframework/web/reactive/resource/ResourceHandlerUtils.java
# spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHandlerUtils.java
2025-03-04 18:46:39 +01:00
Juergen Hoeller
403362fe3c
Polishing
2025-03-04 18:44:56 +01:00
Juergen Hoeller
533ecf0244
Merge branch '6.2.x'
2025-03-01 22:21:39 +01:00
Juergen Hoeller
d2733cea36
Notify lenientCreationFinished condition after locked creation as well
...
Closes gh-34522
2025-03-01 22:20:23 +01:00
Juergen Hoeller
2e4fbd1ff3
Merge branch '6.2.x'
2025-02-18 13:14:38 +01:00
Juergen Hoeller
e230ea537c
Consistently resolve unique default candidate bean
...
Closes gh-34432
2025-02-18 13:11:36 +01:00
Juergen Hoeller
94eb6006e8
Leniently accept same singleton instance if implicitly appeared
...
Closes gh-34427
2025-02-18 13:01:08 +01:00
Juergen Hoeller
9bc7229a1c
Merge branch '6.2.x'
2025-02-12 23:07:37 +01:00
Juergen Hoeller
dfc10c1a8d
Wait for lenient bean creation in non-locked threads as well
...
Closes gh-34349
2025-02-12 23:06:22 +01:00
Juergen Hoeller
b07ff1c2d4
Merge branch '6.2.x'
2025-02-12 12:17:54 +01:00
Juergen Hoeller
b336bbe539
Wait for lenient bean creation in locked thread when necessary
...
Closes gh-34349
2025-02-12 12:17:02 +01:00
Juergen Hoeller
3fff3b8a6d
Merge branch '6.2.x'
...
# Conflicts:
# spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleAutowireCandidateResolver.java
# spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java
2025-02-07 19:03:37 +01:00
Juergen Hoeller
ace2f0a3e5
Expose resolveAutowireCandidates method with basic candidate filtering
...
DependencyObjectProvider is aligned to check basic autowire-candidate status even in case of custom filtering.
Closes gh-34203
2025-02-07 19:00:25 +01:00
Stéphane Nicoll
49bd8333e8
Merge branch '6.2.x'
2025-02-05 14:42:42 +01:00
Stéphane Nicoll
ec037b1ec0
Polish "Add support for multidimensional arrays"
...
See gh-34183
2025-02-05 14:35:33 +01:00
xumengqi
68c1e2ac92
Add support for multidimensional arrays
...
See gh-34183
2025-02-05 14:23:09 +01:00
Juergen Hoeller
83ab71725f
Merge branch '6.2.x'
...
# Conflicts:
# spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrySupport.java
2025-02-04 13:31:37 +01:00
Juergen Hoeller
cda7e98643
Lazily override default editors when actually needed
...
Closes gh-34361
2025-02-04 13:26:16 +01:00
Juergen Hoeller
088d53adb4
Merge branch '6.2.x'
2025-02-03 15:24:59 +01:00
Juergen Hoeller
8c2b44bd6c
Support filtered/unfiltered stream access on ObjectProvider
...
Closes gh-34318
Closes gh-34203
2025-02-03 15:04:27 +01:00
Juergen Hoeller
121be15004
Merge branch '6.2.x'
2025-01-31 15:17:44 +01:00
Juergen Hoeller
323e52b5a9
Continue with pre-instantiation when current bean is in creation already
...
Closes gh-34349
2025-01-31 15:16:52 +01:00
Sam Brannen
38bdf0cd27
Merge branch '6.2.x'
2025-01-29 17:52:42 +01:00
Sam Brannen
53afe27109
Clean up warnings in Gradle build
...
See gh-34332
2025-01-29 17:52:27 +01:00
Sam Brannen
c9f12aa804
Merge branch '6.2.x'
2025-01-29 17:40:49 +01:00
Sam Brannen
b9e43d05bd
Restore property binding support for a Map that implements Iterable
...
The changes in commit c20a2e4763 introduced a regression with regard to
binding to a Map property when the Map also happens to implement
Iterable.
Although that is perhaps not a very common scenario, this commit
reorders the if-blocks in AbstractNestablePropertyAccessor's
getPropertyValue(PropertyTokenHolder) method so that a Map is
considered before an Iterable, thereby allowing an Iterable-Map to be
accessed as a Map.
See gh-907
Closes gh-34332
2025-01-29 17:34:47 +01:00
Sébastien Deleuze
7f21443a1b
Refine null-safety based on IDEA warnings
...
See gh-28797
2025-01-22 13:20:11 +01:00
Brian Clozel
f85752a956
Fix hints and predicates for Field reflective access
...
This commit revisits the arrangement for Field hints after changes made
in gh-34239.
Closes gh-34294
2025-01-21 20:05:12 +01:00
Sébastien Deleuze
1763334180
Refine KotlinDetector usages and implementation
...
This commit refines KotlinDetector usages and implementation in order
to remove preliminary KotlinDetector#isKotlinReflectPresent invocations
and to ensure that KotlinDetector methods are implemented safely and
efficiently for such use case.
Closes gh-34275
2025-01-20 12:34:28 +01:00
Sébastien Deleuze
928a3c7184
Specify generic type nullness in spring-beans
...
See gh-34140
2025-01-14 12:35:01 +01:00
Juergen Hoeller
ae9abc8545
Merge branch '6.2.x'
2025-01-13 17:49:25 +01:00
Juergen Hoeller
467d5f3ca3
Try late locking for waiting on specific bean to be finished
...
Closes gh-34186
2025-01-13 17:48:13 +01:00
Brian Clozel
d28c0396c9
Update runtime hints predicates after GraalVM changes
...
As of gh-33847, method and field introspection is included by default
when a type is registered for reflection.
Many methods in ReflectionHintsPredicates are now mostly useless as their
default behavior checks for introspection.
This commit deprecates those methods and promotes instead invocation
variants. During the upgrade, developers should replace it for an
`onType` check if only reflection is required. If they were checking for
invocation, they should use the new 'onXInvocation` method.
Closes gh-34239
2025-01-13 15:34:34 +01:00