Commit Graph

1813 Commits

Author SHA1 Message Date
康智冬 1e0bdc0337 Fix typo in DispatcherServlet Javadoc
Closes gh-23726
2019-09-29 16:22:48 +02:00
Juergen Hoeller 2861fc65bd Polishing 2019-09-27 10:17:56 +02:00
Juergen Hoeller bd70f10d2b Merge branch '5.1.x'
# Conflicts:
#	build.gradle
#	spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java
#	spring-aspects/spring-aspects.gradle
#	spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java
#	spring-beans/src/main/java/org/springframework/beans/factory/support/GenericBeanDefinition.java
#	spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java
#	spring-orm/spring-orm.gradle
#	spring-test/spring-test.gradle
2019-09-25 12:43:24 +02:00
Juergen Hoeller bb6f9bb6d4 Polishing 2019-09-25 12:14:48 +02:00
Sebastien Deleuze 97026f1ec3 Fix ServerRequestExtensionsTests on Java 13
Closes gh-23677
2019-09-24 09:47:57 +02:00
Sebastien Deleuze 1dfe304da4 Improve parity between Java and Kotlin router DSL
This commit adds following functions to the Kotlin DSL:
add, filter, before, after and onError.

Closes gh-23524
2019-09-17 12:42:48 +02:00
Sebastien Deleuze 5a0216d657 Improve parity between Java and Kotlin router DSL
This commit adds variants with pattern + predicate to
Kotlin router DSLs, and vararg where necessary.

Closes gh-23524
2019-09-16 22:14:55 +02:00
Phillip Webb d945ae9191 Add blank line between java and javax imports
See gh-23539

Co-authored-by: Sam Brannen <sbrannen@pivotal.io>
2019-09-16 13:41:59 +02:00
Phillip Webb deba2ed1b3 Add blank line between java and javax imports
See gh-23539
2019-09-04 22:05:46 -07:00
Sebastien Deleuze ff271894fe Detect unsupported suspending handler methods in Spring MVC
closes gh-23585
2019-09-04 18:24:35 +02:00
Brian Clozel d4089747b8 Use dependency management in Framework build
Prior to this commit, the Spring Framework build would partially use the
dependency management plugin to import and enforce BOMs.

This commit applies the dependency management plugin to all Java
projects and regroups all version management declaration in the root
`build.gradle` file (versions and exclusions).

Some versions are overridden in specific modules for
backwards-compatibility reasons or extended support.

This commit also adds the Gradle versions plugin that checks for
dependency upgrades in artifact repositories and produces a report; you
can use the following:

    ./gradlew dependencyUpdates
2019-09-02 18:01:09 +02:00
Sebastien Deleuze a2e740c896 Polishing 2019-09-02 16:37:42 +02:00
Sebastien Deleuze ca02cc1194 Migrate to AssertJ in Kotlin tests
Closes gh-23475
2019-09-02 15:59:26 +02:00
康智冬 a6f4862f13 Fix typos related to indefinite articles
Closes gh-23555
2019-09-01 15:45:49 +02:00
Rossen Stoyanchev 8d86a861a1 Merge branch '5.1.x' 2019-08-29 15:53:17 +03:00
Rossen Stoyanchev 4f4b9f6b1b Fix checkstyle violation 2019-08-29 15:53:05 +03:00
Rossen Stoyanchev 48233317b8 Minor polish in DispatcherServlet
See gh-23541
2019-08-29 15:38:38 +03:00
Rossen Stoyanchev 117119a88d Merge branch '5.1.x' 2019-08-29 15:13:36 +03:00
Rossen Stoyanchev 4e4ec266b2 Adjust error response in ResourceUrlEncodingFilter
Failure to find the lookup path now results in 400 instead of 500
reflecting the presence of some issue with the input path.

Closes gh-23508
2019-08-29 14:58:03 +03:00
Sam Brannen c004ef888c Configure index in @ParameterizedTest display names
This commit prepends "[{index}] " to all custom display names
configured via @ParameterizedTest.

This provides better diagnostics between the "technical names" reported
on the CI server vs. the "display names" reported within a developer's
IDE.

