Commit Graph

278 Commits

Author SHA1 Message Date
Andy Wilkinson 5f27ecc6d9 Remove old integration tests for the Gradle plugin 2017-04-04 15:33:27 +01:00
Phillip Webb 34de119eba Polish 2017-03-16 13:04:03 -07:00
Andy Wilkinson bb54411366 Merge branch '1.5.x' 2017-03-13 16:10:51 +00:00
Andy Wilkinson 17062f9589 Merge branch '1.4.x' into 1.5.x 2017-03-13 16:10:32 +00:00
Andy Wilkinson 2ddcf0e831 Avoid using File.renameTo(File) as it doesn't work on Windows 2017-03-13 15:46:19 +00:00
Phillip Webb 67556ba8ea Restructure embedded web server packages
Rework `org.springframework.boot.context.embedded` to relocate classes
to `org.springframework.boot.web`. Packages are now organized around
the following areas:

Packages for shared concerns, for example the `WebServer` interface
to start/stop a server and the common configuration elements:
- org.springframework.boot.web.context
- org.springframework.boot.web.server

Servlet specific packages:
- org.springframework.boot.web.servlet.server
- org.springframework.boot.web.servlet.context
- org.springframework.boot.web.servlet.filter

Reactive specific packages:
- org.springframework.boot.web.reactive.context
- org.springframework.boot.web.reactive.server

Embedded server implementations (both reactive and servlet):
- org.springframework.boot.web.embedded

In addition:

- Rename `EmbeddedServletContainerFactory` to `ServletWebServerFactory`
  to align with the `ReactiveWebServerFactory`.
- Rename `EmbeddedWebApplicationContext` to
  `ServletWebServerApplicationContext` and
- Rename `EmbeddedReactiveWebApplicationContext` to
  `ReactiveWebServerApplicationContext`.
- Add checkstyle rules to restrict imports.
- Fixup all affected code to use the correct imports and local names.

Fixes gh-8532
2017-03-12 21:08:25 -07:00
Andy Wilkinson b35c162593 Raise the minimum supported version of Gradle to 3.4
Closes gh-7922
2017-03-11 09:03:06 +00:00
Andy Wilkinson 019b0a3e9c Merge branch '1.5.x' 2017-03-09 14:05:51 +00:00
Andy Wilkinson 50c0204f2d Merge branch '1.4.x' into 1.5.x 2017-03-09 14:05:42 +00:00
Andy Wilkinson d32c3a7f43 Correct the URL that's called to test servlet context resources
See gh-8299
Closes gh-8525
2017-03-09 14:04:19 +00:00
Andy Wilkinson b527e71474 Merge branch '1.5.x' 2017-03-09 13:26:14 +00:00
Andy Wilkinson 1395f38ee7 Merge branch '1.4.x' into 1.5.x 2017-03-09 13:11:28 +00:00
Andy Wilkinson a2cf0455fd Fix static resource handling when run in IDE or using Maven or Gradle
The changes made for gh-8299 attempted to make static resource
handling consistent across Jetty, Tomcat, and Undertow. They did so
for application's launched using JarLauncher or WarLauncher but did
not consider application's launched in an IDE or using spring-boot:run
in Maven or bootRun in Gradle.

Running in an IDE or via Maven or Gradle introduces two new
resource locations:

 - Jars on the classpath with file protocol URLs (they are always
   jar protocol URLs when using either launcher)
 - Directories on the classpath from a project that is depended upon
   and contains resources in META-INF/resources

This commit updates the factories for all three containers to handle
these new resources locations. The integration tests have also been
updated.
2017-03-09 12:41:32 +00:00
Phillip Webb d8f827d224 Cleanup and format code 2017-03-06 17:08:09 -08:00
Phillip Webb 425dbc3e52 Update copyright header for edited files 2017-03-06 15:04:07 -08:00
Phillip Webb 2a592103f0 Polish formatting 2017-03-06 15:03:43 -08:00
Spring Buildmaster d23fa24340 Next Development Version 2017-03-03 16:18:26 +00:00
Spring Buildmaster 2a83e80a9b Next Development Version 2017-03-03 14:39:21 +00:00
Phillip Webb 58ac67eb27 Merge branch '1.5.x' 2017-03-02 00:09:56 -08:00
Phillip Webb f1012c104a Polish 2017-03-01 23:29:20 -08:00
Phillip Webb 987b6c956e Polish 2017-03-01 20:43:04 -08:00
Andy Wilkinson 9fc79692a7 Merge branch '1.5.x' 2017-03-01 14:13:31 +00:00
Andy Wilkinson 68af831059 Merge branch '1.4.x' into 1.5.x 2017-03-01 14:03:38 +00:00
Andy Wilkinson b443b745fb Make static resource handling consistent across embedded containers
Previously, there were a number of inconsistencies in the embedded
containers' handling of static resources. The Servlet spec requires
that static resources can be served from the META-INF/resources/
directory of jars nested inside a war in WEB-INF/lib/. The intention
was also to extend this to cover jar packaging when jars are nested in
BOOT-INF/lib/. This worked when using Tomcat as long as Jasper was on
the classpath. If you didn't have Jasper on the classpath or you
were using Jetty or Undertow it did not work.

