Commit Graph

15206 Commits

Author SHA1 Message Date
Sebastien Deleuze 3e2f6c848a Leverage Kotlin plugin dependency management 2017-08-22 17:35:57 +02:00
Sebastien Deleuze ef68ccdbd8 Add support for Kotlin autowired ctors w/ optional params
This commit adds support for autowired constructor parameters
on Kotlin classes with optional parameters. If some constructor
parameters are not available, optional parameter default values
will be used instead. Both explicit @Autowired annotated constructor
and implicit single constructor automatically autowired are supported.

Issue: SPR-15847
2017-08-22 17:05:18 +02:00
Sebastien Deleuze ab6430569d Efficient Kotlin metadata detection
Follow-up of 3991ab4a23.

Issue: SPR-15673
2017-08-22 16:22:25 +02:00
Brian Clozel cea9d1db8e Fix Spring Framework BOM
This commit reinstates the Spring Framework BOM, which was previously
empty because of a previous change in 41cbc4670f.
This change also removes the JSR305 dependency from the BOM, which does
not belong here since it is not an artifact produced by Spring.

Issue: SPR-15885
2017-08-22 16:04:23 +02:00
Brian Clozel af7673dda7 Polish build
Issue: SPR-15885
2017-08-22 11:23:22 +02:00
Brian Clozel f6023c2202 Remove Sonar / Jacoco build configuration
Issue: SPR-15885
2017-08-22 11:10:53 +02:00
Stephane Nicoll 5a51351fa4 Relax test assertion when Jacoco is enabled
This commit changes the resolveMethod to take a method name as
instrumentation may add additional methods to the test object.

Issue: SPR-15888
2017-08-22 10:26:19 +02:00
Sebastien Deleuze 9abe77670c Sync with reactor-core when() -> zip() change 2017-08-21 19:54:08 +02:00
Brian Clozel 9341955107 Do not render PDF reference doc for SNAPSHOT builds
This commit ensures that only the HTML version of the reference
documentation is rendered for SNAPSHOT builds. This speeds up
significatly the build.

Issue: SPR-15885
2017-08-21 14:42:21 +02:00
Brian Clozel 5460c0095b Fix Gradle warnings about task output
As of Gradle 4.0, project SourceSets can have multiple output
directories (one per programming language).
This commit fixes warnings that are logged when a single output dir
is considered by tasks.

Issue: SPR-15885
2017-08-21 14:42:12 +02:00
Brian Clozel cc3d7d2d48 Apply dependency management to selected modules
This commit applies the Dependency Management Plugin to modules that
require it; right now Spring Framework is importing BOMs for Netty and
Reactor dependencies only.

Instead of applying those BOMs to all modules, they're applied only
where they're needed.

Issue: SPR-15885
2017-08-21 14:42:03 +02:00
Brian Clozel 2eeb428e95 Move modules to independent build files
The main `build.gradle` file contains now only the common build
infrastructure; all module-specific build configurations have
been moved to their own build file.

Issue: SPR-15885
2017-08-21 14:41:55 +02:00
Brian Clozel 41cbc4670f Refactor the spring-beans build
This commit merges back the "spring-beans-groovy" module into the main
"spring-beans" one. The build is configured so:

* Java and Groovy sources are jointly compiled
* Kotlin sources are compiled after

With this change, the `MergePlugin` is not used anymore in the project
build and therefore is removed.
The `DetectSplitPackagesPlugin` wasn't applied so it's been removed as
well.

Issue: SPR-15885
2017-08-21 14:41:46 +02:00
Brian Clozel 0c178ff762 Generate docs *after* running tests in Gradle build
This commit reorders docs generation (javadoc, asciidoctor) *after*
runing tests for `./gradlew build` commands.

Issue: SPR-15885
2017-08-21 14:41:38 +02:00
Brian Clozel 2e50ea7eb4 Move plugin declarations to plugin syntax
Note: this syntax automatically applies the plugin to the root project.
Adding `apply false` in the plugin declaration disables that.

Issue: SPR-15885
2017-08-21 14:41:28 +02:00
Brian Clozel 11418d8d28 Allow dedicated build files for subprojects
With this change, each subproject can configure its
build in a dedicated file like:

```
spring-core/spring-core.gradle
spring-web/spring-web.gradle
```

Issue: SPR-15885
2017-08-21 14:40:35 +02:00
Brian Clozel 4d306e2d85 Use Gradle build scans
This commit configures Gradle build scans for the Spring Framework
build. Scans aren't performed for every build but can be enabled
with the following:

```
./gradlew build --scan
```

