Commit Graph

2365 Commits

Author SHA1 Message Date
Juergen Hoeller
7d236e29bb Merge branch '6.1.x'
# Conflicts:
#	spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java
2024-06-21 11:23:37 +02:00
Juergen Hoeller
a580d6d6fc Leniently ignore type mismatch for LoadTimeWeaverAware beans
Closes gh-33082
2024-06-21 11:22:48 +02:00
Juergen Hoeller
6561490fd9 Expose isClosed() method on AbstractApplicationContext
Closes gh-33058
2024-06-17 21:08:28 +02:00
Juergen Hoeller
5c68f3f4ef Reject @Bean method with method-level @Autowired declaration
Closes gh-33051
2024-06-17 21:08:21 +02:00
Juergen Hoeller
6d5c312027 Merge branch '6.1.x' 2024-06-17 18:44:50 +02:00
Juergen Hoeller
9a56a8877f Polishing 2024-06-17 18:42:37 +02:00
Juergen Hoeller
e79a9a5bff Correct and consistent event class names in constructor javadoc
Closes gh-33032
2024-06-17 18:42:30 +02:00
Stéphane Nicoll
e9d5d68628 Merge branch '6.1.x' 2024-06-16 09:59:21 +02:00
Stéphane Nicoll
f140df881d Polish "Fix typo in comment"
See gh-33036
2024-06-16 09:57:24 +02:00
tafjwr
12cf654c98 Fix typo in comment
See gh-33036
2024-06-16 09:56:58 +02:00
Juergen Hoeller
4b58626fa4 Merge branch '6.1.x' 2024-06-14 22:09:31 +02:00
Juergen Hoeller
089e4e69f1 Do not attempt to load pre-enhanced class for reloadable classes
Closes gh-33024
2024-06-14 22:07:46 +02:00
Johnny Lim
f3d390a95f Fix package description for org.springframework.validation.annotation
See gh-32532
2024-06-12 17:45:32 +02:00
Juergen Hoeller
b196167f19 Merge branch '6.1.x'
# Conflicts:
#	framework-platform/framework-platform.gradle
2024-06-12 14:28:53 +02:00
Juergen Hoeller
24c8dfea1f Remove duplicated javadoc paragraph 2024-06-12 14:23:26 +02:00
Juergen Hoeller
8b8604db73 Align after merge from 6.1.x 2024-06-12 13:34:53 +02:00
Juergen Hoeller
4bb755e2d2 Merge branch '6.1.x' 2024-06-12 13:31:38 +02:00
Juergen Hoeller
0ff200b2f1 Trigger cancellation on context close for non-managed objects only
Specifically for prototype/scoped beans and FactoryBean-exposed objects.

Closes gh-33009
2024-06-12 13:31:00 +02:00
Juergen Hoeller
7a7f34f4ad Defensive access to volatile ScheduledFuture field
Includes defensive test arrangement for isInThePast() with at least 1 ms having passed.

See gh-24560
2024-06-12 13:01:58 +02:00
Brian Clozel
dc2c8d6094 Add execution metadata to tasks and scheduled tasks
This commit adds new information about the execution and scheduling of
tasks.

The `Task` type now exposes the `TaskExecutionOutcome` of the latest
execution; this includes the instant the execution started, the
execution outcome and any thrown exception.

The `ScheduledTask` contract can now provide the time when the next
execution is scheduled.

Closes gh-24560
2024-06-11 19:34:41 +02:00
Stéphane Nicoll
89e894205a Improve exception message to include affected configuration class
Closes gh-32998
2024-06-11 14:24:28 +02:00
Juergen Hoeller
fce2f49e46 Polishing (aligned with main) 2024-06-11 09:07:09 +02:00
Juergen Hoeller
457bf9416c Configure individual timeouts for specific shutdown phases
Closes gh-32985
2024-06-10 11:00:47 +02:00
Sébastien Deleuze
c39ce10619 Merge branch '6.1.x' 2024-06-07 18:42:10 +02:00
Sébastien Deleuze
172987c874 Ignore checkpointOnRefresh after restore
Closes gh-32978
2024-06-07 18:41:37 +02:00
Juergen Hoeller
2aabe238c6 Merge branch '6.1.x'
# Conflicts:
#	spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java
2024-06-06 20:47:02 +02:00
Juergen Hoeller
624d6dd167 Expose actual result value for @CacheEvict condition
Closes gh-32960
2024-06-06 20:43:04 +02:00
Sébastien Deleuze
7b9cbd7876 Add support for Kotlin BeanPostProcessor beans
This commit adds support for Kotlin BeanPostProcessor beans which should
be defined in a companion object and annotated with `@JvmStatic`.

