Commit Graph

23033 Commits

Author SHA1 Message Date
Sam Brannen
49c8cb5a60 Merge branch '5.3.x' 2021-10-13 19:23:18 +02:00
Sam Brannen
89c7797ffb Commit in DatabasePopulatorUtils if Connection has auto-commit=false
Prior to this commit, DatabasePopulatorUtils.execute(...) did not
perform a commit for the current Connection. This works for most use
cases; however, when DatabasePopulatorUtils is used to execute
initialization scripts without a managed transaction -- for example,
via a DataSourceInitializer configured as a bean in the
ApplicationContext or via Spring Boot configuration in
application.properties -- if the underlying database is configured with
auto-commit=false, the results of executing the SQL scripts are not
committed to the database which can lead to data being silently lost.

This commit addresses this issue by committing the Connection for the
supplied DataSource if the connection is not configured for auto-commit
and is not transactional. Existing use cases running with a managed
transaction should therefore not be affected by this change.

Closes gh-27008
2021-10-13 19:10:09 +02:00
Rossen Stoyanchev
28a497f3b3 Merge branch '5.3.x' into main 2021-10-13 14:58:07 +01:00
Rossen Stoyanchev
4dac8339ff Filter non-existing static resource locations
Same as a2c52a97ba, on the WebFlux side.

See gh-27538
2021-10-13 14:40:34 +01:00
Rossen Stoyanchev
0436dd04bf Correctly handle coroutine with ResponseEntity
ResponseEntityResultHandler nests correctly, only once for the ResponseEntity,
when there is a Mono adapted from a Kotlin Continuation.

Closes gh-27292
2021-10-13 14:40:34 +01:00
Hantsy Bai
1e3996ea78 Upgrade SmallRye Mutiny to 1.1.1
Closes gh-27555
2021-10-13 15:27:02 +02:00
Sam Brannen
95da027397 Merge branch '5.3.x' 2021-10-13 14:03:23 +02:00
Koen Punt
50b92118a9 Include correct keyword in CookieAssertions failure messages
Closes gh-27550
2021-10-13 14:02:55 +02:00
Koen Punt
daf10d6c45 Include correct keyword in CookieAssertions failure messages
Closes gh-27550
2021-10-13 14:00:29 +02:00
Juergen Hoeller
627fc7612d Merge branch '5.3.x'
# Conflicts:
#	build.gradle
2021-10-13 13:06:44 +02:00
Juergen Hoeller
b1c7f7d127 Polishing 2021-10-13 12:48:47 +02:00
Juergen Hoeller
0f36569d75 Remove dead fallback code 2021-10-13 12:38:39 +02:00
Juergen Hoeller
2cbba0923b Upgrade to Netty 4.1.69, Jetty 9.4.44, Kotlin 1.5.31 2021-10-13 12:38:06 +02:00
Rossen Stoyanchev
a74031454c Merge branch '5.3.x' into main 2021-10-12 16:31:16 +01:00
Sam Brannen
8820c893e6 Add note about Groovy Tools not working in Eclipse 2021-09 with Java 17
Closes gh-27407
2021-10-12 17:23:55 +02:00
Rossen Stoyanchev
800922266a Upgrade to Reactor 2021.0.12
Closes gh-27527
2021-10-12 16:23:18 +01:00
Juergen Hoeller
da457abd5b Merge branch '5.3.x' 2021-10-12 15:19:40 +02:00
Juergen Hoeller
eda3ca5fbc Remove unnecessary final declarations at method level 2021-10-12 15:17:44 +02:00
Juergen Hoeller
e4934a90eb Use TriggerContext's Clock instead of new Date()
Closes gh-27546
2021-10-12 15:17:18 +02:00
Juergen Hoeller
715f300fa1 Avoid expensive isReadable() check during classpath scan
Closes gh-25741
See gh-21372
2021-10-12 15:15:51 +02:00
Juergen Hoeller
b53275f2d2 Add efficient existence check to ClassPathResource.isReadable()
Includes reduced isReadable() check in PathResourceLookupFunction, aligned with PathResourceResolver.

Closes gh-27538
See gh-21372
2021-10-12 15:13:05 +02:00
Juergen Hoeller
1490d27d75 Decouple urlResourceWithCharset test from existence of tmp directory
See gh-25738
2021-10-12 15:10:19 +02:00
Rossen Stoyanchev
7957b9cc0f Merge branch '5.3.x' into main 2021-10-12 12:00:55 +01:00
Rossen Stoyanchev
a2c52a97ba Filter non-existing static resource locations
See gh-27538
2021-10-12 11:59:55 +01:00
Sam Brannen
87cb84b832 Merge branch '5.3.x' 2021-10-12 12:27:55 +02:00
Sam Brannen
5bd90538b3 Introduce test for gh-27499 and polish contribution 2021-10-12 12:22:24 +02:00
Nick
50ccb1bfcd Avoid duplicate JCacheOperationSource bean registration in <cache:annotation-driven />
In our application we use XML context and <cache:annotation-driven />
declaration. Also we disable bean definition duplication by setting
GenericApplicationContext.setAllowBeanDefinitionOverriding(false) in an
ApplicationContextInitializer. This combination leads to a
BeanDefinitionOverrideException because the
DefaultJCacheOperationSource bean is registered twice.

 - once for: parserContext.getReaderContext().registerWithGeneratedName(sourceDef);
 - once for: parserContext.registerBeanComponent(new BeanComponentDefinition(sourceDef, sourceName));

