Commit Graph

496 Commits

Author SHA1 Message Date
Sam Brannen d57bc176f2 Merge branch '5.3.x' 2022-01-10 14:21:25 +01:00
Sam Brannen df263d01b9 Use idiomatic AssertJ assertions for true, false, and null 2022-01-10 14:15:55 +01:00
Sam Brannen 61c3d7a989 Merge branch '5.3.x' 2022-01-04 14:09:02 +01:00
Sam Brannen 3e14cdbc69 Polish tests 2022-01-04 14:02:32 +01:00
Juergen Hoeller 9dc5c9f935 Merge branch '5.3.x'
# Conflicts:
#	build.gradle
2021-12-15 21:52:16 +01:00
Juergen Hoeller d665977787 Polishing 2021-12-15 21:50:30 +01:00
Juergen Hoeller 37bebeaaaf Accept protected @Transactional/Cacheable methods on CGLIB proxies
Closes gh-25582
2021-12-14 09:41:23 +01:00
Arjen Poutsma 81af7330f6 Deprecate StringUtils::trimWhitespace and variants
This commits deprecates
- StringUtils::trimWhitespace in favor of String::strip
- StringUtils::trimLeadingWhitespace in favor of String::stripLeading
- StringUtils::trimTrailingWhitespace in favor of String::stripTrailing

Closes gh-27769
2021-12-06 13:37:16 +01:00
Juergen Hoeller 7f43128a0e Merge branch '5.3.x'
# Conflicts:
#	build.gradle
#	spring-web/src/main/java/org/springframework/web/server/MediaTypeNotSupportedStatusException.java
#	spring-web/src/main/java/org/springframework/web/util/ContentCachingRequestWrapper.java
#	spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMappingIntrospector.java
2021-12-03 22:42:05 +01:00
Juergen Hoeller 14f24f43d7 Polishing 2021-12-03 22:36:31 +01:00
Juergen Hoeller 4750a9430c Early removal of 5.x-deprecated code
Closes gh-27686
2021-11-18 09:18:06 +01:00
Juergen Hoeller 0e1ba7aae5 Merge branch '5.3.x'
# Conflicts:
#	build.gradle
#	spring-context/src/main/java/org/springframework/context/annotation/Lazy.java
2021-11-09 22:39:58 +01:00
Juergen Hoeller 8d735e6e60 Note on PersistenceExceptionTranslator sorting and non-singleton retrieval
Closes gh-26412
2021-11-09 22:30:44 +01:00
Sam Brannen e9cf645b86 Apply "instanceof pattern matching" in spring-tx
This commit also applies additional clean-up tasks such as the following.

- final fields

This has only been applied to `src/main/java`.
2021-10-14 22:18:01 +02:00
Sam Brannen 2d1e0d5e38 Merge branch '5.3.x' 2021-10-06 12:13:21 +02:00
Sam Brannen 41ae9632d1 Upgrade to Checkstyle 9.0 and spring-javaformat 0.0.29
This commit upgrades the Gradle build to use Checkstyle 9.0 and
spring-javaformat 0.0.29 (which internally uses Checkstyle 8.45.1).

Closes gh-27520
2021-10-06 12:11:19 +02:00
Rossen Stoyanchev c1856d24e2 Merge branch '5.3.x' into main 2021-10-05 14:52:45 +01:00
Rossen Stoyanchev 7b9848a352 Replace deprecated Reactor Context related methods 2021-10-05 14:33:52 +01:00
Sam Brannen 030ba52805 Merge branch '5.3.x' 2021-09-29 16:56:33 +02:00
Sam Brannen 96e4d3a530 Fail Gradle build for Javadoc warnings
In order to catch Javadoc errors in the build, we now enable the
`Xwerror` flag for the `javadoc` tool. In addition, we now use
`Xdoclint:syntax` instead of `Xdoclint:none` in order to validate
syntax within our Javadoc.

This commit fixes all resulting Javadoc errors and warnings.