Closes gh-32946
2024-06-06 19:23:25 +02:00
Juergen Hoeller
28eb9aebcf Add BeanFactoryInitializer callback before preInstantiateSingletons
Closes gh-32836
2024-06-04 22:50:42 +02:00
Stéphane Nicoll
42ace2c2c9 Provide dedicated AOT exception hierarchy
This commit adds a number of catch point that provides additional
context when an AOT processor fails to execute. Amongst other things,
this makes sure that the bean name and its descriptor is consistently
provided in the error message when available.

Closes gh-32777
2024-06-04 09:36:21 +02:00
Juergen Hoeller
0e5e81e7ef Merge branch '6.1.x' 2024-05-21 17:39:59 +02:00
Juergen Hoeller
20dea0dae2 Polishing 2024-05-21 17:39:11 +02:00
Juergen Hoeller
fee17e11ba Default fallback parsing for UTC without milliseconds
Closes gh-32856
2024-05-21 17:39:06 +02:00
Juergen Hoeller
7b16988ec9 Merge branch '6.1.x' 2024-05-08 17:52:42 +02:00
Juergen Hoeller
0eb937a866 Document limitations of CGLIB proxy class generation in JPMS module setups
Includes extended exception messages with common hints and explanations.

Closes gh-32671
2024-05-08 17:51:17 +02:00
Juergen Hoeller
d9ca263065 Merge branch '6.1.x' 2024-05-06 20:11:56 +02:00
Juergen Hoeller
05d9b52b19 Polishing 2024-05-06 20:10:40 +02:00
Juergen Hoeller
69eaf8f828 Merge branch '6.1.x' 2024-05-01 18:07:13 +02:00
Juergen Hoeller
25cedcfb99 Consistently propagate ApplicationStartup to BeanFactory
Closes gh-32747
2024-05-01 18:06:27 +02:00
Stéphane Nicoll
9492d88270 Stop wrapping low-level exceptions in CacheAspectSupport initialization
This commit replaces the IllegalStateException thrown in
CacheAspectSupport when a CacheManager cannot be determined. These were
added to provide a dedicated error message, but it is possible to do
so without hiding the more adequate exception type.

Closes gh-22442
2024-04-29 15:24:36 +02:00
Juergen Hoeller
0402ea13c0 Merge branch '6.1.x' 2024-04-24 13:42:43 +02:00
Juergen Hoeller
387e34d881 Wrap depends-on exception for specifically requested top-level bean
Closes gh-32470
2024-04-24 13:41:48 +02:00
Stéphane Nicoll
6682d75481 Merge branch '6.1.x' 2024-04-24 11:13:27 +02:00
Stéphane Nicoll
4a10bc3288 Refine preDetermineBeanTypes algorithm
This commit refines the preDetermineBeanTypes algorithm that AOT uses
to approximate the order of preInstantiateSingletons more closely.

Previously, the algorithm assumed that all beans where non-lazy
singletons in terms of initialization order, which led to inconsistent
order in CGLIB proxy generation.

We now explicitly park lazy beans so that their types are determined
during a second phase, matching the order of regular initialization
order.

Closes gh-32669

Co-authored-by: Juergen Hoeller <juergen.hoeller@broadcom.com>
2024-04-24 09:23:51 +02:00
Stéphane Nicoll
c21090ad31 Merge branch '6.1.x' 2024-04-22 15:16:50 +02:00
Stéphane Nicoll
8a8c8fe00e Detect target of factory method with AOT
Previously, if a factory method is defined on a parent, the generated
code would blindly use the method's declaring class for both the target
of the generated code, and the signature of the method.

This commit improves the resolution by considering the factory metadata
in the BeanDefinition.

Closes gh-32609
2024-04-22 15:13:56 +02:00
Juergen Hoeller
6a1ec0ed73 Merge branch '6.1.x' 2024-04-22 13:43:57 +02:00
Juergen Hoeller
ec1f5ca600 Polishing 2024-04-22 13:43:07 +02:00
Simon Baslé
43b5c81dad Merge branch '6.1.x' 2024-04-16 16:29:53 +02:00
xumengqi
bf3278596c Include actual cause's message in various parsing exception messages
This change improves the message of several parsing-related exceptions
that would previously entirely swallow the original exception's message
and sometimes have a slightly misleading message as a result.

This is done by appending the cause's `toString` representation to the
IllegalArgumentException messages instead of an hardcoded "cause".

Closes gh-32636
2024-04-16 16:25:42 +02:00