Commit Graph

21624 Commits

Author SHA1 Message Date
Rossen Stoyanchev
2f80a085f5 Merge ClientResponse and related improvements
Closes gh-24680
2020-05-11 08:49:54 +01:00
Rossen Stoyanchev
94824e30a4 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 gh-24680
2020-05-11 08:49:28 +01:00
Rossen Stoyanchev
0e9ecb6c99 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 gh-24680
2020-05-11 08:49:28 +01:00
Rossen Stoyanchev
67a06f5edc 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 gh-24680
2020-05-11 08:49:28 +01:00
Rossen Stoyanchev
c908ec1937 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 gh-24680
2020-05-11 08:49:28 +01:00
Rossen Stoyanchev
df99889aa6 Avoided repeated creation of ReadOnlyHttpHeaders wrapper
See gh-24680
2020-05-11 08:49:28 +01:00
Rossen Stoyanchev
3276f81851 Avoid one layer of HttpHeaders wrapping
See gh-24680
2020-05-11 08:49:28 +01:00
Rossen Stoyanchev
a64e7091e0 Deprecate support for RxJava 1.x
Closes gh-19628
2020-05-11 08:48:48 +01:00
Rossen Stoyanchev
7f59381c7d Add support for RxJava 3
Closes gh-24170
2020-05-11 08:48:48 +01:00
Sam Brannen
3f30dcae80 Merge branch '5.2.x' 2020-05-10 15:44:57 +02:00
Yanming Zhou
50a4fdac6e Use Map::computeIfAbsent to simplify scope implementations
Closes gh-25038
2020-05-10 15:41:00 +02:00
Sam Brannen
613bd3be1d 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 gh-24869
2020-05-09 20:09:27 +02:00
Sam Brannen
745cfcb161 Upgrade tests to TestNG 7.1
See gh-24298
2020-05-09 17:36:34 +02:00
stqp
73e3df5df5 Fix typo in core-beans.adoc
Closes gh-25040
2020-05-09 14:06:45 +02:00
Sam Brannen
2dc9020f80 Merge branch '5.2.x' 2020-05-09 13:57:41 +02:00
Sam Brannen
f5d011cb82 Filter reactive tx managers in TransactionAttributeSourceClassFilter
Prior to this commit, the TransactionAttributeSourceClassFilter
filtered out PlatformTransactionManager but not
ReactiveTransactionManager implementations.

TransactionAttributeSourceClassFilter now filters out any
TransactionManager implementation, covering both imperative and
reactive transaction managers.
2020-05-09 13:57:03 +02:00
Sam Brannen
29fe8cecbb Merge branch '5.2.x' 2020-05-08 19:49:56 +02:00
Sam Brannen
ec3d647d1d Update spring-tx.xsd regarding reactive tx mgmt support
Closes gh-25030
2020-05-08 19:49:00 +02:00
Sam Brannen
8f7debc769 Merge branch '5.2.x' 2020-05-08 19:26:00 +02:00
Sam Brannen
0f22a5e409 Update Javadoc regarding reactive tx mgmt support
See gh-25030
2020-05-08 19:25:22 +02:00
Sam Brannen
1e64ffa7ba Merge branch '5.2.x' 2020-05-08 18:19:17 +02:00
Sam Brannen
e1b2cafb33 Polish reactive transaction mgmt documentation in reference manual
See gh-25030
2020-05-08 18:13:31 +02:00
Mark Paluch
7fbdc3ad11 Document ReactiveTransactionManager support in reference manual
See gh-25030.
2020-05-08 16:11:02 +02:00
Rossen Stoyanchev
f3c616ca72 Merge branch '5.2.x' 2020-05-08 14:30:33 +01:00
Rossen Stoyanchev
706446a660 Deprecate unused method 2020-05-08 14:30:10 +01:00
Rossen Stoyanchev
8a59a63ade Merge branch '5.2.x' 2020-05-08 09:38:50 +01:00
Rossen Stoyanchev
19ba9087f5 HttpHeaders#equals handles wrapping correctly
Closes gh-25034
2020-05-08 09:37:37 +01:00
Rossen Stoyanchev
1da903dd59 Add PartHttpMessageWriter
Closes gh-24535
2020-05-08 07:54:50 +01:00
Brian Clozel
5af3223e76 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 gh-22490
2020-05-07 21:35:56 +02:00
Sam Brannen
21800a5fa6 Polish @Transactional documentation in reference manual 2020-05-07 18:42:02 +02:00
Yanming Zhou
247662de6b Fix @Transactional syntax error in reference manual
Closes gh-25021
2020-05-07 18:10:50 +02:00
Sam Brannen
4e8a6b9695 Merge branch '5.2.x' 2020-05-07 12:37:08 +02:00
Sam Brannen
4805288122 Use SingletonSupplier for XStream instance in XStreamMarshaller
Closes gh-25017
2020-05-07 12:35:32 +02:00
Sam Brannen
4ca64684f6 Merge branch '5.2.x' 2020-05-06 18:52:00 +02:00
Sam Brannen
ce11fdfa80 Fix concurrency issues in XStreamMarshaller
Prior to this commit, if an instance of XStreamMarshaller was used
concurrently from multiple threads without having first invoked the
afterPropertiesSet() method, the private `xstream` field could be
initialized multiple times resulting in a ConcurrentModificationException
in XStream's internal DefaultConverterLookup.