This commit updates the configuration of embedded Jetty, Tomcat, and
Undertow so that all three containers handle static resources in the
same way, serving them from jars in WEB-INF/lib/ or /BOOT-INF/lib/.
Numerous intergration tests have been added to verify the behaviour,
including tests for Tomcat 8.0 and 7.0 which is supported in addition
to the default 8.5.x. Note that static resource handling only works
with Jetty 9.3.x and 9.2 and earlier does not support nested jars (
see https://github.com/eclipse/jetty.project/issues/518 for details).

Closes gh-8299
2017-03-01 12:40:26 +00:00
Phillip Webb a4bcd20b64 Merge branch '1.5.x' 2017-02-27 20:43:18 -08:00
Phillip Webb 47fd5f4fac Merge branch '1.4.x' into 1.5.x 2017-02-27 14:00:46 -08:00
Phillip Webb 47b00c086c Polish 2017-02-27 13:56:17 -08:00
Andy Wilkinson ff9788c625 Merge branch '1.5.x' 2017-02-16 09:46:26 +00:00
Andy Wilkinson f67dd957b1 Ignore excludeDevtools on extension when it has been set on bootRepackage
Previously, bootRepackage's excludeDevtools property would be
overridden by the springBoot extension's excludeDevtools property.
This prevented devtools from being included by configuring it on the
repackaging task.

This commit corrects the logic so that the setting on the repackaging
task takes priority. It also adds some tests to verify the behaviour.

Closes gh-8308
2017-02-16 09:45:51 +00:00
Brian Clozel 12d883f6b9 Introduce "server.servlet" configuration prefix
This commit refactors the `ServerProperties` property keys and
introduces a separate "server.servlet" namespace to isolate
servlet-specific properties from the rest.

Closes gh-8066
2017-02-07 16:48:22 +01:00
Spring Buildmaster 5c12500366 Next Development Version 2017-01-30 20:10:13 +00:00
Spring Buildmaster a2696bf873 Next Development Version 2017-01-30 11:40:24 +00:00
Spring Buildmaster ed1ce140c0 Next Development Version 2017-01-26 14:20:39 +00:00
Andy Wilkinson 9685b84523 Merge branch '1.5.x' 2017-01-18 13:39:57 +00:00
Andy Wilkinson ba8f7214d8 Merge branch '1.4.x' into 1.5.x 2017-01-18 13:39:48 +00:00
Andy Wilkinson 0e72ef1a10 Improve diagnostics for in StarterDependenciesIntegrationTests
The root cause of the build failure something has a null message which
means there's no information available about why the build failed.
Instead of calling fail when a BuildException occurs, this commit
wraps it in a RuntimeException and rethrows it. This should make the
entire chain of exceptions available when a failure occurs.
2017-01-18 13:38:10 +00:00
Andy Wilkinson 8f201d6de5 Merge branch '1.5.x' 2017-01-16 20:42:42 +00:00
Andy Wilkinson 69e7e31b1c Merge branch '1.4.x' into 1.5.x 2017-01-16 20:42:40 +00:00
Andy Wilkinson 7c2664f959 Ensure that jar entry names use forward slashes, even on Windows
Previously, in the DevTools integration tests, portions of a File's
path were used to create the name of a jar entry. On Windows this
resulted in the entry containing \ characters. As a result the
directory structure was incorrect and the classes could not be loaded
from the jar.

This commit ensures that any \ characters are replaced with /
characters.

See gh-7782
2017-01-16 20:42:04 +00:00
Andy Wilkinson 1d4cee9460 Drop support for the old spring-boot Gradle plugin ID
Closes gh-7859
2017-01-13 06:47:02 -05:00
Phillip Webb 53f1df86a2 Merge branch '1.5.x' 2016-12-30 12:17:28 -08:00
Phillip Webb aacf5d660f Update copyright year for changed files 2016-12-30 11:53:51 -08:00
Phillip Webb 4d73f3d2e9 Merge branch '1.5.x' 2016-12-29 22:22:04 -08:00
Gaurav Rawat 509be7474d Add `force-stop` support to launch script
Update the embedded launch script to support `force-stop`.

Closes gh-6223
2016-12-29 22:20:05 -08:00
Phillip Webb 291752a317 Merge branch '1.5.x' 2016-12-24 11:26:50 -08:00
Phillip Webb a23591e047 Support Jetty 9.4 and upgrade to 9.4.0.v20161208
Update `JettyEmbeddedServletContainerFactory` to support Jetty 9.4
directly and Jetty 9.3 via reflection. The primary difference between
Jetty 9.3 and 9.4 are the session management classes. Websocket suppport
has also been updates, but this is handled transparently by the
Spring Framework support.

Fixes gh-7599
2016-12-24 11:22:38 -08:00
Spring Buildmaster 9057f9ae1f Next development version 2016-12-23 00:15:23 +00:00
Phillip Webb 1f417997f3 Merge branch '1.5.x' 2016-12-19 13:21:18 -08:00
Phillip Webb 4b9cba351b Merge branch '1.4.x' into 1.5.x 2016-12-19 12:36:57 -08:00
Phillip Webb bd74c3d327 Polish formatting 2016-12-19 12:25:09 -08:00