Sam Brannen
dbd47ff4f9
Implement additional micro performance optimizations
...
See gh-34717
10 months ago
Sam Brannen
381bc4c405
Polish contribution
...
See gh-34717
10 months ago
Olivier Bourgain
0f2308e85f
Implement micro performance optimizations
...
- ClassUtils.isAssignable(): Avoid Map lookup when the type is not a
primitive.
- AnnotationsScanner: Perform low cost array length check before String
comparisons.
- BeanFactoryUtils: Use char comparison instead of String comparison.
The bean factory prefix is '&', so we can use a char comparison
instead of more heavyweight String.startsWith("&").
- AbstractBeanFactory.getMergedBeanDefinition(): Perform the low cost
check first. Map lookup, while cheap, is still more expensive than
instanceof.
Closes gh-34717
Signed-off-by: Olivier Bourgain <olivierbourgain02@gmail.com>
10 months ago
Juergen Hoeller
e7db15b325
Perform type check before singleton check for early FactoryBean matching
...
Closes gh-34710
10 months ago
Juergen Hoeller
203ca30a64
Include cause in MethodInvocationException message
...
Closes gh-34691
10 months ago
Juergen Hoeller
34ea0461c7
Polishing
10 months ago
Juergen Hoeller
743f32675d
Only attempt load for CGLIB classes in AOT mode
...
Closes gh-34677
10 months ago
Juergen Hoeller
3ddc607b3e
Add spring.locking.strict property to common appendix
...
See gh-34303
10 months ago
Juergen Hoeller
75e5a75da5
Enforce circular reference exception within non-managed thread
...
Closes gh-34672
10 months ago
Juergen Hoeller
9bf01df230
Evaluate lenientLockingAllowed flag per DefaultListableBeanFactory instance
...
See gh-34303
10 months ago
Stéphane Nicoll
2862c87601
Make sure the generated values are available from a static context
...
This commit updates the tests of property values code generated to
invoke the generated code from a `static` context. This ensures that
the test fails if that's not the case.
This commit also updated LinkedHashMap handling that did suffer from
that problem.
Closes gh-34659
10 months ago
Juergen Hoeller
aa56b5001a
Detect late-set primary markers for autowiring shortcut algorithm
...
Closes gh-34658
10 months ago
Juergen Hoeller
6905dff660
Introduce spring.locking.strict=true flag for 6.1.x style bean creation locking
...
Closes gh-34303
10 months ago
Brian Clozel
fb423d66e3
Add ClassFile variant for class metadata reading
...
Prior to this commit, Spring Framework would use its own ASM fork to
read class/method/annotation metadata from bytecode. This is typically
used in configuration class parsing to build bean definitions without
actually loading classes at runtime at that step.
This commit adds support for a new metadata reading implementation that
uses the ClassFile API available as of Java 24. For now, this is turned
on by default for Java 24+.
Closes gh-33616
10 months ago
Juergen Hoeller
37fb79e8ff
Fix qualifier resolution for aliased name against parent factory
...
Closes gh-34644
10 months ago
Juergen Hoeller
dc41ff569e
Add javadoc notes on potential exception suppression in getBeansOfType
...
Closes gh-34629
10 months ago
Sébastien Deleuze
5ce64f47b2
Add support for ImportAware in BeanRegistrar
...
Closes gh-34627
10 months ago
Juergen Hoeller
47651350f3
Polishing
10 months ago
Sam Brannen
6505c4b839
Refine use of isArray() and componentType()
10 months ago
Sam Brannen
208d52d852
Introduce Checkstyle rule for separator symbol location
10 months ago
Sébastien Deleuze
2f8c5a580a
Polishing
10 months ago
Sébastien Deleuze
2bc213d703
Allow registering aliases with BeanRegistry
...
Closes gh-34599
10 months ago
Juergen Hoeller
ad949a7450
Add includeNonSingletons flag for ObjectProvider stream access
...
Closes gh-34591
10 months ago
Juergen Hoeller
911cdb2ad0
Add resolveAutowireCandidates variant with includeNonSingletons and allowEagerInit
...
Closes gh-34591
10 months ago
Sébastien Deleuze
1eec0382d7
Polishing
...
See gh-34557
11 months ago
Sébastien Deleuze
762831e742
Add BeanRegistrarDsl.register
...
See gh-34557
11 months ago
Juergen Hoeller
86b21d9b5c
Add support for BeanRegistrar registration on GenericApplicationContext
...
Closes gh-34574
11 months ago
Sébastien Deleuze
91d0ebe327
Refine BeanRegistryAdapterTests
...
Closes gh-34557
11 months ago
Phillip Webb
789791e186
Allow chained BeanRegistry registration
...
Add a `register(BeanRegistry registry)` method to `BeanRegistry`
to allow registration chaining.
See gh-34557
11 months ago
Sébastien Deleuze
a0e2d3a221
Add support for target type to BeanRegistry
...
Closes gh-34560
11 months ago
Juergen Hoeller
143985e862
Add tests for primary/fallback/defaultCandidate precedence
...
Closes gh-34449
11 months ago
Juergen Hoeller
4bd280b87e
Explain availability and uniqueness (including primary/fallback/default) in javadoc
...
Closes gh-34447
11 months ago
Yanming Zhou
639af7befa
Add tests to ensure bean definition flag "fallback" take precedence over "defaultCandidate"
...
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
11 months ago
Sébastien Deleuze
fda9b9a696
Polishing
...
See gh-18353
11 months ago
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
11 months ago
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
11 months ago
Juergen Hoeller
f3b50c9a58
Ignore null beans in SimpleAutowireCandidateResolver.resolveAutowireCandidates
...
Closes gh-34543
11 months ago
Juergen Hoeller
403362fe3c
Polishing
11 months ago
Juergen Hoeller
d2733cea36
Notify lenientCreationFinished condition after locked creation as well
...
Closes gh-34522
11 months ago
Juergen Hoeller
e230ea537c
Consistently resolve unique default candidate bean
...
Closes gh-34432
11 months ago
Juergen Hoeller
94eb6006e8
Leniently accept same singleton instance if implicitly appeared
...
Closes gh-34427
11 months ago
Juergen Hoeller
dfc10c1a8d
Wait for lenient bean creation in non-locked threads as well
...
Closes gh-34349
11 months ago
Juergen Hoeller
b336bbe539
Wait for lenient bean creation in locked thread when necessary
...
Closes gh-34349
11 months ago
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
12 months ago
Stéphane Nicoll
ec037b1ec0
Polish "Add support for multidimensional arrays"
...
See gh-34183
12 months ago
xumengqi
68c1e2ac92
Add support for multidimensional arrays
...
See gh-34183
12 months ago
Juergen Hoeller
cda7e98643
Lazily override default editors when actually needed
...
Closes gh-34361
12 months ago
Juergen Hoeller
8c2b44bd6c
Support filtered/unfiltered stream access on ObjectProvider
...
Closes gh-34318
Closes gh-34203
12 months ago
Juergen Hoeller
323e52b5a9
Continue with pre-instantiation when current bean is in creation already
...
Closes gh-34349
12 months ago
Sam Brannen
53afe27109
Clean up warnings in Gradle build
...
See gh-34332
12 months ago