Commit Graph

15217 Commits

Author SHA1 Message Date
Sam Brannen
4e81ee5fdf Verify support for H2 database aliases in SQL scripts
This commit introduces a test to demonstrate how to define an alias in
an SQL script executed against an embedded H2 database.

Issue: SPR-15896
2017-08-26 15:04:48 +01:00
Brian Clozel
582014e944 Support HTTP range requests in MVC Controllers
Prior to this commit, HTTP Range requests were only supported by the
ResourceHttpRequestHandler when serving static resources.

This commit improves the `HttpEntityMethodProcessor` and
the `RequestResponseBodyMethodProcessor`. They now extract
`ResourceRegion`s from the `Resource` instance returned by the
Controller and let the Resource-related message converters
handle the writing of the resource (including partial writes).

Controller methods can now handle Range requests for
return types that extend Resource or HttpEntity:

    @RequestMapping("/example/video.mp4")
    public Resource handler() { }

    @RequestMapping("/example/video.mp4")
    public HttpEntity<Resource> handler() { }

Issue: SPR-15789, SPR-13834
2017-08-24 20:50:37 +02:00
Sam Brannen
d20b3cf86d Upgrade to TestNG 6.12 2017-08-24 15:27:46 +01:00
Sam Brannen
d070010650 Upgrade to JUnit Jupiter 5.0 RC3
Issue: SPR-15848
2017-08-23 20:53:46 +01:00
Sebastien Deleuze
ba02b5761e Provide distinct Web and Reactive Web sections
This change allows much more usable TOC for the reactive
stack and will make WebFlux documentation easier to
contribute thanks to a clearer split between both stacks.

Issue: SPR-15149
2017-08-23 16:02:04 +02:00
Sebastien Deleuze
cdb6688815 Update WebFlux code examples 2017-08-23 13:59:46 +02:00
Sebastien Deleuze
d61db48d64 Improve WebFlux documentation sections
Issue: SPR-15149
2017-08-23 13:53:58 +02:00
Sam Brannen
9da3927235 Polishing 2017-08-22 22:23:44 +01:00
Sam Brannen
1cb96f47c8 Fix Eclipse support in Gradle build
The upgrade to Gradle 4.0 broke the custom Eclipse support in the
Spring Framework build.

This commit includes the following changes which re-enable support for
Eclipse in the build.

- Switched to ProjectDependency(String) constructor

- Updated regular expression that matches against project output
  dependencies to include more than one subdirectory between "build"
  and "main"|"test".

Issue: SPR-15862
2017-08-22 22:16:34 +01:00
Brian Clozel
397fd24849 Revert "Leverage Kotlin plugin dependency management"
This reverts commit 3e2f6c848a.
2017-08-22 21:29:39 +02:00
Brian Clozel
a1e898fd39 Share common compiler args between src and test
Issue: SPR-15885
2017-08-22 18:09:19 +02:00
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