Commit Graph

2559 Commits

Author SHA1 Message Date
Juergen Hoeller
d0a1ba5092 Merge branch '6.2.x' 2025-04-30 17:56:36 +02:00
Juergen Hoeller
9c183f9e77 Add explicit note on redeclaring in each application context
Closes gh-34843
2025-04-30 17:55:18 +02:00
Juergen Hoeller
4d15c136b1 Merge branch '6.2.x'
# Conflicts:
#	spring-context/src/test/java/org/springframework/context/aot/ContextAotProcessorTests.java
2025-04-29 11:51:24 +02:00
Juergen Hoeller
03620fc530 Polishing 2025-04-29 11:47:47 +02:00
Juergen Hoeller
1c108054ee Close ApplicationContext after AOT processing
Closes gh-34841
2025-04-29 11:47:09 +02:00
Sam Brannen
af461fc0a6 Merge branch '6.2.x' 2025-04-14 14:27:27 +02:00
Sam Brannen
8f62a8f579 Suppress recently introduced warning 2025-04-14 14:25:48 +02:00
Sam Brannen
a22d204681 Remove duplicate words in Java source code
Discovered using regular expression: \b(\w+)\s+\1\b[^(}]
2025-04-14 11:24:55 +02:00
Sam Brannen
76d335aa41 Remove default value for @⁠ManagedOperationParameters container 2025-04-04 18:17:43 +02:00
Sam Brannen
5b4511fbf7 Merge branch '6.2.x' 2025-04-04 15:54:29 +02:00
Sam Brannen
dbd47ff4f9 Implement additional micro performance optimizations
See gh-34717
2025-04-04 15:51:37 +02:00
Juergen Hoeller
907c1db7a6 Merge branch '6.2.x'
# Conflicts:
#	spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java
2025-04-04 00:28:50 +02:00
Juergen Hoeller
ee804ee8fb Avoid throwing of plain RuntimeException 2025-04-04 00:22:24 +02:00
Juergen Hoeller
4e5979c75a Consistent CacheErrorHandler processing for @Cacheable(sync=true)
Closes gh-34708
2025-04-04 00:22:12 +02:00
Juergen Hoeller
5b1c55252e Merge branch '6.2.x' 2025-04-02 23:43:06 +02:00
Juergen Hoeller
6bb964e2d0 Explicitly use original ClassLoader in case of package visibility
Closes gh-34684
2025-04-02 23:41:43 +02:00
Juergen Hoeller
d06b47818b Align JSpecify @Nullable annotation 2025-04-01 22:23:46 +02:00
Juergen Hoeller
5e2c16c30c Merge branch '6.2.x'
# Conflicts:
#	spring-beans/src/main/java/org/springframework/beans/factory/support/CglibSubclassingInstantiationStrategy.java
2025-04-01 22:21:56 +02:00
Juergen Hoeller
48009c8534 Introduce support for concurrent startup phases with timeouts
Closes gh-34634
2025-04-01 22:18:26 +02:00
Juergen Hoeller
a122dda596 Merge branch '6.2.x' 2025-03-31 16:42:29 +02:00
Juergen Hoeller
743f32675d Only attempt load for CGLIB classes in AOT mode
Closes gh-34677
2025-03-31 16:39:18 +02:00
Sam Brannen
b2af1af50f Merge branch '6.2.x' 2025-03-31 12:19:43 +02:00
Sam Brannen
044258f085 Support abstract @⁠Configuration classes without @⁠Bean methods again
Historically, @⁠Configuration classes that did not declare @⁠Bean
methods were allowed to be abstract. However, the changes made in
76a6b9ea79 introduced a regression that prevents such classes from
being abstract, resulting in a BeanInstantiationException. This change
in behavior is caused by the fact that such a @⁠Configuration class is
no longer replaced by a concrete subclass created dynamically by CGLIB.

This commit restores support for abstract @⁠Configuration classes
without @⁠Bean methods by modifying the "no enhancement required" check
in ConfigurationClassParser.