This commit fixes these concurrency issues by making the `xstream` field
volatile and by implementing a double-checked locking algorithm in
getXStream() to avoid concurrent instance creation.

Closes gh-25017
2020-05-06 18:49:47 +02:00
Sam Brannen
740f0d766f Polish XStreamMarshallerTests 2020-05-06 18:17:09 +02:00
Juergen Hoeller
e9cded560d Introduce JdbcTransactionManager with SQLExceptionTranslator support
Closes gh-24064
2020-05-06 16:41:35 +02:00
Mark Paluch
2aa8aef216 Extend transaction attributes with labels
TransactionAttribute now exposes a labels attribute that associates a
descriptive array of labels with a transaction.

Labels may be of a pure descriptive nature or may get evaluated by
transaction managers to associate technology-specific behavior
with the actual transaction.
2020-05-06 16:28:21 +02:00
Rossen Stoyanchev
3e736898a6 Merge branch '5.2.x' 2020-05-06 14:31:58 +01:00
Rossen Stoyanchev
53e018362f Update samples to latest RSocket API
A follow-up fix on the upgrade to 1.0 RC7 in gh-24934,
2020-05-06 14:28:18 +01:00
Sam Brannen
12e05280ad Upgrade to AssertJ 3.16 2020-05-06 15:22:23 +02:00
Sam Brannen
b1c1a232ca Upgrade to Gradle 6.4
Closes gh-25020
2020-05-06 14:25:41 +02:00
Brian Clozel
1b85f6277d Upgrade to Concourse Java Script v0.0.3
This new release has been updated with the version scheme changes.
2020-05-06 13:53:24 +02:00
Sam Brannen
084b4003d1 Upgrade to openjdk-15-ea+21 for CI builds 2020-05-06 12:18:04 +02:00
Rossen Stoyanchev
76e58405b8 Merge pull request #24926 from kobaeugenea/master
Closes gh-24296
2020-05-06 10:53:37 +01:00
Rossen Stoyanchev
5883ea2721 Polishing contribution
See gh-24926
2020-05-06 10:53:25 +01:00
Evgenii Koba
e15ed44a68 Make HtmlUnitRequestBuilder handle form data file properly
See gh-18551
2020-05-06 10:53:25 +01:00
Rossen Stoyanchev
04bbc2ac2b Merge pull request #24406 from parviz/93-22083-uri-template
Closes gh-24406
2020-05-06 10:51:28 +01:00
Rossen Stoyanchev
f28e08eceb Improving contribution
See gh-24406
2020-05-06 10:50:51 +01:00
Parviz ROzikov
816466e492 #24406 - Add String based URI template variants 2020-05-06 10:50:51 +01:00