Issue: SPR-15885
2017-08-21 14:29:49 +02:00
Stephane Nicoll 3d28e80e53 Fix code format
Closes gh-1501
2017-08-21 08:42:26 +02:00
Juergen Hoeller b61c055e43 Polishing 2017-08-21 01:37:33 +02:00
Juergen Hoeller fac1f236c3 Upgrade to Servlet API 4.0 for MVC and merge EhCache 3 tests into spring-context-support
Includes general streamlining of dependency declarations with reduced version variables, direct use of EclipseLink 2.7 and its implicit JPA 2.2 dependency in spring-orm, mixed use of Hibernate 5.2.10 and 5.1.10 for integration tests, as well as an upgrade to Jetty 9.4.7 RC0 and a downgrade to Groovy 2.4.12 (since Groovy 2.5 won't be final in time for Spring Framework 5.0).

Issue: SPR-15879
Issue: SPR-15880
2017-08-21 01:34:11 +02:00
Juergen Hoeller 3991ab4a23 Efficient Kotlin metadata detection
Issue: SPR-15673
2017-08-21 01:33:20 +02:00
Stephane Nicoll f6e7fef236 Polish 2017-08-19 10:50:41 +02:00
Rossen Stoyanchev dabb02d830 Update docs on DispatcherServlet config and processing
Issue: SPR-15149
2017-08-18 19:07:28 +02:00
Rossen Stoyanchev 940a344a73 Polish 2017-08-18 19:07:28 +02:00
Juergen Hoeller 9aa369f402 Data class construction supports field default/marker parameters
Issue: SPR-15871
2017-08-18 17:59:06 +02:00
Rossen Stoyanchev 18f42f9667 Fix typo
Issue: SPR-15872
2017-08-18 09:18:03 +02:00
Juergen Hoeller 47a7475898 Resolve remaining nullability warnings
Issue: SPR-15869
2017-08-18 00:15:46 +02:00
Juergen Hoeller ac5e2599f7 Consistent overriding for all variants of init/destroy method inheritance
Issue: SPR-15532
2017-08-18 00:13:49 +02:00
Juergen Hoeller b94302b5bd Enforce non-null value from getBean and at injection points
Bean-derived null values may still get passed into bean properties and injection points but only if those are declared as non-required. Note that getBean will never return null; a manual bean.equals(null) / "null".equals(bean.toString()) check identifies expected null values now.  This will only ever happen with custom FactoryBeans or factory methods returning null - and since all common cases are handled by autowiring or bean property values in bean definitions, there should be no need to ever manually check for such a null value received from getBean.

Issue: SPR-15829
2017-08-18 00:11:35 +02:00
Rossen Stoyanchev 10dcaa9bf6 Update introduction to Spring Web MVC
Issue: SPR-15149
2017-08-17 21:59:19 +02:00
Rossen Stoyanchev 11ac87099a Prepare Web section for Servlet vs Reactive content
Refer to both Servlet and reactive stacks in web.adoc
Move web-integration.adoc to the very end
Link in web-flux-functional.adoc
Insert "Spring Web MVC" or "Servlet" prefix in chapter titles

Issue: SPR-15149
2017-08-17 21:59:13 +02:00
Rossen Stoyanchev f1b017af04 Insert line breaks 2017-08-17 21:58:41 +02:00
Sebastien Deleuze 73cf07e9a4 Fix overridden methods nullability
Issue: SPR-15869
2017-08-17 15:02:59 +02:00
Juergen Hoeller 6b6c1d3e53 Build and test against JPA 2.2 and EclipseLink 2.7 (while retaining compatibility with JPA 2.1)
Includes latest dependency updates (Tomcat 8.5.20, Protobuf 3.4, RxJava 2.1.3, Caffeine 2.5.5)

Issue: SPR-15870
2017-08-17 12:31:35 +02:00
Juergen Hoeller ec1eafc46f @Lazy falls back to empty map/list/set for non-required collection dependency
Issue: SPR-15858
2017-08-17 12:28:55 +02:00
Juergen Hoeller 61cdc842e0 BindingResult support for constructor argument mismatch on immutable data object
Issue: SPR-15542
2017-08-17 11:02:40 +02:00
Juergen Hoeller b8f5e97ae5 Properly retrieve and expose HttpServletResponse for async requests
Issue: SPR-15867
2017-08-17 08:52:05 +02:00
Rossen Stoyanchev bb327b90a6 Merge pull request #1499 from rlindooren/SPR-15866-use-provided-mime-types 2017-08-16 15:45:59 +02:00
Rossen Stoyanchev e433d8b66a Polish 2017-08-16 15:45:14 +02:00
rlindooren 5b29555d88 Jackson encoder and decoder should use provided mime types
Instead of always using the default JSON mime types
2017-08-16 15:25:18 +02:00
Rossen Stoyanchev 645e3492db Use URLDecoder for query params in WebFlux
Issue: SPR-15860
2017-08-16 13:34:31 +02:00
Rossen Stoyanchev 8b7a670821 Cancel WebAsyncManager thread on request timeout
Issue: SPR-15852
2017-08-16 09:26:21 +02:00
Rossen Stoyanchev 9c3bd8ce85 Separate forwarded~ and redirectedUrlTemplate methods
This commit restores and existing redirectedUrl and forwardedUrl
methods (simple String comparison) and creates separate
redirectedUrlTemplate and forwardedUrlTemplate methods that expand
and also encode before comparing.

Issue: SPR-15834
2017-08-15 15:25:39 +02:00
Rossen Stoyanchev 8bdaba913c Merge pull request #1486 from drumonii/MockRestRequestMatchers-requestTo-UriVars 2017-08-15 15:11:02 +02:00
Rossen Stoyanchev ea2864c73e Polish 2017-08-15 15:08:23 +02:00
Drummond Dawson 809189be1a URI variables with MockRestRequestMatchers requestToUriTemplate
Issue: SPR-15819
2017-08-15 14:55:56 +02:00
Rossen Stoyanchev 181f002ddf Use exact type name in doc sample
Issue: SPR-15863
2017-08-15 14:44:22 +02:00
Sebastien Deleuze 3f4ec37262 Upgrade to Kotlin 1.1.4
Issue: SPR-15814
2017-08-15 10:12:34 +02:00
Rossen Stoyanchev 280c64ba35 Polish 2017-08-14 18:55:39 +03:00
Rossen Stoyanchev 8c4b1ab781 Functional PathPattern comparator 2017-08-14 16:33:39 +03:00