Commit Graph

31129 Commits

Author SHA1 Message Date
Sam Brannen
40ca83dfd4 Revise Bean Override internals and Javadoc 2024-09-28 17:13:24 +02:00
Juergen Hoeller
56f3a48879 Merge branch '6.1.x'
# Conflicts:
#	spring-context/src/main/java/org/springframework/context/aot/AbstractAotProcessor.java
2024-09-27 19:17:32 +02:00
Juergen Hoeller
9f4968ed05 Polishing 2024-09-27 19:16:12 +02:00
Juergen Hoeller
b6cfa2db0b Refine warn log message with advisor and ROLE_INFRASTRUCTURE hints
Closes gh-33184
2024-09-27 19:16:05 +02:00
Sébastien Deleuze
8e3846991d Reuse NoTransactionInContextException instances
New NoTransactionInContextException instances are created frequently in
TransactionContextManager#currentContext() when there is no transaction,
we could reuse the same instance instead to reduce the GC pressure.

Closes gh-33601
2024-09-27 17:45:02 +02:00
Sam Brannen
bed3025274 Restructure BeanOverrideBeanFactoryPostProcessor and improve documentation 2024-09-27 17:08:08 +02:00
Sam Brannen
ea8b8ae910 Polishing 2024-09-27 17:03:49 +02:00
Sam Brannen
9c746905bc Test status quo for Bean Override singleton semantics
The tests introduced in this commit reveal the following issues in our
Bean Override support.

- If a FactoryBean signals it does not manage a singleton, the Bean
  Override support silently replaces it with a singleton.

- An attempt to override a prototype-scoped bean or a bean configured
  with a custom scope results in one of the following.

  - If the bean type of the original bean definition is a concrete
    class, an attempt will be made to invoke the default constructor
    which will either succeed with undesirable results or fail with an
    exception if the bean type does not have a default constructor.

  - If the bean type of the original bean definition is an interface or
    a FactoryBean that claims to create a bean of a certain interface
    type, an attempt will be made to instantiate the interface which
    will always fail with a BeanCreationException.
2024-09-27 15:42:12 +02:00
Sam Brannen
c3ff6cf319 Reverse engineer documentation for Bean Override internals 2024-09-27 15:39:35 +02:00
Sam Brannen
ded5c13e19 Reinstate BeanOverrideTestSuite 2024-09-27 13:48:56 +02:00
Juergen Hoeller
594ed95f3c Replace transaction isolation synchronization with ReentrantLock
Closes gh-33546
2024-09-27 11:36:21 +02:00
Juergen Hoeller
8680c43368 Check for advisor-introduced interfaces specifically
See gh-31304
2024-09-27 11:07:11 +02:00
Juergen Hoeller
d3dd01e227 Adapt transactional test component declaration
See gh-33470
2024-09-27 11:06:30 +02:00
오영택
cc3948e14c feat: Implemented to throw a runtime error if a class has @Transactional 2024-09-27 10:59:52 +02:00
Tran Ngoc Nhan
e3cf23d15a remove unused keyword 2024-09-26 21:49:22 +02:00
Juergen Hoeller
07d281c6d8 Expose public constant for spring.aot.processing system property
Closes gh-33388
2024-09-26 18:31:36 +02:00
Juergen Hoeller
5326640f79 Initialize application context with initializer-given ServletContext
Closes gh-22319
2024-09-26 18:31:02 +02:00
Juergen Hoeller
13b49d41c3 Merge branch '6.1.x' 2024-09-26 15:30:39 +02:00
Juergen Hoeller
26054d1ab0 Fix TargetSource setup for valid proxy interface specification
See gh-31304
2024-09-26 15:26:31 +02:00
Juergen Hoeller
552a5cde36 Create CGLIB proxy in case of no target interfaces (just introductions)
Closes gh-31304
2024-09-26 14:48:42 +02:00
Yanming Zhou
8941e2876e Replace 'e.g.' with 'for example' in documentation and comments
Closes gh-33515
2024-09-26 14:11:17 +02:00
Sam Brannen
e55fe9077f Make DynamicPropertyRegistrarBeanInitializer public
In order to allow third parties (for example, Spring Boot) to ensure
that a DynamicPropertyRegistrarBeanInitializer has been registered in
an ApplicationContext which has not been customized by the
DynamicPropertiesContextCustomizer, this commit converts
DynamicPropertyRegistrarBeanInitializer to a public API for use in such
special use cases.

