Commit Graph

25406 Commits

Author SHA1 Message Date
rstoyanchev
16ea4692ba Drop Servlet 4 classpath check 2022-10-07 18:14:41 +01:00
rstoyanchev
1afc1fc90d Fix regression in AbstractJackson2Encoder
Closes gh-29274
2022-10-07 18:14:41 +01:00
Sam Brannen
b3afafbf5a Merge branch '5.3.x' 2022-10-07 18:02:25 +02:00
Sam Brannen
a599601dd9 Document how to switch to the default set of TestExecutionListeners
Closes gh-29281
2022-10-07 17:58:22 +02:00
Sébastien Deleuze
a9cd45e7f2 Improve BindingReflectionHintsRegistrar extensibility
This commit introduces a shouldSkipType(Class<?> type) method
and changes shouldRegisterMembers(Class<?> type) to
shouldSkipMembers(Class<?> type).

Closes gh-29279
2022-10-07 17:50:15 +02:00
Sébastien Deleuze
bbe285dd42 Polish RegisterReflectionForBinding support
Implementation and Javadoc refinements.

See gh-29279
2022-10-07 17:50:15 +02:00
Sam Brannen
1d052742d1 Throw IOException in FileSystemResource.getURI() for consistency
See gh-29275
2022-10-07 17:06:54 +02:00
Sam Brannen
72307bbb20 Polish contribution
See gh-28549
2022-10-07 16:35:55 +02:00
hebo
2434470457 Optimize SpEL and property placeholder support for @Async qualifiers
See gh-27818
Closes gh-28549
2022-10-07 16:22:18 +02:00
Sam Brannen
64412907f7 Merge branch '5.3.x'
# Conflicts:
#	spring-test/src/main/java/org/springframework/test/util/AopTestUtils.java
2022-10-07 16:12:21 +02:00
Sam Brannen
5eee4673c1 Document limitation of AopTestUtils.getUltimateTargetObject() regarding non-static TargetSource
Closes gh-29276
2022-10-07 16:09:39 +02:00
Sam Brannen
0985da23f9 Fix WebMvcConfigurationSupportTests due to change in previous commit 2022-10-07 14:15:41 +02:00
Sam Brannen
3138001391 Allow spring-webmvc to be imported into Eclipse IDE again 2022-10-07 14:12:45 +02:00
Sam Brannen
ba42deb7db Remove obsolete code 2022-10-07 14:12:04 +02:00
Sam Brannen
66989434b4 Introduce unit tests for gh-29275 2022-10-07 14:02:11 +02:00
Sam Brannen
23b3fc7f3c Polish FileSystemResource 2022-10-07 14:01:07 +02:00
Sam Brannen
7175c4ca9a Normalize URIs returned from FileSystemResource.getURI()
Prior to this commit, if a FileSystemResource was created from a
java.nio.file.Path or java.nio.file.FileSystem, the URI returned from
getURI() was based on the semantics of Path#toUri() which always
includes the "authority component" (i.e., "//") after the scheme (e.g.,
"file://..."). In contrast, if a FileSystemResource is created from a
java.io.File or String, the URI returned from getURI() never includes
the "authority component" due to the semantics of File#toURI().

Consequently, invoking myFileSystemResource.getURI().toString() could
result in "file:/my/path" or "file:///my/path", depending on how the
FileSystemResource was created.

This behavior is not new; however, recent changes in
PathMatchingResourcePatternResolver -- which result in a
FileSystemResource being created from a java.nio.file.Path instead of
from a java.io.File -- make this difference more noticeable to users
and may in fact surface as a breaking change.

To address that issue, this commit revises the implementation of
FileSystemResource.getURI() by normalizing any `file:` URIs that it
returns. Effectively, URIs like "file:///my/path" will now take the
form "file:/my/path".

See gh-29163
Closes gh-29275
2022-10-07 13:27:08 +02:00
Sam Brannen
af617c7da9 Disable failing test until gh-29275 is addressed 2022-10-07 12:40:55 +02:00
Sam Brannen
c405e742f4 Merge branch '5.3.x'
# Conflicts:
#	spring-core/src/test/java/org/springframework/core/io/support/PathMatchingResourcePatternResolverTests.java
2022-10-07 12:39:24 +02:00
Sam Brannen
8caed88c14 Test status quo for URI/URL for scanned filesystem resources
See gh-29275
2022-10-07 12:17:27 +02:00
Stephane Nicoll
635534c1ad Describe naming conventions of GeneratedMethods#add
Closes gh-28997
2022-10-07 12:05:57 +02:00
Stephane Nicoll
c74760540d Polish 2022-10-07 11:42:55 +02:00
Sam Brannen
3dc60f1627 Backport changes to PathMatchingResourcePatternResolverTests 2022-10-07 11:01:02 +02:00
Brian Clozel
ca88eeb1ae Start building against Context Propagation 1.0.0 SNAPSHOTs 2022-10-07 08:38:14 +02:00
Stephane Nicoll
a16afe8e10 Describe the replacement use case for BeanRegistrationAotProcessor
Closes gh-29126
2022-10-06 16:42:17 +02:00
Juergen Hoeller
6027be5a39 Ignore overridden factory methods for unique candidate resolution
See gh-27920
2022-10-06 15:06:53 +02:00
Brian Clozel
455a736a01 Switch to Micrometer 1.10.0-SNAPSHOT
See gh-29241
2022-10-06 14:08:07 +02:00
Brian Clozel
6b0f6e9f27 Apply Gradle Test Retry plugin
The plugin is configured to detect flaky tests and retry them 3 times
when running on the CI, but still reports failures. This will provide a
standard way to detect flaky tests as failures and successful attempts
are shown in the tests report.
2022-10-06 13:54:28 +02:00
Iain Henderson
b8243e6f84 Support CBOR and Protobuf with Kotlin Serialization
This commit introduces support for CBOR and Protobuf using Kotlin
serialization. Support comes in the form of Encoder/Decoder as well
as HttpMessageConverters. Seperate abstract base classes supply support
for binary and string (de)serialization.

