Commit Graph

23874 Commits

Author SHA1 Message Date
Sébastien Deleuze
1ffc96be8c Fix queriedMethods handling in ReflectionHintsSerializer
Closes gh-28212
2022-03-22 09:59:55 +01:00
Sam Brannen
d11389e783 Merge branch '5.3.x' 2022-03-21 17:13:30 +01:00
Sam Brannen
8fc744f4f4 Improve Javadoc for BeanExpressionResolver 2022-03-21 16:57:27 +01:00
Sam Brannen
fae36e98b4 Remove obsolete code in R2dbcTransactionManager
See gh-28059
Closes gh-28202
2022-03-21 16:21:08 +01:00
Sam Brannen
3da7a48a17 Explicitly close ApplicationContexts and clean up warnings in tests 2022-03-20 13:19:25 +01:00
Sam Brannen
7f4e09e994 Merge branch '5.3.x'
# Conflicts:
#	spring-context/src/test/java/org/springframework/context/event/PayloadApplicationEventTests.java
#	spring-context/src/test/java/org/springframework/context/groovy/GroovyApplicationContextTests.java
#	spring-context/src/test/java/org/springframework/format/datetime/joda/DateTimeFormatterFactoryBeanTests.java
#	spring-context/src/test/java/org/springframework/format/datetime/joda/DateTimeFormatterFactoryTests.java
#	spring-context/src/test/java/org/springframework/format/datetime/joda/JodaTimeFormattingTests.java
#	spring-context/src/test/java/org/springframework/format/support/FormattingConversionServiceTests.java
#	spring-context/src/test/java/org/springframework/remoting/rmi/RmiSupportTests.java
#	spring-context/src/test/java/org/springframework/scripting/support/StandardScriptFactoryTests.java
#	spring-web/src/test/java/org/springframework/remoting/caucho/CauchoRemotingTests.java
#	spring-web/src/test/java/org/springframework/remoting/httpinvoker/HttpComponentsHttpInvokerRequestExecutorTests.java
2022-03-20 12:55:39 +01:00
Sam Brannen
9a5891e6e6 Explicitly close ApplicationContexts and clean up warnings in tests
This commit also ensures that various test methods actually test
something now.
2022-03-20 12:34:56 +01:00
Sam Brannen
dd30da1282 Upgrade to Gradle 7.4.1 2022-03-20 11:24:02 +01:00
Stephane Nicoll
0cbea29517 Polish 2022-03-18 18:25:30 +01:00
Sam Brannen
5c540e5390 Apply "instanceof pattern matching" in core annotation support 2022-03-18 17:24:01 +01:00
Sam Brannen
2fb1dd177b Remove obsolete org.springframework.core.NestedIOException
This commit removes Spring's custom NestedIOException and replaces its
usage with the standard IOException which has supported a root cause
since Java 6.

Closes gh-28198
2022-03-18 16:56:56 +01:00
Sam Brannen
b570f60560 Merge branch '5.3.x'
# Conflicts:
#	spring-aop/src/main/java/org/springframework/aop/support/AopUtils.java
#	spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationClassFilter.java
#	spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMatchingPointcut.java
#	spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMethodMatcher.java
#	spring-beans/src/main/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessor.java
#	spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java
#	spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedNotification.java
#	spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedOperationParameter.java
#	spring-core/src/main/java/org/springframework/javapoet/support/package-info.java
#	spring-core/src/main/java/org/springframework/util/TypeUtils.java
#	spring-web/src/main/java/org/springframework/http/HttpMethod.java
2022-03-18 16:47:12 +01:00
Sam Brannen
64b64d9ba0 Stop referring to features as "Java 5" features
With a Java 8 baseline in place for quite some time now, it no longer
makes sense to refer to features such as annotations as "Java 5
annotations".

This commit also removes old `Tiger*Tests` classes, thereby avoiding
duplicate execution of various tests.
2022-03-18 16:32:30 +01:00
Sam Brannen
1419172fbd Polish Javadoc for JMX support 2022-03-18 15:25:35 +01:00
Stephane Nicoll
f6192fea47 Upgrade to Tomcat 10.0.18 2022-03-17 15:01:26 +01:00
Stephane Nicoll
98e23e5148 Merge branch '5.3.x' 2022-03-17 12:29:06 +01:00
Spring Builds
420e0ba25f Next development version (v5.3.18-SNAPSHOT) 2022-03-17 10:51:02 +00:00
Sam Brannen
fc8f31ccfb Deprecate "enclosing classes" search strategy for MergedAnnotations
This commit deprecates the TYPE_HIERARCHY_AND_ENCLOSING_CLASSES search
strategy for MergedAnnotations in 6.0 M3, allowing consumers of 6.0
milestones and release candidates to provide feedback before
potentially completely removing the search strategy or providing an
alternate mechanism for achieving the same goal prior to 6.0 GA.

