Sam Brannen
dbd47ff4f9
Implement additional micro performance optimizations
...
See gh-34717
1 year ago
Sam Brannen
381bc4c405
Polish contribution
...
See gh-34717
1 year 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>
1 year ago
Juergen Hoeller
e7db15b325
Perform type check before singleton check for early FactoryBean matching
...
Closes gh-34710
1 year ago
Juergen Hoeller
203ca30a64
Include cause in MethodInvocationException message
...
Closes gh-34691
1 year ago
Juergen Hoeller
34ea0461c7
Polishing
1 year ago
Juergen Hoeller
743f32675d
Only attempt load for CGLIB classes in AOT mode
...
Closes gh-34677
1 year ago
Juergen Hoeller
3ddc607b3e
Add spring.locking.strict property to common appendix
...
See gh-34303
1 year ago
Juergen Hoeller
75e5a75da5
Enforce circular reference exception within non-managed thread
...
Closes gh-34672
1 year ago
Juergen Hoeller
9bf01df230
Evaluate lenientLockingAllowed flag per DefaultListableBeanFactory instance
...
See gh-34303
1 year 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
1 year ago
Juergen Hoeller
aa56b5001a
Detect late-set primary markers for autowiring shortcut algorithm
...
Closes gh-34658
1 year ago
Juergen Hoeller
6905dff660
Introduce spring.locking.strict=true flag for 6.1.x style bean creation locking
...
Closes gh-34303
1 year 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
1 year ago
Juergen Hoeller
37fb79e8ff
Fix qualifier resolution for aliased name against parent factory
...
Closes gh-34644
1 year ago
Juergen Hoeller
dc41ff569e
Add javadoc notes on potential exception suppression in getBeansOfType
...
Closes gh-34629
1 year ago
Sébastien Deleuze
5ce64f47b2
Add support for ImportAware in BeanRegistrar
...
Closes gh-34627
1 year ago
Juergen Hoeller
47651350f3
Polishing
1 year ago
Sam Brannen
6505c4b839
Refine use of isArray() and componentType()
1 year ago
Sam Brannen
208d52d852
Introduce Checkstyle rule for separator symbol location
1 year ago
Sébastien Deleuze
2f8c5a580a
Polishing
1 year ago
Sébastien Deleuze
2bc213d703
Allow registering aliases with BeanRegistry
...
Closes gh-34599
1 year ago
Juergen Hoeller
ad949a7450
Add includeNonSingletons flag for ObjectProvider stream access
...
Closes gh-34591
1 year ago
Juergen Hoeller
911cdb2ad0
Add resolveAutowireCandidates variant with includeNonSingletons and allowEagerInit
...
Closes gh-34591
1 year ago
Sébastien Deleuze
1eec0382d7
Polishing
...
See gh-34557
1 year ago
Sébastien Deleuze
762831e742
Add BeanRegistrarDsl.register
...
See gh-34557
1 year ago
Juergen Hoeller
86b21d9b5c
Add support for BeanRegistrar registration on GenericApplicationContext
...
Closes gh-34574
1 year ago
Sébastien Deleuze
91d0ebe327
Refine BeanRegistryAdapterTests
...
Closes gh-34557
1 year ago
Phillip Webb
789791e186
Allow chained BeanRegistry registration
...
Add a `register(BeanRegistry registry)` method to `BeanRegistry`
to allow registration chaining.
See gh-34557
1 year ago
Sébastien Deleuze
a0e2d3a221
Add support for target type to BeanRegistry
...
Closes gh-34560
1 year ago
Juergen Hoeller
143985e862
Add tests for primary/fallback/defaultCandidate precedence
...
Closes gh-34449
1 year ago
Juergen Hoeller
4bd280b87e
Explain availability and uniqueness (including primary/fallback/default) in javadoc
...
Closes gh-34447
1 year ago
Yanming Zhou
639af7befa
Add tests to ensure bean definition flag "fallback" take precedence over "defaultCandidate"
...
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
1 year ago
Sébastien Deleuze
fda9b9a696
Polishing
...
See gh-18353
1 year 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
1 year 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
1 year ago
Juergen Hoeller
f3b50c9a58
Ignore null beans in SimpleAutowireCandidateResolver.resolveAutowireCandidates
...
Closes gh-34543
1 year ago
Juergen Hoeller
403362fe3c
Polishing
1 year ago
Juergen Hoeller
d2733cea36
Notify lenientCreationFinished condition after locked creation as well
...
Closes gh-34522
1 year ago
Juergen Hoeller
e230ea537c
Consistently resolve unique default candidate bean
...
Closes gh-34432
1 year ago
Juergen Hoeller
94eb6006e8
Leniently accept same singleton instance if implicitly appeared
...
Closes gh-34427
1 year ago
Juergen Hoeller
dfc10c1a8d
Wait for lenient bean creation in non-locked threads as well
...
Closes gh-34349
1 year ago
Juergen Hoeller
b336bbe539
Wait for lenient bean creation in locked thread when necessary
...
Closes gh-34349
1 year 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
1 year ago
Stéphane Nicoll
ec037b1ec0
Polish "Add support for multidimensional arrays"
...
See gh-34183
1 year ago
xumengqi
68c1e2ac92
Add support for multidimensional arrays
...
See gh-34183
1 year ago
Juergen Hoeller
cda7e98643
Lazily override default editors when actually needed
...
Closes gh-34361
1 year ago
Juergen Hoeller
8c2b44bd6c
Support filtered/unfiltered stream access on ObjectProvider
...
Closes gh-34318
Closes gh-34203
1 year ago
Juergen Hoeller
323e52b5a9
Continue with pre-instantiation when current bean is in creation already
...
Closes gh-34349
1 year ago
Sam Brannen
53afe27109
Clean up warnings in Gradle build
...
See gh-34332
1 year ago