Commit Graph

1800 Commits

Author SHA1 Message Date
Brian Clozel
567265123b 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 gh-24887
2020-05-15 17:07:58 +02:00
Rossen Stoyanchev
b1224835be Add metadataPush support to RSocketRequester
Closes gh-24322
2020-05-14 15:42:43 +01:00
Brian Clozel
67547e61c6 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
gh-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 gh-24830
2020-05-13 21:29:02 +02:00
Rossen Stoyanchev
a64e7091e0 Deprecate support for RxJava 1.x
Closes gh-19628
2020-05-11 08:48:48 +01:00
stqp
73e3df5df5 Fix typo in core-beans.adoc
Closes gh-25040
2020-05-09 14:06:45 +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
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
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
Rossen Stoyanchev
147b8fb755 Turn off use of path extensions by default
Closes gh-23915
2020-05-05 08:04:40 +01:00
Rossen Stoyanchev
153690e717 Merge branch '5.2.x' 2020-05-04 10:55:25 +01:00
swapy
9288067ea8 Add missing @PathVariable declarations in examples
Closes gh-25006
2020-05-04 11:19:19 +02:00
Sam Brannen
1b4b4c3302 Support @TestConstructor config via JUnit Platform config param
This commit introduces support for setting the
spring.test.constructor.autowire.mode property via a JUnit Platform
configuration parameter -- for example, via the
junit-platform.properties file.

Closes gh-24285
2020-05-03 19:02:44 +02:00
Sam Brannen
69b4f33cfa Move spring-framework.png to src/docs folder
Since the spring-framework.png file is not used in the generated
reference manual, this commit moves the spring-framework.png file from
the src/docs/asciidoc/images folder up to the src/docs folder.
2020-04-29 16:25:02 +02:00
Sam Brannen
48d06a4291 Prune images folder for reference manual
This commit deletes unused files in the asciidoc/images folder.
2020-04-29 16:21:07 +02:00
martin-tarjanyi
3bc1d42dcd Integrate Apache http client with WebClient
This commit introduces a ClientHttpConnector implementation backed by
Apache HttpComponents HttpClient 5.0.

Fixes gh-24700
2020-04-29 15:02:09 +02:00
rahulmlokurte
0e9da17910 Fix typo in webmvc-functional.adoc
Closes gh-24968
2020-04-25 09:24:15 +02:00
Brian Clozel
dc4cda1b13 WARN against invalid patterns with PathPatternParser
As of gh-24952, `PathPatternParser` will strictly reject patterns with
`"**"` in the middle of them. `"**"` is only allowed at the end of the
pattern for matching multiple path segments until the end of the path.

Currently, if `"**"` is used in the middle of a pattern it will be
considered as a single `"*"` instead. Rejecting such cases should
clarify the situation.

This commit prepares for that upcoming change and:

* logs a warning message if such a case is used by an application
* expands the MVC and WebFlux documentation about URI matching in
general

Closes gh-24958
2020-04-23 13:03:05 +02:00
Brian Hartung
1658223e58 Fixed typo
Fixed another small documentation typo.
2020-04-15 14:20:35 +01:00
Brian Hartung
89775844ed Fixed typos
Fixed a couple of minor documentation typos
2020-04-15 14:20:35 +01:00
onnadi-sa
75457c440c Fix typo in webflux-functional.adoc
Closes gh-24906
2020-04-14 15:42:50 +02:00
Sam Brannen
6c26765985 Document default constructor as fallback for non-@Autowired constructors
Prior to this commit, it was unclear in the documentation that a default
constructor will be used by default for autowiring if multiple
constructors are present and none of them is annotated with @Autowired.

This commit improves the documentation in this regard.

Closes gh-24838
2020-04-07 14:35:40 +02:00
Juergen Hoeller
151a18d691 Explicit notes on BeanFactory.getType vs bean class in bean definition
Closes gh-24816
2020-04-03 21:11:07 +02:00
Sam Brannen
a842434bff Document precedence for @DynamicPropertySource
Closes gh-24837
2020-04-01 18:09:31 +02:00
Rossen Stoyanchev
99c2b1e242 Add snippet for maxInMemorySize config
See gh-23961
2020-03-31 17:08:12 +01:00
Sam Brannen
e26764d249 Remove duplicate words in documentation and polish Javadoc 2020-03-31 12:17:58 +02:00
Taehee Kim
8b3521d2bf Fix typo in webflux-cors.adoc
Closes gh-24815
2020-03-30 14:00:25 +02:00
Mikael Elm
822ca0130a Fix typos and improve readability in Webflux documentation
Closes gh-24781
2020-03-26 15:16:22 +01:00
Arjen Poutsma
9fb614a5c6 Clarify the role of views with Spring MVC
This commit adds a section to the reference docs that explains
views live within the trust boundary of the application, and the
security implications thereof.

Closes gh-24777
2020-03-25 15:05:50 +01:00
Sam Brannen
c24fa22a1b Polishing 2020-03-24 14:22:42 +01:00
Sam Brannen
4be358e47f Cross reference Dynamic Property Sources section 2020-03-24 14:07:56 +01:00
Sébastien Deleuze
1cd0e720f7 Specify that Kotlin code samples leverage kotlin-allopen 2020-03-24 10:31:57 +01:00
Sébastien Deleuze
60dca027e7 Add Kotlin documentation and tests for @DynamicPropertySource
See gh-24540
2020-03-24 10:08:37 +01:00
Sam Brannen
ac0363c94e Document @DynamicPropertySource support in the reference manual
Closes gh-24540
2020-03-23 20:43:38 +01:00
Sam Brannen
a90716522c Include Testcontainers in Further Resources section 2020-03-23 20:05:58 +01:00
Juergen Hoeller
bb1699a9d3 Revise documentation for autowiring with annotated constructors
Closes gh-24711
2020-03-23 18:01:30 +01:00
Sam Brannen
5be0db9259 Consistently refer to t_actor table 2020-03-22 20:32:45 +01:00
Sam Brannen
b52136dfa5 Revert renaming of local variable
This commit fixes the example by reverting the renaming of the local
Actor variable to avoid a conflict with a same-named variable already
in the current scope.

See gh-24398
2020-03-22 20:28:59 +01:00
Sam Brannen
edb5e73d48 Update Kotlin example based on feedback from @lnhrdt
See gh-24398
2020-03-18 15:34:27 +01:00
Sam Brannen
14f5032e97 Update Kotlin example
See gh-gh-24398
2020-03-17 19:22:26 +01:00
Sam Brannen
7dea2686b8 Polish contribution
See gh-24398
2020-03-17 15:06:10 +01:00
maxxedev
9b827283f1 Use more lambda expressions in data-access code examples
Closes gh-24398
2020-03-17 15:06:03 +01:00
Sviatoslav Hryb
018ba92214 Fix formatting in AOP examples in documentation 2020-03-09 14:44:41 +00:00
Sviatoslav Hryb
f5195887c9 Fix ampersands in AOP examples in documentation 2020-03-09 13:27:55 +00:00