See gh-23451
2019-08-28 17:06:23 +02:00
Sam Brannen 216ffcfe62 Fix copyright dates 2019-08-27 18:28:31 +02:00
Сергей Цыпанов 6ef75d76cd Simplify String concatenation
Closes gh-23470
2019-08-27 18:22:44 +02:00
Johnny Lim 6c2ef481ec Add @since tags for getCacheFilter and setCacheFilter
Closes gh-23519
2019-08-26 15:26:32 +02:00
Sam Brannen ad6231ad29 Add missing @Override annotations 2019-08-23 13:50:58 +02:00
Rossen Stoyanchev 1d2ebdeb8c More optimal RequestMethod condition lookup
See gh-22644
2019-08-22 13:39:20 +03:00
Rossen Stoyanchev ff6ccd0d04 Adapt tests changed in 5.1.x to master 2019-08-21 10:24:46 +03:00
Rossen Stoyanchev 364c7c459d Merge branch '5.1.x' 2019-08-21 10:21:32 +03:00
Rossen Stoyanchev 6d8bf3466c Suppress decoding error for resource path
Closes gh-23463
2019-08-21 10:02:15 +03:00
Brian Clozel e9523161f0 Revert "Revert "Refactor Gradle tasks in Spring Framework build""
This reverts commit fb0d618751.
2019-08-20 20:26:43 +02:00
Stephane Nicoll fb0d618751 Revert "Refactor Gradle tasks in Spring Framework build"
This reverts commit 1539ba8991.
2019-08-20 20:07:11 +02:00
Brian Clozel 1539ba8991 Refactor Gradle tasks in Spring Framework build
This commit reorganizes tasks and scripts in the build to only apply
them where they're needed. We're considering here 3 "types" of projects
in our build:
* the root project, handling documentation, publishing, etc
* framework modules (a project that's published as a spring artifact)
* internal modules, such as the BOM, our coroutines support and our
integration-tests

With this change, we're strealining the project configuration for all
spring modules and only applying plugins when needed (typically our
kotlin support).

See gh-23282
2019-08-20 18:17:02 +02:00
Sam Brannen 979508a7f3 Remove JUnit 4 dependency from all modules except spring-test
This commit removes the JUnit 4 dependency from all modules except
spring-test which provides explicit JUnit 4 support.

This commit also includes the following.

- migration from JUnit 4 assertions to JUnit Jupiter assertions in all
  Kotlin tests
- migration from JUnit 4 assumptions in Spring's TestGroup support to
  JUnit Jupiter assumptions, based on org.opentest4j.TestAbortedException
- introduction of a new TestGroups utility class than can be used from
  existing JUnit 4 tests in the spring-test module in order to perform
  assumptions using JUnit 4's Assume class

See gh-23451
2019-08-17 11:37:21 +02:00
Sam Brannen 3f3e41923f Migrate rest of test suite from JUnit 4 to JUnit Jupiter
This commit migrates the rest of Spring's test suite to JUnit Jupiter,
except spring-test which will be migrated in a separate commit.

See gh-23451
2019-08-17 11:36:58 +02:00
Brian Clozel 561af5f8f9 Replace propdeps plugin with custom plugin
Prior to this commit, the Spring Framework build would be using the
propdeps Gradle plugin to introduce two new configurations to the build:
"optional" and "provided". This would also configure related conventions
for IDEs, adding those configurations to published POMs.

This commit removes the need for this plugin and creates instead a
custom plugin for an "optional" configuration. While the Eclipse IDE
support is still supported, there is no need for specific conventions
for IntelliJ IDEA anymore.
This new plugin does not introduce the "provided" scope, as
"compileOnly" and "testCompileOnly" are here for that.

Also as of this commit, optional/provided dependencies are not published
with the Spring Framework modules POMs annymore.
Generally, these dependencies do not provide actionable information to
the developers reading / tools consuming the published POMs.

Optional/Provided dependencies are **not**:
* dependencies you can add to enable some supported feature
* dependencies versions that you can use to figure out CVEs or bugs
* dependencies that might be missing in existing Spring applications

In the context of Spring Framework, optional dependencies are just
libraries are Spring is compiling against for various technical reasons.
With that in mind, we are not publishing that information anymore.

See gh-23282
2019-08-13 18:19:37 +02:00
Sam Brannen d32cb7dac3 Avoid use of GenericTypeResolver.resolveParameterType() in tests
This commit avoids the use of the deprecated
GenericTypeResolver.resolveParameterType() method in tests in order to
avoid warnings in the Gradle build.
2019-08-07 14:23:15 +02:00
Arjen Poutsma 132fa702b7 Polish contribution
See gh-22606
2019-08-01 13:37:14 +02:00
Sergey Galkin 59aee923e4 Add filter to AbstractCachingViewResolver
This commit introduces a filter that specifies whether a View should be
cached by the AbstractCachingViewResolver or not.

Closes gh-22391
2019-08-01 13:37:14 +02:00
Sam Brannen f53cdb8bd2 Introduce common SimpleUrlHandlerMapping constructors
Prior to this commit, the SimpleUrlHandlerMapping classes in Spring MVC
and Spring Webflux only had default constructors. This lead to the fact
that users often had to explicitly invoke setUrlMap() and setOrder() on
the newly instantiated SimpleUrlHandlerMapping.

In order to simplify the programmatic setup of a SimpleUrlHandlerMapping
in common scenarios, this commit introduces the following constructors.

- SimpleUrlHandlerMapping()
- SimpleUrlHandlerMapping(Map<String, ?> urlMap)
- SimpleUrlHandlerMapping(Map<String, ?> urlMap, int order)

Closes gh-23362
2019-07-28 17:59:19 +02:00
Arjen Poutsma 7b73418418 Add rawStatusCode() to ServerResponse in both WebFlux and Servlet
Closes gh-22872
2019-07-22 15:34:42 +02:00
Juergen Hoeller cdeb1fef5f Merge branch '5.1.x' 2019-07-20 18:23:00 +02:00
Juergen Hoeller 92890232df Upgrade to OpenPDF 1.2.21, Rome 1.12.1, XStream 1.4.11.1
Includes updated javadoc links for 5.1.x branch.
2019-07-20 18:20:03 +02:00
Sebastien Deleuze 095fd5bcb3 Use Kotlin BOM
Close gh-23316
2019-07-19 10:43:54 +02:00
Juergen Hoeller 94e3210ae7 Fix nullability warnings and javadoc-triggered package cycles 2019-07-17 22:34:07 +02:00
Rossen Stoyanchev c32299f734 Use HttpMessageNotWritableException instead of ISE
As a follow-up to the recent commit #37f9ce, this change replaces the
raised IllegalStateException with HttpMessageNotWritableException.

See gh-23205
2019-07-13 10:56:12 +01:00
Rob Winch fde92793b5 Fix http URLs
See gh-22839
2019-07-11 18:14:20 +02:00
Sebastien Deleuze c8f8dfa39e Add engineSupplier property to ScriptTemplateConfigurer
This commit adds an engineSupplier property to ScriptTemplateConfigurer
and ScriptTemplateView in order to be able to customize the ScriptEngine
when sharedEngine is set to false.

This can be useful with Graal.js for example.

Closes gh-23258
2019-07-11 15:58:10 +02:00
Сергей Цыпанов 1728bf17fc Avoid unnecessary boxing where primitives can be used
Closes gh-23267
2019-07-10 16:51:18 +02:00
Sam Brannen a3161dc533 Merge branch '5.1.x' 2019-07-07 18:43:27 +02:00
Sam Brannen db8be50161 Support empty target request path in FlashMap
Prior to this commit, if the user configured an empty path for the
targetRequestPath property of a FlashMap, the FlashMapManager threw a
StringIndexOutOfBoundsException when saving the output FlashMap for the
next request.

This commit fixes this by skipping the decoding and normalization of an
empty target request path.

Fixes gh-23240
2019-07-07 18:38:26 +02:00
Rossen Stoyanchev 157df861f9 Do not warn also if cause is re-thrown
Closes gh-23233
2019-07-05 07:07:59 +01:00