See gh-34486
Closes gh-34663
2025-03-31 12:18:55 +02:00
Sébastien Deleuze
5ce64f47b2 Add support for ImportAware in BeanRegistrar
Closes gh-34627
2025-03-21 11:49:15 +01:00
Sam Brannen
92ee20c896 Adhere to new Checkstyle rule 2025-03-19 16:29:03 +01:00
Sam Brannen
8db1340263 Merge branch '6.2.x' 2025-03-19 16:24:18 +01:00
Sam Brannen
208d52d852 Introduce Checkstyle rule for separator symbol location 2025-03-19 15:35:44 +01:00
Sam Brannen
84ba6b4b26 Add package to Javadoc link 2025-03-18 16:52:12 +01:00
Sam Brannen
37a135447c Rely on standard @Repeatable support in AnnotationJmxAttributeSource
This commit removes the use of RepeatableContainers.of() in
AnnotationJmxAttributeSource since that is unnecessary when using the
MergedAnnotations API with @⁠Repeatable annotations such as
@⁠ManagedOperationParameter and @⁠ManagedNotification.

Closes gh-34606
2025-03-15 16:56:56 +01:00
Sam Brannen
6e1706a8a4 Polish [Annotation]JmxAttributeSource 2025-03-15 15:15:45 +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
e9701a9ce3 Remove support for Aware interfaces in BeanRegistrar
Closes gh-34562
2025-03-10 12:14:11 +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
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
Sébastien Deleuze
7bc712e304 Upgrade NullAway to 0.12.4
This commit also slightly refines nullness but without
significant user-side impact expected.

Closes gh-34525
2025-03-03 08:45:54 +01:00
Juergen Hoeller
dc580740c0 Merge branch '6.2.x' 2025-02-25 16:21:09 +01:00
Juergen Hoeller
aff9ac72ec Avoid unnecessary CGLIB processing on configuration classes
Closes gh-34486
2025-02-25 16:20:12 +01:00
Brian Clozel
466ac6b703 Improve SimpleKey hashing function
Prior to this commit, `SimpleKey` would be used in Spring Framework's
caching support and its `hashCode` value would be used to efficiently
store this key in data structures.

While the current hashcode strategy works, the resulting values don't
spread well enough when input keys are sequential (which is often the
case). This can have negative performance impacts, depending on the
data structures used by the cache implementation.

This commit improves the `hashCode` function with a mixer to better
spread the hash values. This is using the mixer function from the
MurMur3 hash algorithm.

Closes gh-34483
2025-02-25 16:09:01 +01:00
Juergen Hoeller
63f6c33db6 Merge branch '6.2.x' 2025-02-18 20:45:34 +01:00
Juergen Hoeller
6786e1c3e5 Apply fallback in case of initial SmartClassLoader mismatch as well
See gh-34423
2025-02-18 20:40:13 +01:00
Juergen Hoeller
48aa94be46 Merge branch '6.2.x' 2025-02-18 15:18:01 +01:00
Juergen Hoeller
93134fd4d1 Apply fallback in case of any exception coming out of createClass
Closes gh-34423
2025-02-18 15:16:25 +01:00
Juergen Hoeller
2e4fbd1ff3 Merge branch '6.2.x' 2025-02-18 13:14:38 +01:00
Juergen Hoeller
d0ceefedc6 Mark XML-configured executor/scheduler as infrastructure bean
Closes gh-34015
2025-02-18 13:13:34 +01:00
Juergen Hoeller
dce3f71b7d Merge branch '6.2.x'
# Conflicts:
#	framework-platform/framework-platform.gradle
2025-02-11 22:11:45 +01:00
Juergen Hoeller
f53da04717 Align with SmartClassLoader handling for AOP proxy classes
Closes gh-34274
2025-02-11 22:10:02 +01:00
rstoyanchev
bae12e739d Merge branch '6.2.x' 2025-02-11 11:18:23 +00:00
rstoyanchev
9f55296049 Nested list/map/array with constructor binding
Closes gh-34305
2025-02-11 11:11:05 +00:00
rstoyanchev
4591a67641 Handle [] leniently in constructor binding
See gh-34305
2025-02-11 11:11:05 +00:00
Sam Brannen
7557967f9e Stop using explicitly aliased value attribute as @⁠Component name
Prior to this commit, if a custom stereotype annotation was
meta-annotated with @⁠Component and declared a local String `value`
attribute that was explicitly configured (via @⁠AliasFor) as an
override for an attribute other than @⁠Component.value, the local
`value` attribute was still used as a convention-based override for
@⁠Component.value.

Consequently, a local `value` attribute was used as a custom
@⁠Component name, even when that is clearly not the intent.

To address that, this commit revises the logic in
AnnotationBeanNameGenerator so that a `value` attribute which is
explicitly aliased to something other than @⁠Component.value is no
longer used as an explicit @⁠Component name.

See gh-34317
Closes gh-34346
2025-02-10 18:21:29 +01:00