The exising JSON codecs and message converters have been migrated to
use the new base classes.

Closes gh-27628
2022-10-06 13:51:50 +02:00
rstoyanchev
b6c2e8de23 Support context propagation for Spring MVC controllers
Closes gh-29056
2022-10-06 12:43:54 +01:00
rstoyanchev
d581d48d24 Polishing ResponseBodyEmitterReturnValueHandlerTests 2022-10-06 12:43:54 +01:00
Stephane Nicoll
0d5c78d992 Polish 2022-10-06 13:33:58 +02:00
Juergen Hoeller
2a1807895e Upgrade to Tomcat 10.1 in web tests
Adapting to FileUpload API change: no FileItemFactory constructor argument anymore.
2022-10-06 12:33:56 +02:00
Juergen Hoeller
326335f903 Upgrade to Tomcat 10.1
Includes Jetty 11.0.12, Hibernate ORM 5.6.12, HtmlUnit 2.65
2022-10-06 12:09:05 +02:00
Juergen Hoeller
b45a48461f Polishing 2022-10-06 12:03:25 +02:00
Juergen Hoeller
aedef9321a Merge AOT constructor and factory method resolution into ConstructorResolver
This moves related code into the same class, unifies candidate determination for constructors and factory methods, and gets rid of the package cycle around the hard-coded Autowired annotation check (which is implicitly coming from AutowiredAnnotationBeanPostProcessor via the determineCandidateConstructors SPI now). The API entry point for AOT pre-resolution purposes is in RegisteredBean.

Closes gh-27920
2022-10-06 11:59:11 +02:00
Juergen Hoeller
3af0c232b7 ProxyFactoryBean determines actual proxy class in getObjectType()
AopProxy implementations accept empty Advisor chains for early proxy class creation.

Closes gh-29097
2022-10-06 11:54:06 +02:00
Stephane Nicoll
efaee61f31 Harmonize accessors of RuntimeHints API
Closes gh-29269
2022-10-06 09:36:17 +02:00
rstoyanchev
ffe2ba4c7b Undo constructor deprecation + polishing 2022-10-05 20:04:39 +01:00
Sam Brannen
30f1eee4d0 Polish Javadoc and implementation of ClassPathResource 2022-10-05 20:24:17 +02:00
Sam Brannen
61cc7c0a93 Prepare TestAotProcessor to make it abstract and remove the main() method
See gh-29266
2022-10-05 20:03:52 +02:00
Sam Brannen
05d6c4c9b2 Polishing 2022-10-05 20:02:44 +02:00
Sam Brannen
647e811e47 Restructure AopTestUtilsTests 2022-10-05 19:13:51 +02:00
Sam Brannen
66395502db Polishing 2022-10-05 19:06:15 +02:00
Sam Brannen
26e485ce40 Make TestClassScanner package private again
TestClassScanner was made public with the assumption that Spring Boot's
AOT testing support might need to work directly with that class; however,
it turns out that Spring Boot does not currently have such a need.

In light of that, this commit restores TestClassScanner's visibility to
package private.
2022-10-05 19:06:15 +02:00
Sam Brannen
98801f8a5b Consistently declare RuntimeHints parameter 1st in test AOT APIs 2022-10-05 19:06:15 +02:00
Sam Brannen
935265048a Simplify TestRuntimeHintsRegistrar API
Prior to this commit, the TestRuntimeHintsRegistrar API combined
processing of MergedContextConfiguration and test classes. However, it
appears that only spring-test internals have a need for registering
hints based on the MergedContextConfiguration. For example, Spring
Boot's AOT testing support has not had such a need, and it is assumed
that third parties likely will not have such a need.

In light of that, this commit simplifies the TestRuntimeHintsRegistrar
API so that it focuses on processing of a single test class.

In addition, this commit moves the hint registration code specific to
MergedContextConfiguration to an internal mechanism.

Closes gh-29264
2022-10-05 18:37:06 +02:00
Sam Brannen
7ad65b8dff Allocate more memory to Checkstyle tasks 2022-10-05 17:06:12 +02:00
Sam Brannen
8869ca27b1 Ensure ClassPathResources with same path have same hash code
This commit aligns the hashCode() implementation in ClassPathResource
with the recent change to the logic in equals().

See gh-29263
2022-10-05 16:58:08 +02:00
Sam Brannen
1082119c50 Polishing 2022-10-05 16:49:38 +02:00