Commit Graph

10977 Commits

Author SHA1 Message Date
Brian Clozel d1eafa29da Add missing dependency in docs generation
Reactor Netty and Spring WebFlux were missing.
2017-02-24 13:57:09 +01:00
Stephane Nicoll 12397edbd4 Expose a WebTestClient with `@SpringBootTest`
This commit exposes a `WebTestClient` automatically in a reactive
integration test that uses an embedded web server. This is similar to
what we do with `TestRestTemplate` for servlet based integration tests.

Closes gh-8399
2017-02-24 13:50:58 +01:00
Brian Clozel c1e93d8991 Add WebFlux application sample
This commit adds a sample application for the
annotation variant of Spring WebFlux.
2017-02-24 13:03:12 +01:00
Stephane Nicoll 54939e8e3c Start a reactive web application if necessary
This commit makes sure that `@SpringBootTest` with a reactive setup
starts a web application if necessary.

If both a servlet and a reactive environment are available, a servlet
environment is bootstraped. This commit also adds a way to force a
reactive environment by specifying the `spring.main.web-application-type`
property of the test (e.g. `@TestPropertySource`).

Closes gh-8383
2017-02-24 13:03:12 +01:00
Brian Clozel 8317977e1b Add WebFlux auto-configuration
This commit creates auto-configuration classes for both the
annotation and functional variants of the WebFlux framework.

They provide the basic support to get started with those, by
creating the required `HttpHandler` using the provided application
context (for annotation) or `RouterFunction`s (for functional).

They do support `WebFilter` registration and a few advanced
features such as resource handling, `messageReaders|Writers`
and `ViewResolver` auto-registration.

Closes gh-8386
2017-02-24 13:03:11 +01:00
Brian Clozel 656b509f03 Add support for reactive web servers auto-configuration
This commit adds the auto-configuration for creating reactive
`EmbeddedWebServer` instances. This adds support for the
following servers: Reactor Netty, Tomcat, Jetty and Undertow.

Fixes gh-8302
Fixes gh-8117
2017-02-24 13:03:11 +01:00
Brian Clozel dc98d909ab Support reactive web servers with LocalServerPort
This commit refactors the `EmbeddedWebServerInitializedEvent` hierarchy
to have one specialized event for Servlet based apps and another one for
reactive apps.

Each event implementation has:

* a specific `ApplicationContext` implementation for the app
* a custom `getServerId` implementation that differentiates the
application server from the management server

Closes gh-8348
2017-02-24 13:03:11 +01:00
Brian Clozel 0b162e894b Manage EmbeddedWebServer in ReactiveWebApplicationContext
This commit adds an `EmbeddedWebServer` instance to the
`ReactiveWebApplicationContext` and ties it to the application
lifecycle.

To launch a reactive web application, two elements are required
from the context:

* a `ReactiveWebServerFactory` to create a server instance
* a `HttpHandler` instance to handle HTTP requests

Closes gh-8337
2017-02-24 13:03:11 +01:00
Brian Clozel 21878f8528 Manage Netty in Boot dependencies 2017-02-24 13:03:11 +01:00
Brian Clozel f331ac133f Add reactive web server infrastructure
This commit adds the infrastructure for creating and customizing
reactive embedded web servers. Common configuration has been refactored
into the new `ConfigurableEmbeddedWebServer` interface.

See gh-8302
2017-02-24 13:03:11 +01:00
Stephane Nicoll a38d2456c3 Merge branch '1.5.x' 2017-02-24 11:05:27 +01:00
Stephane Nicoll 4aa99b9531 Avoid exposing several javax.validaton.Validator beans
This commit makes sure that the Spring `Validator` used by the MVC
layer doesn't expose a JSR-303 contract, if any.

The default implementation of the `mvcValidator` is
`LocalValidatorFactoryBean`. While this object is exposed as a Spring
`Validator` only, its runtime capabilities expose that contract as well
as the standard `Validator` and `ValidatorFactory` ones.

Concretely, if an auto-configuration is checking if a
`javax.validation.Validator` bean is missing, the condition will match
since we only know about "advertized types": beans haven't been created
yet so we can't inspect their runtime capabilities. Since the condition
match, we will auto-configure a bean. At runtime though, we're no longer
ale to inject a `javax.validation.Validator` by type since two candidates
are available.

This commit introduces `SpringValidatorAdapterWrapper`, a wrapper class
on any `SpringValidatorAdapter` (`LocalValidatorFactoryBean` being one of
the available implementations) that only exposes the Spring contract.

Also, if a `javax.validation.Validator` bean is available, we will use it
for the MVC layer, rather than creating a new one.

Closes gh-8223
2017-02-24 11:01:42 +01:00
Andy Wilkinson 3164330139 Correct HAL Browser location to reflect version of web jar
See gh-8382
2017-02-22 16:53:29 +00:00
Andy Wilkinson 7e6ad316aa Update exclusions to reflect change in Hibernate's JPA API dependency
See gh-8379
2017-02-22 16:33:50 +00:00
Andy Wilkinson 466f8926b5 Add dependency management for Commons Lang3
Closes gh-7896
2017-02-22 16:17:25 +00:00
Andy Wilkinson 145e2d206c Upgrade to Selenium HtmlUnit 2.24
Closes gh-7232
2017-02-22 16:09:37 +00:00
Andy Wilkinson 9cbb857111 Add explicit dependency on Gson
It used to be pulled in transitively by selenium-api but that's no
longer that case.