This commit refactors JCacheCachingConfigurer.registerCacheAspect(...)
so that the JCacheOperationSource bean is registered only once.

Closes gh-27499
2021-10-12 12:05:30 +02:00
Stephane Nicoll
276aa46a1c Polish 2021-10-11 16:22:30 +02:00
Stephane Nicoll
d16574f807 Merge branch '5.3.x' 2021-10-11 16:21:14 +02:00
Stephane Nicoll
83eac9af18 Upgrade CI to github-release resource 1.5.5
Closes gh-27459
2021-10-11 16:18:35 +02:00
Sam Brannen
eb07dea795 Polish contribution
See gh-27544
2021-10-11 15:31:40 +02:00
Сергей Цыпанов
114fa47171 Use Arrays.hashCode() in ByteArrayResource.hashCode() 2021-10-11 15:28:50 +02:00
Sam Brannen
f479668938 Merge branch '5.3.x' 2021-10-11 15:00:00 +02:00
Sam Brannen
63fac1b7c8 Allow default CacheAwareContextLoaderDelegate configuration via system property
Prior to this commit, the default CacheAwareContextLoaderDelegate could
be configured by extending AbstractTestContextBootstrapper and
overriding getCacheAwareContextLoaderDelegate(); however, this required
that the user configure the custom TestContextBootstrapper via
@BootstrapWith.

This commit introduces a new
"spring.test.context.default.CacheAwareContextLoaderDelegate" property
that can be configured via a JVM system property or via the
SpringProperties mechanism. BootstrapUtils uses this new property to
load the default CacheAwareContextLoaderDelegate. If the property is
not defined, BootstrapUtils will fall back to creating a
DefaultCacheAwareContextLoaderDelegate as it did previously.

This allows third parties to configure the default
CacheAwareContextLoaderDelegate transparently for the user -- for
example, to intercept context loading in order to load the context in a
different manner -- for example, to make use of ahead of time (AOT)
techniques for implementing a different type of ApplicationContext at
build time.

Closes gh-27540
2021-10-11 14:59:09 +02:00
Rossen Stoyanchev
bd85cb8bac Merge branch '5.3.x' into main 2021-10-11 11:20:14 +01:00
Rossen Stoyanchev
e8f6cd10a5 Apply value formatting to resolved exceptions 2021-10-11 11:14:02 +01:00
Sam Brannen
1709d609c2 Merge branch '5.3.x' 2021-10-10 23:26:14 +02:00
Sam Brannen
47b8e8d528 Upgrade to Mockito 4 2021-10-10 23:26:07 +02:00
Sam Brannen
22f0f9f3df Merge branch '5.3.x' 2021-10-08 21:31:03 +02:00
Sam Brannen
bdfd983bb4 Fix example code formatting in @EnableWebMvc 2021-10-08 21:30:39 +02:00
Juergen Hoeller
56eefe2a13 Merge branch '5.3.x' 2021-10-08 20:42:54 +02:00
Juergen Hoeller
87aaf5049b Polishing 2021-10-08 20:41:51 +02:00
Juergen Hoeller
4b01370f54 UriTemplateRequestEntity overrides equals/hashCode
Closes gh-27531
2021-10-08 20:41:18 +02:00
Sam Brannen
fa3a2dc981 Upgrade to AspectJ 1.9.8 RC1 for Java 17 support
See gh-27537
2021-10-08 19:33:30 +02:00
Rossen Stoyanchev
f14bd50033 Prune empty method adapter classes 2021-10-08 18:20:09 +01:00
Rossen Stoyanchev
e3b48c23dd Remove AsyncRestTemplate and related types 2021-10-08 17:59:53 +01:00
Sam Brannen
932291b867 Polishinig 2021-10-08 14:00:23 +02:00
Brian Clozel
6e92c4d674 Improve Questions section in CONTRIBUTING doc
Closes gh-27509
2021-10-08 11:08:38 +02:00
Rossen Stoyanchev
ccb080f948 Merge branch '5.3.x' into main 2021-10-07 16:55:35 +01:00
Rossen Stoyanchev
b6111d04a5 Ensure WebClientResponseException for malformed response
Closes gh-27262
2021-10-07 16:50:53 +01:00