New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#25263 fiexed in 5.2X #25341
#25263 fiexed in 5.2X #25341
Commits on May 7, 2020
-
-
-
Add Release pipeline for Milestone versions
This commit finishes the first step for migrating our complete build and release pipeline to Concourse CI. We're creating here a new "Release" jobs group in our pipeline. We can now release Milestones from our pipeline with: * the "stage-milestone" job, which creates and tags a new Milestone version on the source repository, builds the artifacts and deploys them in a staging repository and updates the version to the next SNAPSHOT. * the "promote-milestone" fetches the build information from the staging repository and promotes the released milestone in the official milestone repository. Interactions with the Artifactory and Bintray REST APIs are done using the https://github.com/spring-io/concourse-release-scripts project. Closes spring-projectsgh-22490
Commits on May 8, 2020
Commits on May 9, 2020
-
-
Honor TxMgmtConfigurer when @primary tx mgr is present in TCF
Prior to this commit, the Spring TestContext Framework (TCF) favored a @primary transaction manger over one configured via the TransactionManagementConfigurer API, and this contradicts the behavior in production Spring applications. This commit aligns the transaction manger lookup within the TCF so that a transaction manger configured via the TransactionManagementConfigurer API is properly favored over a @primary transaction manager. Closes spring-projectsgh-24869
Commits on May 10, 2020
Commits on May 11, 2020
-
-
-
Wrappers for native headers on the client side
Native server request headers have been wrapped rather than copied since 5.1. This commit applies the same change to the client side where, to make matters worse, headers were copied repeatedly on every access, see also previous commit ca897b95. For Netty and Jetty the wrappers are the same as on the server side but duplicated in order to remain package private. See spring-projectsgh-24680
-
Add mutate() to ClientResponse and deprecate from()
from() has the flaw of ignoring the body and it can't be fixed because applications are guaranteed to be setting it already and if set twice the builder drains the first body. mutate() is a better fit in any case for what needs to be done in a filter chain. It can be done more efficiently and is consistent with similar options on the server side. See spring-projectsgh-24680
-
Shortcut handling of bodyToFlux(DataBuffer.class)
Given that the body is a Flux<DataBuffer> there probably could be a Flux<DataBuffer> body(); At least bodyToFlux(DataBuffer.class) which is used when mutating and is a common case should not incur overhead. See spring-projectsgh-24680
-
Avoid parse cookies when mutating request or response
When mutating a ServerHttpRequest or ClientResponse, the respective builders no longer access cookies automatically which causes them to be parsed and does so only if necessary. Likewise re-applying the read-only HttpHeaders wrapper is avoided. See spring-projectsgh-24680
-
Align TransactionManagementConfigurer support in TCF with production
This commit picks up where 613bd3b left off by ensuring that a transaction manager configured via the TransactionManagementConfigurer API takes precedence over any transaction manager configured as a bean in the ApplicationContext unless @transactional is configured with a qualifier for the explicit transaction manager to use in tests. Closes spring-projectsgh-24869
-
-
Reject "/path/**/other" patterns in PathPatternParser
Prior to this commit, patterns like `"/path/**/other"` would be treated as `"/path/*/other"` (single wildcard, i.e. matching zero to many chars within a path segment). This will not match multiple segments, as expected by `AntPathMatcher` users or by `PathPatternParser` users when in patterns like `"/resource/**"`. This commit now rejects patterns like `"/path/**/other"` as invalid. This behavior was previously warned against since spring-projectsgh-24958. Closes spring-projectsgh-24952
-
Use weak ETags in VersionResourceResolver
Prior to this commit, the `VersionResourceResolver` implementations would write a strong ETag HTTP response header with the resolved version of the resource (the actual value depending on the chosen strategy). This approach doesn't work well when combined with HTTP compression. Web servers disable HTTP response copression in the presence of strong ETags since mutating the response body would break the contract. This commit changes this semantic and ensures that weak ETags are used instead. Closes spring-projectsgh-24898
Commits on May 12, 2020
-
-
Only proxy supported beans in BeanNameAutoProxyCreator
Prior to this commit, if a BeanNameAutoProxyCreator was configured with a custom TargetSourceCreator, the TargetSourceCreator was applied to all beans in the ApplicationContext. Thus, the list of supported beanNames was effectively ignored when applying any TargetSourceCreator. Consequently, if a TargetSourceCreator returned a non-null TargetSource for a given bean, the BeanNameAutoProxyCreator proxied the bean even if the bean name had not been configured in the beanNames list. This commit addresses this issue by ensuring that a custom TargetSourceCreator is only applied to beans whose names match the configured beanNames list in a BeanNameAutoProxyCreator. Closes spring-projectsgh-24915
-
-
-
Use computeIfAbsent in ResourceBundleMessageSource
This commit optimizes code in ResourceBundleMessageSource by using computeIfAbsent instead of putIfAbsent. In addition, the content of some Javadoc has been adjusted. Closes spring-projectsgh-25054
-
Avoid StringBuilder.append(Object) in ContentDisposition
This commit avoids invoking StringBuilder.append(Object) in favor of explicit method calls to append(String) and append(char) in ContentDisposition.escapeQuotationsInFilename(String). Closes spring-projectsgh-25056
-
-
-
Introduce resolvable timeout attribute on @transactional and <tx:method>
Placeholders get resolved in timeoutString, qualifier and labels now. Closes spring-projectsgh-25052
Commits on May 13, 2020
-
-
-
Internal cache of pre-filtered BeanPostProcessors (for faster iteration)
Also includes bulk addition in PostProcessorRegistrationDelegate. Closes spring-projectsgh-24681 Closes spring-projectsgh-24756
-
Add JMH benchmark infrastructure
Prior to this commit, the Spring Framework test suite would rely only on "Performance" tests associated with a specific CI build. As outlined in spring-projectsgh-24830, the way they're built and executed is not working well anymore. This commit introduces a new JMH benchmark infrastructure in the build. The goal here is not to run those benchmarks as part of a CI build, but rather provide a proper infrastructure for writing and locally running micro-benchmarks when working on specific optimizations. This commit adds and configures a Gradle JMH plugin to allow for JMH benchmark classes in Spring Framework modules (in `src/jmh/java` of each `spring-*` module). It's also relaxing the checkstyle rules for JMH classes, especially around Javadoc rules: this code is not meant to have Javadocs. Finally, this commit links to a new Wiki page on the project GitHub repository documenting the infrastructure and helping contributors to run and design benchmarks. See spring-projectsgh-24830
-
Prior to this commit, `MediaType.parseMediaType` would already rely on the internal LRU cache in `MimeTypeUtils` for better performance. With that optimization, the parsing of raw media types is skipped for cached elements. But still, `MediaType.parseMediaType` would first get a cached `MimeType` instance from that cache and then instantiate a `new MediaType(type, subtype, parameters)`. This constructor not only replays the `MimeType` checks on type/subtyme tokens and parameters, but it also performs `MediaType`-specific checks on parameters. Such checks are not required, as we're using an existing `MimeType` instance in the first place. This commit adds a new protected copy constructor (skipping checks) in `MimeType` and uses it in `MediaType.parseMediaType` as a result. This yields interesting performance improvements, with +400% throughput and -40% allocation/call in benchmarks. This commit also introduces a new JMH benchmark for future optimization work. Closes spring-projectsgh-24769
-
Explicit nullability declarations for all AOP Alliance methods
Includes consistent declarations in AOP Alliance related Spring AOP code. Closes spring-projectsgh-24117
-
# Conflicts: # build.gradle # spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java # spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationInterceptor.java
-
Commits on May 14, 2020
Commits on May 15, 2020
-
-
Avoid using regex matching for static patterns
Prior to this commit (and the previous one), the `AntPathStringMatcher` (inner class of `AntPathmatcher`) would compile `Pattern` instances and use regex matching even for static patterns such as `"/home"`. This change introduces a shortcut in the string matcher algorithm to skip the `Pattern` creation and uses `String` equality instead. Static patterns are quite common in applications and this change can bring performance improvements, depending on the mix of patterns configured in the web application. In benchmarks (added with this commit), we're seeing +20% throughput and -40% allocation. This of course can vary depending on the number of static patterns configured in the application. Closes spring-projectsgh-24887
-
Add GenericConversionService JMH benchmark
This commit removes some of the deprecated "PERFORMANCE" tests and turns them into JMH benchmarks. See spring-projectsgh-24830
Commits on May 18, 2020
Commits on May 19, 2020
-
-
Shared read-only instance of UrlPathHelper
In many places UrlPathHelper is created and used without any customizations, in some cases repeatedly. This commit adds a shared read-only UrlPathHelper instance with default settings. See spring-projectsgh-25100
-
-
-
Fix ExceptionHandlerExceptionResolver.setResponseBodyAdvice behaviour
Prior to this commit, calling the `setResponseBodyAdvice` method would clear all existing `ResponseBodyAdvice` instances present in the list before adding provided one. This behavior is inconsistent with the Javadoc and other implementations. This brings the method in line with the existing documentation. See spring-projectsgh-24204
Commits on May 20, 2020
Commits on May 22, 2020
-
-
# Conflicts: # spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateQueryTests.java # spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcTemplateTests.java
Commits on May 24, 2020
Commits on May 25, 2020
-
Add dependency on BouncyCastle for JDK 15+
With a recent upgrade to an early access build for JDK 15, ServerHttpsRequestIntegrationTests began failing since Netty's SelfSignedCertificate could not be properly initialized. This commit adds a test fixture dependency on BouncyCastle which is now needed by Netty's SelfSignedCertificate on JDK 15 or higher, since JDK 15 no longer supports the javax.security.cert.X509Certificate. See: https://bugs.openjdk.java.net/browse/JDK-8241039
Commits on May 26, 2020
-
Avoid duplicate addition of void.class in ClassUtils
This commit avoids duplicate addition of void.class to the temporary primitiveTypes Set in the static initialization block in ClassUtils. Closes spring-projectsgh-25128
-
Introduce EntityManager initialization callbacks
JpaVendorAdapter.postProcessEntityManager and EntityManagerFactoryInfo.createNativeEntityManager SPI, plus convenient setEntityManagerInitializer configuration options. Closes spring-projectsgh-25125
-
Upgrade to Groovy 3.0.4, RxJava 3.0.4, Undertow 2.1.1, EclipseLink 2.…
…7.7, Caffeine 2.8.4, Apache Johnzon 1.2.6, Protobuf 3.12.1
Commits on May 27, 2020
Commits on May 28, 2020
Commits on May 29, 2020
-
-
-
Switch to Reactor 2020.0.0 snapshots
A switch to RSocket 1.0.1 snapshots is also required to pick up a for froward compatibility with Reactor Netty 1.0. See spring-projectsgh-25085
-
Deprecate InstantiationAwareBeanPostProcessorAdapter
Consistently relying on default methods in the corresponding interfaces. Closes spring-projectsgh-25165
Commits on Jun 2, 2020
-
-
Refactor method name dispatching to switch statements
This commit refactors method name dispatching to switch statements in WebSphereClassPreDefinePlugin. Closes spring-projectsgh-25170
-
Commits on Jun 3, 2020
Commits on Jun 4, 2020
Commits on Jun 5, 2020
-
Respect MediaType charset in Jackson converters
Before this commit, AbstractJackson2HttpMessageConverter and subclasses did not check media type encoding in the canRead and canWrite methods. As a result, the converter reported that it can write (for instance) "application/json;charset=ISO-8859-1", but in practice wrote the default charset (UTF-8). This commit fixes that bug. See: spring-projectsgh-25076
-
Respect MimeType charset in Jackson codecs
Before this commit, Jackson2CodecSupport and subclasses did not check media type encoding in the supportsMimeType method (called from canEncode/canDecode). As a result, the encoder reported that it can write (for instance) "application/json;charset=ISO-8859-1", but in practice wrote the default charset (UTF-8). This commit fixes that bug. Closes: spring-projectsgh-25076
-
Commits on Jun 6, 2020
-
# Conflicts: # build.gradle # spring-test/src/main/java/org/springframework/mock/http/server/reactive/MockServerHttpRequest.java # spring-web/src/main/java/org/springframework/http/HttpHeaders.java # spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/MockServerHttpRequest.java
-
-
# Conflicts: # build.gradle # spring-test/src/main/java/org/springframework/mock/http/server/reactive/MockServerHttpRequest.java # spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/MockServerHttpRequest.java # spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClientBuilder.java
Commits on Jun 8, 2020
Commits on Jun 9, 2020
Commits on Jun 10, 2020
-
Rethrow XMLStreamExceptions as DecodingExceptions
Prior to this commit, Jaxb2XmlDecoder and XmlEventDecoder threw XMLStreamExceptions instead of DecodingExceptions (as the Decoder contract defines). This commit resolves this issue. Closes: spring-projectsgh-24778
-
-
Commits on Jun 11, 2020
-
-
# Conflicts: # spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java # spring-context-support/src/main/java/org/springframework/cache/jcache/config/AbstractJCacheConfiguration.java
-
-
Commits on Jun 12, 2020
-
Add tests for Assert.noNullElements(Collection, ...)
Commit 4000b24 introduced new variants for noNullElements in org.springframework.util.Assert. This commit adds the corresponding tests to AssertTests. Closes spring-projectsgh-25239
-
-
Commits on Jun 13, 2020
-
Ensure spring-core JAR is reproducible
Prior to this commit, a change to Javadoc in any class in spring-core would result in ALL tests in the entire test suite being re-run via the Gradle build. Thanks to a tip from @melix, this commit ensures that the spring-core JAR is "reproducible".
-
Commits on Jun 14, 2020
Commits on Jun 15, 2020
Commits on Jun 16, 2020
-
Support user-defined key type in JDBC KeyHolder
Prior to this commit, the JDBC KeyHolder API only supported keys of type Number. However, a generated key can be a UUID or something else, and developers shouldn't have to go manually through complex collections to access it. This commit adds a new getKeyAs(Class<T> keyType) method to the KeyHolder API that allows the user to specify the key type. Closes spring-projectsgh-24655
-
-
- The compiler is configured to retain compatibility with Kotlin 1.3. - Explicit API mode is not yet enabled but could be in the future. - A workaround for Gradle build is required for now, see https://youtrack.jetbrains.com/issue/KT-39610 for more details. - Some exceptions thrown by Kotlin have changed to NullPointerException, see https://youtrack.jetbrains.com/issue/KT-22275 for more details. Closes spring-projectsgh-24171
-
Make DispatcherServlet.properties loading lazy
With spring-projects#25209, DispatcherServlet.properties loading and parsing will be useless for most of use cases, and it requires configuration on GraalVM native images. The purpose of this issue to make such loading and parsing lazy, only invoked in getDefaultStrategies() if needed. Closes spring-projectsgh-25257
-
-
Use try-with-resources language construct where feasible
Closes spring-projectsgh-2063 Co-authored-by: igor-suhorukov <igor.suhorukov@gmail.com>
Commits on Jun 17, 2020
-
-
-
-
Rollback reactive transaction on cancel
This commit introduces a change in reactive transaction semantics for cancel signals. Canceling a subscription now rolls back a reactive transaction to achieve a deterministic transaction outcome. Previously, cancel signals committed a transaction which could cause partially committed transactions depending on when the cancel happened.
-
This commit introduces support for R2DBC ("Reactive Relational Database Connectivity") with custom ConnectionFactory implementations, a functional DatabaseClient for SQL execution, transaction management, a bind marker abstraction database initialization utilities, and exception translation. Closes spring-projectsgh-25065
Commits on Jun 18, 2020
-
-
-
-
-
Polish ResourceBundleMessageSourceTests
- suppress warnings - make tests faster (by sleeping less)
-
Align DispatcherServlet defaults for Java and XML
Prior to this commit some of the default strategies defined for the DispatcherServlet weren't included in the default configuration for both Java and XML configuration. The following default beans have been added to the configuration with the name as expected by the DispatcherServlet: - org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver - org.springframework.web.servlet.theme.FixedThemeResolver - org.springframework.web.servlet.support.SessionFlashMapManager - org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator Closes spring-projectsgh-25209
-
Support multi-value X-Forwarded-Prefix headers
Prior to this commit, the Forwarded headers for Spring MVC and Spring WebFlux did not support multiple prefix values for the `"X-Forwarded-Prefix"` HTTP header. This commit splits and processes multiple prefixes defined in the dedicated header. Closes spring-projectsgh-25254
-
Revert "Upgrade to Kotlin 1.4 M2"
This reverts commit 2a74eff. Some regressions require to wait at least Kotlin 1.4 M3.
-
-
-
Provide a flag to disable SpEL support
This commit introduces a spring.spel.ignore system property which when set to true avoid initializing SpEL infrastructure. A typical use case is optimizing GraalVM native image footprint for applications not using SpEL. In order to be effective, those classes should be initialized at build time: - org.springframework.context.support.AbstractApplicationContext - org.springframework.core.SpringProperties - org.springframework.context.event.EventListenerMethodProcessor Closes spring-projectsgh-25153
Commits on Jun 19, 2020
-
Provide a flag to disable XML support
This commit introduces a spring.xml.ignore system property which when set to true avoid initializing XML infrastructure. A typical use case is optimizing GraalVM native image footprint for applications not using XML. In order to be effective, those classes should be initialized at build time: - org.springframework.util.DefaultPropertiesPersister - org.springframework.core.io.support.PropertiesLoaderUtils - org.springframework.web.servlet.function.support.RouterFunctionMapping - org.springframework.web.client.RestTemplate - org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver - org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport - org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter - org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter - org.springframework.http.codec.support.BaseDefaultCodecs - org.springframework.beans.PropertyEditorRegistrySupport Closes spring-projectsgh-25151
-
-
-
-
Fix Reactor Core DirectProcessor deprecation
As of reactor/reactor-core#2188, `DirectProcessor` variants are deprecated. This commit replaces them with the new `FluxIdentityProcessor` variant. See spring-projectsgh-25085
-
-
Commits on Jun 20, 2020
-
-
Disable and remove unsupported features from native images
This commit removes load time weaving, CGLIB and Objenesis support from native images. GraalDetector has been removed for now because of oracle/graal#2594. It should be reintroduced when this bug will be fixed with NativeImageDetector class name. Closes spring-projectsgh-25179
-
Fix an AllEncompassingFormHttpMessageConverter regression
Restore previous behavior to configure Jaxb2RootElementHttpMessageConverter when JAXB but not Jackson are present. Closes spring-projectsgh-25291
-
-
Commits on Jun 21, 2020
Commits on Jun 22, 2020
-
Adjust WebFlux behavior for @RequestPart List<T>
List<T> support was added relatively late, incorrectly decoding each part to T which means no way to decode a single part to List<T> and thatis the most common case (vs multipart parts with the same name). This behavior was further misaligned with Spring MVC as well as with the behavior for T[]. Closes spring-projectsgh-22973
-
-
Restore use of tcpConfiguration method
The method wasn't available at first but has been added since to allow being compatible with both Reactor Netty 0.9 and 1.0. See spring-projectsgh-25085
-
Use MonoProcessor instead of FluxIdentityProcessor
We just need to signal completion when close() is called. MonoProcessor should suffice and we can avoid a hard dependency on Reactor 3.4. See spring-projectsgh-25085
-
-
-
Commits on Jun 23, 2020
-
Reduce String creation in BeanPropertyRowMapper
Prior to this commit the BeanPropertyRowMapper used String.substring and String.toLowerCase to parse the field names. This would generate more String than needed. Instead one could iterate over the internal char[] of the String and use the Character methods instead. This reduces the String creation. Closes spring-projectsgh-25301
-
-
# Conflicts: # spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj
-
-
-
-
Use JDBC 4 API for connection validation
With this commit use the JDBC 4.0 isValid method to validate the connection. This is favorable over a validation query.
-
-
-
-
-
Commits on Jun 24, 2020
-
Direct matches by URL path work again
This commit fixes a recent regression as a result of 5225a57 with the determination of non-pattern vs pattern URLs. That in turn affects the ability to perform direct matches by URL path. There is also a fix in PathPattern to recognize "catch-all" patterns as pattern syntax. See spring-projectsgh-24945
-
(Re)introduce DefaultMultipartMessageReader
This commit introduces the DefaultMultipartMessageReader, a fully reactive multipart parser without third party dependencies. An earlier version of this code was introduced in fb642ce, but removed again in 77c24aa because of buffering issues. Closes spring-projectsgh-21659
-
This commit removes the UndertowDataBuffer, in favor of using regular DataBuffers from the DataBufferFactory. During the development of the DefaultPartHttpMessageReader, it was determined that invoking various slicing and releasing operators on the UndertowDataBuffer resulted in memory leaks. This commit fixes that.
-
-
Use @SafeVarargs in Jackson builder and factory
Using @SafeVarargs in Jackson mapper builder and factory bean classes allows the varargs methods to be used without a compiler warning. The implementations of these methods do not perform unsafe operations on their varargs parameter. It is therefore safe to add this annotation. The following two methods are changed: - add @SafeVarargs to Jackson2ObjectMapperBuilder#modulesToInstall and make it final - add @SafeVarargs to Jackson2ObjectMapperFactoryBean#setModulesToInstall and make it final This is a backwards incompatible change as these methods now have to be declared final. Existing subclasses that override one of these methods will break. Closes spring-projectsgh-25311
-
Prior to this commit, the Gradle build failed due to a varargs warning. See spring-projectsgh-25311
-
-
-
Commits on Jun 26, 2020
Commits on Jun 27, 2020
Commits on Jun 29, 2020
-
Check for valid IPv6 host in UriComponentsBuilder.fromUriString
PR spring-projectsgh-358 introduced a "scheme but no host" check in the fromHttpUrl() method in UriComponentsBuilder, but a similar check was not added to fromUriString() at that time. This commit introduces a "scheme but no host" check in fromUriString() to align with the functionality in fromHttpUrl(). Note, however that the regular expressions used to match against the hostname or IP address are inexact and still permit invalid host names or IP addresses. True validation of the host portion of the URI is out of scope for this commit. Closes spring-projectsgh-25334
Commits on Jun 30, 2020
-
fixed Overloaded @bean method causes bean to be created twice and oth…
…er bean not to be created spring-projects#25263
wangguogang committedJun 30, 2020 -
wangguogang committed
Jun 30, 2020