See gh-8381
2017-02-22 16:07:23 +00:00
Andy Wilkinson 233e6151b9 Upgrade to Webjars Hal Browser 3325375
Closes gh-8382
2017-02-22 15:06:20 +00:00
Andy Wilkinson 89845fb2eb Upgrade to Selenium 3.1.0
Closes gh-8381
2017-02-22 15:06:19 +00:00
Andy Wilkinson 008953adc9 Upgrade to Hibernate Validator 5.4.0.Final
Closes gh-8380
2017-02-22 15:06:18 +00:00
Andy Wilkinson d0fb8fc46a Upgrade to Hibernate 5.2.8.Final
Closes gh-8379
2017-02-22 15:06:17 +00:00
Andy Wilkinson ab06600fa9 Upgrade to Rxjava2 2.0.6
Closes gh-8378
2017-02-22 15:06:16 +00:00
Andy Wilkinson 4b7f90a0c6 Upgrade to Rxjava 1.2.6
Closes gh-8377
2017-02-22 15:06:16 +00:00
Andy Wilkinson 7cb5edf590 Upgrade to Reactor Bom Aluminium-SR1
Closes gh-8376
2017-02-22 15:06:15 +00:00
Andy Wilkinson f52449b5f5 Upgrade to Netty 4.1.8.Final
Closes gh-8375
2017-02-22 15:06:14 +00:00
Andy Wilkinson 5bace9dff6 Merge branch '1.5.x' 2017-02-22 14:56:04 +00:00
Andy Wilkinson 50bc321621 Upgrade to Spring Kafka 1.1.3.RELEASE
Closes gh-8374
2017-02-22 14:54:55 +00:00
Andy Wilkinson cbffc51b48 Upgrade to Mongodb 3.4.2
Closes gh-8373
2017-02-22 14:54:55 +00:00
Andy Wilkinson 73b7b3d7be Upgrade to Mariadb 1.5.8
Closes gh-8372
2017-02-22 14:54:54 +00:00
Andy Wilkinson e211602f4a Upgrade to Narayana 5.5.2.Final
Closes gh-8371
2017-02-22 14:54:54 +00:00
Andy Wilkinson e5c05b3193 Upgrade to Artemis 1.5.3
Closes gh-8370
2017-02-22 14:54:53 +00:00
Andy Wilkinson 789257b76b Upgrade to Undertow 1.4.10.Final
Closes gh-8369
2017-02-22 14:54:52 +00:00
Andy Wilkinson 1f6c52022d Upgrade to Cassandra Driver 3.1.4
Closes gh-8368
2017-02-22 14:54:52 +00:00
Andy Wilkinson 4ff159adbe Merge branch '1.5.x' 2017-02-22 12:19:14 +00:00
Andy Wilkinson b034a505a5 Polish 0f42c5dd
- Apply standard code formatting
- Add class javadoc to MultipleResourceServerConfigurationTests
- Add missing @Override annotations
- Remove unused ExpectedException field
- Remove use of SpringApplicationBuilder from the tests
- Use @ImportAutoConfiguration to import auto-configuration
- Add assertions to verify that the orders haven't been changed
- Remove unnecessary mocking of EmbeddedServletContainerFactory

See gh-8347
2017-02-22 12:16:05 +00:00
Andy Wilkinson 5e6ff9a855 Merge branch '1.5.x' 2017-02-22 11:45:38 +00:00
Andy Wilkinson f4eb45ac6d Merge branch '1.4.x' into 1.5.x 2017-02-22 11:43:33 +00:00
Andy Wilkinson 99683dff6f Upgrade to Logback 1.1.10
In Logback 1.1.10, the logback-classic module contains a
META-INF/services/javax.servlet.ServletContainerInitializer file that
contains a comment. This triggers a bug in Wildfly 8 [1] that has been
fixed [2] in Wildfly 9 and later. As a result, this commit also
updates our Wildfly deployment test to use 9.0.2 rather than 8.2.0.

Closes gh-8354

[1] https://issues.jboss.org/browse/WFLY-4089
[2] fef57ebdc7
2017-02-22 11:33:30 +00:00
Dave Syer c544aff72f Merge remote-tracking branch 'origin/1.5.x' 2017-02-22 11:32:20 +00:00
Dave Syer 0f42c5dd94 Check there is only one ResourceServerConfiguration before modifying
Fixes gh-8347
2017-02-22 11:30:17 +00:00
Andy Wilkinson c9f45e3ffa Merge branch '1.5.x' 2017-02-22 10:50:35 +00:00
Andy Wilkinson f952b2492a Merge branch '1.4.x' into 1.5.x 2017-02-22 10:50:28 +00:00
Andy Wilkinson 6af4b10b9d Revert "Upgrade to Logback 1.1.10"
This reverts commit 05113d059d.

See gh-8354
2017-02-22 10:49:53 +00:00
Andy Wilkinson 0de66a19f2 Merge branch '1.5.x' 2017-02-22 10:01:29 +00:00
Andy Wilkinson 1e4830e713 Merge branch '1.4.x' into 1.5.x 2017-02-22 09:58:54 +00:00
Andy Wilkinson b3d0b3330b Upgrade to Slf4j 1.7.23
Closes gh-8364
2017-02-22 09:49:43 +00:00
Andy Wilkinson 357667e97d Upgrade to Lombok 1.16.14
Closes gh-8363
2017-02-22 09:49:42 +00:00
Andy Wilkinson 3bf7bf86fb Upgrade to Infinispan 8.2.6.Final
Closes gh-8362
2017-02-22 09:49:42 +00:00
Andy Wilkinson 6ed5204874 Upgrade to Hibernate 5.0.12.Final
Closes gh-8361
2017-02-22 09:49:41 +00:00
Andy Wilkinson bdf4181e35 Upgrade to Solr 5.5.4
Closes gh-8360
2017-02-22 09:49:41 +00:00