Closes gh-28079
See gh-28080
2022-03-16 19:34:38 +01:00
Mark Paluch
a3781a45d6 Align with R2DBC 0.9 API changes
Adopt to R2DBC Parameter type, deprecate our own one in favor of the R2DBC type.
Add support for extensible transaction definitions and support to consume Readable and result segments.
Return Long instead of Integer in DatabaseClient update in preparation for R2DBC 1.0 changes.
2022-03-16 19:27:14 +01:00
Sam Brannen
fd34533a3e Merge branch '5.3.x' 2022-03-16 19:24:37 +01:00
Sam Brannen
29d98285be Add warning to "enclosing classes" search strategy for MergedAnnotations
This commit adds a warning to the Javadoc for the
TYPE_HIERARCHY_AND_ENCLOSING_CLASSES search strategy in
MergedAnnotations with regard to the scope of the search
algorithm.

See gh-28079
2022-03-16 19:23:27 +01:00
Sam Brannen
ad708780ed Polish Javadoc for MergedAnnotations 2022-03-16 19:23:27 +01:00
Stephane Nicoll
84568e8dbc Merge branch '5.3.x' 2022-03-16 18:16:52 +01:00
Stephane Nicoll
8789b34ef8 Upgrade to Tomcat 9.0.60 2022-03-16 18:07:38 +01:00
Sébastien Deleuze
77e0100f42 Implement GraalVM native JSON configuration generation
This commit implements 4 package private Json serializers
for JavaSerializationHints, ProxyHints, ReflectionHints
and ResourceHints to serialize GraalVM native JSON configuration
as documented in
https://www.graalvm.org/22.0/reference-manual/native-image/BuildConfiguration/.

It exposes the related functionality via
NativeConfigurationGenerator which allows to generate the
relevant files on the filesystem via the
FileNativeConfigurationGenerator implementation.

The generated *-config.json files have been validated working
with GraalVM 22.0.

Closes gh-27991
2022-03-16 16:15:58 +01:00
Sam Brannen
bb9cf7cce1 Merge branch '5.3.x' 2022-03-16 15:29:22 +01:00
Sam Brannen
c9cd53f469 Revert "Deprecate "enclosing classes" search strategy for MergedAnnotations"
This reverts commit 5689395678.

See gh-28079
2022-03-16 15:27:52 +01:00
Sam Brannen
ae51ca9bca Revert "Remove deprecated "enclosing classes" search strategy for MergedAnnotations"
This reverts commit 819d4256b7.