This commit also upgrades to Undertow 2.2.12.Final and fixes the
artifact names for exclusions for the Servlet and annotations APIs.

The incorrect exclusion of the Servlet API resulted in the Servlet API
being on the classpath twice for the javadoc task, which resulted in the
following warnings in previous builds.

javadoc: warning - Multiple sources of package comments found for package "javax.servlet"
javadoc: warning - Multiple sources of package comments found for package "javax.servlet.http"
javadoc: warning - Multiple sources of package comments found for package "javax.servlet.descriptor"
javadoc: warning - Multiple sources of package comments found for package "javax.servlet.annotation"

Closes gh-27480
2021-09-29 14:02:37 +02:00
Sam Brannen 93efb20a53 Fix broken links in Javadoc
This commit removes several links that were broken due to the removal
of various APIs in 6.0.

See gh-27480
2021-09-28 13:34:33 +02:00
Juergen Hoeller d84ca2ba90 Jakarta EE 9 migration
Upgrades many dependency declarations; removes old EJB 2.x support and outdated Servlet-based integrations (Commons FileUpload, FreeMarker JSP support, Tiles).

Closes gh-22093
Closes gh-25354
Closes gh-26185
Closes gh-27423
See gh-27424
2021-09-17 09:14:07 +02:00
Phillip Webb 52b03e3326 Migrate CoroutinesUtils to Java
Migrate `CoroutinesUtils` from Kotlin code to Java and drop the
`kotlin-coroutines` module.

This update removes the need for Kotlin tooling IDE plugins to be
installed.

Closes gh-27379
2021-09-13 17:39:45 +02:00
Brian Clozel cecc0849a8 Upgrade to Gradle 7.2
This commit upgrades Gradle to 7.2.
Gradle configuration names are updated accordingly.
This also upgrades Gradle build plugins.

See gh-26870
2021-09-13 09:37:35 +02:00
Philippe Marschall debf61b948
Remove unused private loggers
Closes gh-27336
2021-08-30 16:51:59 +02:00
Juergen Hoeller a07c7865a5 Lazy initialization of transaction UUID (with deprecated getter methods)
Includes removal of trace logging for individual synchronization steps.

Closes gh-26955
2021-07-09 15:07:30 +02:00
Sam Brannen a2ef6badc4 Use StringBuilder.append(char) where possible
To slightly improve performance, this commit switches to
StringBuilder.append(char) instead of StringBuilder.append(String)
whenever we append a single character to a StringBuilder.

Closes gh-27098
2021-06-25 10:44:28 +02:00
Sam Brannen da9ee06e05 Improve @Transactional docs regarding method visibility
Closes gh-27003
2021-05-30 17:10:01 +02:00
Sam Brannen 1e1045ba42 Doc tx semantics for @TransactionalEventListener after completion phases
This commit improves the Javadoc regarding transactional semantics for
@TransactionalEventListener methods invoked in the AFTER_COMMIT,
AFTER_ROLLBACK, or AFTER_COMPLETION phase. Specifically, the
documentation now points out that interactions with the underlying
transactional resource will not be committed in those phases.

Closes gh-26974
2021-05-26 14:21:08 +02:00
Sébastien Deleuze 3dba3691a7 Upgrade to Coroutines 1.5.0
This commit upgrades to Coroutines 1.5.0 while retaining
Coroutines 1.4.x compatibility.

Closes gh-26897
2021-05-17 11:37:02 +02:00
Juergen Hoeller 7f670bbe68 TransactionSynchronization does not support @Order (just Ordered interface)
See gh-21725
2021-05-11 15:45:05 +02:00
Juergen Hoeller 3c9bd3177e Move getListenerId method to Smart/GenericApplicationListener
See gh-26638
2021-03-09 12:30:52 +01:00
Juergen Hoeller 86902d27b2 Expose id/getListenerId in base EventListener/ApplicationListener (pulled up from tx)
Includes removeApplicationListeners(Predicate) method in ApplicationEventMulticaster.