Closes gh-33593
2024-09-26 13:01:57 +02:00
Sam Brannen
b4bfb8952c Polishing 2024-09-26 12:18:57 +02:00
Sam Brannen
8e85dd0673 Fix error message for XML qualifier 'attribute' tag 2024-09-26 12:11:27 +02:00
Sam Brannen
b943bdeec2 Polishing 2024-09-25 17:28:47 +02:00
rstoyanchev
dea4f71846 Update contribution
Closes gh-33090
2024-09-25 16:09:01 +01:00
cfredri4
883f123583 Use only one timeout in JdkClientHttpRequest
Previously, a timeout was set both on HttpRequest, and used on
httpClient.sendAsync().get(). This leads to inconsistent behaviour
depending on which timeout gets triggered first.

See gh-33090
2024-09-25 16:09:01 +01:00
Juergen Hoeller
073cfd405b Merge branch '6.1.x' 2024-09-25 14:24:35 +02:00
Juergen Hoeller
f2b522211f Upgrade to Groovy 4.0.23 2024-09-25 14:23:23 +02:00
Juergen Hoeller
49da92b6a3 Avoid http URL String (making checkstyleNohttp happy)
See gh-33561
2024-09-25 13:53:34 +02:00
Juergen Hoeller
885f650911 Merge branch '6.1.x' 2024-09-25 12:46:37 +02:00
Juergen Hoeller
daa109e2ec Preserve URLStreamHandler in toRelativeURL and convertClassLoaderURL
Closes gh-33561
See gh-33199
2024-09-25 12:45:34 +02:00
Juergen Hoeller
ca0448260f Convert DateTimeException to expected IllegalArgumentException
Closes gh-33545
2024-09-25 12:45:20 +02:00
rstoyanchev
7051cddcf7 Align OutputStreamPublisher's
Align internal handling and contracts. The core copy could do without
those contracts, but it helps with alignment, and it's internal to
the implementation.

Closes gh-33592
2024-09-25 11:42:26 +01:00
rstoyanchev
f6c31bb6c3 Align OutputStreamPublisher's
Update constructors to match and drop unnecessary factory methods.

See gh-33592
2024-09-25 11:42:26 +01:00
rstoyanchev
113b430fab Align OutputStreamPublisher's
Apply recent nullability changes, and formatting differences.

See gh-33592
2024-09-25 11:42:26 +01:00
Sébastien Deleuze
a1613d1352 Merge branch '6.1.x' 2024-09-25 12:15:06 +02:00
Sébastien Deleuze
2ab0101b8a Add coroutine context tests for WebClientExtensions
Closes gh-33548
2024-09-25 12:14:50 +02:00
Illia Sorokoumov
478aa250a0 Preserve coroutine context in WebClientExtensions
See gh-33548
2024-09-25 11:46:30 +02:00
Sam Brannen
17f319b957 Upgrade to JUnit 5.11.1 2024-09-25 11:33:29 +02:00
Juergen Hoeller
8cfd6aed04 Separate internal ScheduledExecutorService for fixed-delay tasks
Closes gh-33408
2024-09-25 10:04:17 +02:00
Sébastien Deleuze
81a66a0334 Add an AbstractGenericHttpMessageConverter constructor
This commit adds a new
AbstractGenericHttpMessageConverter(Charset, MediaType...)
constructor, similar to the one present in
AbstractHttpMessageConverter.

Closes gh-33563
2024-09-24 19:40:15 +02:00
Juergen Hoeller
5f6b8d5582 Polishing 2024-09-24 18:59:17 +02:00
Juergen Hoeller
d6e4bd7c90 Resolve AOT factory method target by bean name and reduce reflective method exposure
Includes consistent withShortcut naming and consistent bean definition flag exposure.
Removes support for inner classes in alignment with standard core container behavior.

Closes gh-32834
2024-09-24 18:59:08 +02:00
Sam Brannen
aef5143642 Merge branch '6.1.x' 2024-09-24 16:50:12 +02:00
Sam Brannen
5cc4d0a2ca Do not invoke AotTestExecutionListener for @⁠DisabledInAotMode tests
Closes gh-33589
2024-09-24 16:47:48 +02:00
Sam Brannen
6da114054e Update comment 2024-09-24 15:49:35 +02:00
Sam Brannen
23528a5075 Merge branch '6.1.x' 2024-09-24 15:48:08 +02:00
Sam Brannen
602ac903ff Upgrade to JUnit 5.10.4 2024-09-24 15:39:53 +02:00
Sam Brannen
dae871b5d3 Clean up warnings in Gradle build 2024-09-24 12:34:20 +02:00