See gh-28080
2022-03-16 15:18:34 +01:00
Sam Brannen
9764f0e59b Merge branch '5.3.x'
# Conflicts:
#	spring-test/src/test/java/org/springframework/mock/http/server/reactive/MockServerHttpRequestTests.java
#	spring-web/src/test/java/org/springframework/http/server/reactive/HeadersAdaptersTests.java
#	spring-web/src/test/java/org/springframework/web/client/RestTemplateIntegrationTests.java
#	spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java
#	spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SseIntegrationTests.java
#	spring-webmvc/src/test/java/org/springframework/web/servlet/handler/MappedInterceptorTests.java
#	spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HandlerMethodAnnotationDetectionTests.java
#	spring-websocket/src/test/java/org/springframework/web/socket/AbstractWebSocketIntegrationTests.java
2022-03-16 15:07:53 +01:00
Sam Brannen
c462fe30ed Use Named arguments in parameterized tests 2022-03-16 14:45:47 +01:00
Sam Brannen
8a0c4caff6 Polish Javadoc 2022-03-16 14:33:52 +01:00
Juergen Hoeller
c3aed75b92 Merge branch '5.3.x'
# Conflicts:
#	build.gradle
2022-03-16 11:24:24 +01:00
Juergen Hoeller
46363c337b Avoid confusing debug log entries with DataClassRowMapper
Closes gh-28179
2022-03-16 11:21:43 +01:00
Juergen Hoeller
c1261f2860 Fix accidental exclusion of BeanMapEmitter class
Closes gh-28110
2022-03-16 11:20:49 +01:00
Juergen Hoeller
c4c124b16d Upgrade to Log4J 2.17.2, SLF4J 1.7.36, Netty 4.1.75, SmallRye Mutiny 1.4, Hibernate Validator 6.2.3, Mockito 4.4, HtmlUnit 2.59 2022-03-16 11:19:57 +01:00
Juergen Hoeller
0a1ce75c7c Upgrade to Groovy 4.0.1, Log4J 2.17.2, SLF4J 1.7.36, Netty 4.1.75, SmallRye Mutiny 1.4, Jetty Reactive HttpClient 3.0.5, Hibernate ORM 5.6.6, Hibernate Validator 7.0.4, Mockito 4.4, HtmlUnit 2.59 2022-03-16 10:32:51 +01:00
rstoyanchev
e7b97f5be7 Merge branch '5.3.x' into main 2022-03-16 09:27:43 +00:00
rstoyanchev
ee7f60000e Polishing contribution
Closes gh-28105
2022-03-16 05:56:47 +00:00
azzureman
f1fdc11fab Support custom HTTP status in MockClientHttpResponse
See gh-28105
2022-03-16 05:56:23 +00:00
rstoyanchev
21d61316be Unwrap MappingJacksonValue before selecting ObjectMapper
See gh-28045
2022-03-16 05:55:58 +00:00
rstoyanchev
cb39b07088 Polishing Jackson encoder tests 2022-03-16 05:55:23 +00:00
Stephane Nicoll
03179aa397 Merge pull request #28057 from philwebb
* pr/28057:
  Polish contribution
  Provide more control over factory failure handling
  Allow flexible constructor arguments in factory implementations

Closes gh-28057
2022-03-15 20:48:32 +01:00
Stephane Nicoll
da45bd2dfd Polish contribution
See gh-28057
2022-03-15 20:19:46 +01:00
Phillip Webb
12244b2e51 Provide more control over factory failure handling
Add an additional `FactoryInstantiationFailureHandler` strategy
interface to `SpringFactoriesLoader` to allows instantiation
failures to be handled on a per-factory bases.

For example, to log trace messages for only factories that can't
be created the following can be used:

	FactoryInstantiationFailureHandler.logging(logger);

If no `FactoryInstantiationFailureHandler` instance is supplied
then `FactoryInstantiationFailureHandler.throwing()` is used
which provides back-compatible behavior by throwing an
`IllegalArgumentException`.

See gh-28057

Co-authored-by: Madhura Bhave <bhavem@vmware.com>
Co-authored-by: Andy Wilkinson <wilkinsona@vmware.com>
2022-03-15 20:19:46 +01:00
Phillip Webb
0b716c4f90 Allow flexible constructor arguments in factory implementations
Update `SpringFactoriesLoader` so that factory implementation classes
can have a constructor with arguments that are resolved dynamically.

Arguments are resolved using a `ArgumentResolver` interface that is
passed to the `loadFactories` method. This strategy interface is
intentionally simple and only allows resolution based on the argument
type. A number of convenience methods are provided to allow resolvers
to be built. For example:

	ArgumentResolver.of(String.class, "tests")
			.and(Integer.class, 123);

Factory implementation classes must have a non-ambiguous constructor
in order to be instantiated. The `SpringFactoriesLoader` uses the same
algorithm as `BeanUtils.getResolvableConstructor`.

See gh-28057

Co-authored-by: Madhura Bhave <bhavem@vmware.com>
Co-authored-by: Andy Wilkinson <wilkinsona@vmware.com>
2022-03-15 20:19:46 +01:00
Sébastien Deleuze
ae1956cac7 Merge branch '5.3.x' 2022-03-15 18:35:59 +01:00
danthonywalker
50771237cc Fix ListableBeanFactory#findAnnotationOnBean extension return type
Closes gh-26908
2022-03-15 18:33:35 +01:00
Sam Brannen
1392b0f557 Merge branch '5.3.x' 2022-03-15 17:13:10 +01:00
Sam Brannen
9fbf5dc945 Use String#lastIndexOf(int) where possible 2022-03-15 17:03:20 +01:00
Sam Brannen
4db2f8ea1b Remove obsolete Nashorn-based scripting tests
Since the Nashorn JavaScript engine was removed in Java 15, these tests
will never be run on a Java 17+ JDK which is required as of Spring
Framework 6.0.

See gh-27919
2022-03-15 16:33:52 +01:00