Closes gh-26638
2021-03-08 19:31:56 +01:00
Sam Brannen 3215880d08 Remove Javadoc link to private method 2021-02-21 19:13:02 +01:00
Sam Brannen 2d29fcd0bb Polish Javadoc for TransactionSynchronizationUtils 2021-01-27 14:03:38 +01:00
Sam Brannen 5e56162394 Fix Checkstyle violation
The @since tag must come before @see tags.

See gh-26450
2021-01-27 11:53:20 +01:00
Johnny Lim 45650f2b27
Add @since tag to TransactionSynchronizationUtils.unwrapResourceIfNecessary()
Closes gh-26450
2021-01-27 11:23:22 +01:00
Sam Brannen 4a7a2258f9 Unwrap proxied DataSources in SqlScriptsTestExecutionListener
Prior to this commit, if the DataSource in the
DataSourceFromTransactionManager was wrapped in a proxy implementing
InfrastructureProxy, SqlScriptsTestExecutionListener would throw an
exception stating that the DataSource in the ApplicationContext and the
DataSource in the DataSourceFromTransactionManager were not the same.

This commit unwraps both data sources and compares the underlying
target instances to check for equality.

In addition, this commit makes the unwrapResourceIfNecessary() method in
TransactionSynchronizationUtils public.

Closes gh-26422
2021-01-22 18:22:00 +01:00
Juergen Hoeller 2ee231dee2 Document that @Transactional does not propagate to new threads
Closes gh-25439
2020-11-17 14:43:17 +01:00
Juergen Hoeller 51b1306d70 Move coroutines invocation decision to invokeWithinTransaction
See gh-26092
2020-11-16 17:41:09 +01:00
Sébastien Deleuze 737d77a739 Fix @Transactional support on functions returning Flow
Closes gh-26052
2020-11-09 17:45:28 +01:00
Sébastien Deleuze 1f13516528 Fix @Transactional support on suspending function
With this commit, @Transactional on suspending functions
returning a value now commits the transaction properly.

Closes gh-25998
2020-11-09 17:43:31 +01:00
Sébastien Deleuze 32238cc996 Add CoroutinesAnnotationTransactionInterceptorTests
suspendingValueSuccess() currently fails due to an
unexpected rollback on transactional suspending functions
returning a value.

See gh-25998
2020-11-09 10:19:24 +01:00
Sébastien Deleuze d80dd50c9d Add CoroutinesAnnotationTransactionInterceptorTests
suspendingValueSuccess() currently fails due to an
unexpected rollback on transactional suspending functions
returning a value.

See gh-25998
2020-11-09 10:11:39 +01:00
Sébastien Deleuze bdf120f1ef Add CoroutinesAnnotationTransactionInterceptorTests
suspendingValueSuccess() currently fails due to an
unexpected rollback on transactional suspending functions
returning a value.

See gh-25998
2020-11-09 10:10:25 +01:00
Sébastien Deleuze e781d21097 Add CoroutinesAnnotationTransactionInterceptorTests
suspendingValueSuccess() currently fails due to an
unexpected rollback on transactional suspending functions
returning a value.

See gh-25998
2020-11-09 10:10:13 +01:00
Sébastien Deleuze 5170f3f594 Fix a Kotlin test compile warning 2020-10-27 09:41:59 +01:00
Juergen Hoeller 0aa3205e38 Fix nullability warnings 2020-10-26 22:19:26 +01:00
Sébastien Deleuze a2ff03074f Polishing 2020-10-26 09:57:30 +01:00
Sébastien Deleuze 5429c7afeb Support suspending functions annotated with @Transactional
This commit makes TransactionInterceptor and TransactionAspectSupport
Coroutines aware, adapting Reactive transaction support to Coroutines.

Suspending functions returning a Flow are handled like Flux, for other
return types, they are handled like Mono.

Closes gh-23575
2020-10-25 18:33:42 +01:00