Commit Graph

2722 Commits

Author SHA1 Message Date
Stephane Nicoll 5247fa323b Harmonize reactive auto-configuration class names
Closes gh-9086
2017-05-04 10:19:10 +02:00
Stephane Nicoll de268d97e2 Add auto-configuration for reactive Redis
This commit provides an auto-configuration for reactive Redis and a
starter that provides Lettuce as Jedis doesn't support reactive
operations.

There are no support for reactive redis repositories at the moment so
only a `ReactiveRedisTemplate` is auto-configured if necessary.

Closes gh-8053
2017-05-04 09:25:36 +02:00
Eddú Meléndez 1d9fa8395c Replace lambdas with method references
Closes gh-9049
2017-05-03 15:08:28 +02:00
Stephane Nicoll b0ffe18e15 Merge branch '1.5.x' 2017-05-03 13:11:01 +02:00
Stephane Nicoll ea33cc2f7d Deprecated MustacheCompilerFactoryBean
Closes gh-8999
2017-05-03 13:09:52 +02:00
Stephane Nicoll 2b4f2c6aba Making sure to stop embedded web servers in tests
Closes gh-9012
2017-05-03 12:04:57 +02:00
Stephane Nicoll 5121b848e1 Making sure to stop embedded web servers in tests
Closes gh-9012
2017-05-03 11:33:42 +02:00
Andy Wilkinson 4a00f90545 Stop throwing checked exception from @PostConstruct in ResourceServerProperties
Closes gh-8916
2017-05-03 10:12:51 +01:00
Phillip Webb 97dc2165b7 Polish 2017-05-02 21:56:24 -07:00
Madhura Bhave c04f28d9e5 Validate ResourceServerProperties in PostConstruct
Closes gh-8916
2017-05-02 17:25:06 -07:00
Stephane Nicoll 47783e258a Add missing tests 2017-05-02 15:57:51 +02:00
Stephane Nicoll e7efa8f133 Polish "Add Lettuce Redis driver autoconfiguration"
Closes gh-5311
2017-05-02 15:40:40 +02:00
Mark Paluch 4563da9ac7 Add Lettuce Redis driver autoconfiguration
Introduce an alternative autoconfiguration if the lettuce Redis driver is
available. Add Lettuce-specific configuration property options
"spring.redis.lettuce.shutdown-timeout" to control the shutdown timeout
of the lettuce driver. Add documentation for the properties, the
supported drivers, and how to switch between drivers.

Split client-specific properties from spring.redis.pool to
spring.redis.jedis.pool and introduce spring.redis.lettuce namespace.
Deprecate spring.redis.pool property.

See gh-5311
2017-05-02 13:33:34 +02:00
Phillip Webb 77d427af6c Fix occasional Jetty test failures
Update `DefaultServletWebServerFactoryCustomizerTests` so that the Jetty
access log tests use the default timezone. Prior to this commit it was
possible that running the tests outside of UTC could result in Jetty
throwing a "negative delay" IllegalArgumentException.

See gh-8819
2017-05-01 21:50:54 -07:00
Phillip Webb 3f71b8453f Migrate missed tests to new Binder
Migrate a few tests that were missed to use the new `Binder`.

See gh-9000
2017-04-28 14:23:20 -07:00
Phillip Webb 76593a3806 Merge branch '1.5.x' 2017-04-28 10:59:53 -07:00
Phillip Webb 72813a47e7 Polish 2017-04-28 10:59:14 -07:00
Phillip Webb 76ee2f401c Polish 2017-04-28 09:48:13 -07:00
Phillip Webb 4db4c81b9b Polish 2017-04-28 09:38:56 -07:00
Stephane Nicoll 7c4a1a221d Merge branch '1.5.x' 2017-04-28 15:45:44 +02:00
Brian Clozel f2c63706da Change default file extension for Mustache templates
This commit changes the default file extension for Mustache templates,
from `.html` to `.mustache`, which is the file extension used in the
official reference documentation and by most IDE plugins.

Fixes gh-8997
2017-04-28 14:12:26 +02:00
Brian Clozel 4d5dcca553 Add Thymeleaf auto-configuration for WebFlux
Thymeleaf 3.0 implements the Spring 5.0 view infrastructure for WebMVC
and the new WebFlux framework. This commit adds auto-configuration for
the WebFlux support.

In that process, the configuration property for `spring.thymeleaf` has
been changed to add `spring.thymeleaf.servlet` and
`spring.thymeleaf.reactive` for MVC/WebFlux specific properties.

Now that the `spring-boot-starter-thymeleaf` does not only support
Spring MVC, the transitive dependency on `spring-boot-starter-web` is
removed from it.

Fixes gh-8124
2017-04-28 14:11:45 +02:00
Stephane Nicoll 1de2316a0b Refine validator and MVC validator configuration
This commit ensures that a primary JSR 303 and Spring Validator will be
exposed if the auto-configuration kicks in. As `LocalValidatorFactoryBean`
exposes 3 contracts (JSR-303 `Validator` and `ValidatorFactory` as well as
the `Spring` validator one), this makes sure that those types can be
injected by type.

`LocalValidatorFactoryBean` exposes 3 contracts and we're only checking
for the absence of a `javax.validation.Validator` to auto-configure a
`LocalValidatorFactoryBean`. If no standard JSR validator exists but a
Spring's `Validator` exists and is primary, we shouldn't flag the
auto-configured one as `@Primary`. Previous iterations on this feature
have made sure that we'll auto-configure at most one
`javax.validation.Validator` so not flagging it `@Primary` is no problem.

This commit also restores and adds tests that validates
`ValidationAutoConfiguration` will configure a JSR validator even if a
Spring Validator is present.

This effectively fixes gh-8495 in a different way.

Closes gh-8979
Closes gh-8976
2017-04-28 11:41:42 +02:00
Stephane Nicoll f42998f5ca Revert "Refine validator and MVC validator configuration"
This commit reverts c9561f0 and 69a8c0d and effectivly fixes gh-8979 but
reintroduces the issue reported in gh-8495.
2017-04-28 11:12:09 +02:00
Stephane Nicoll d4f87ae74e Polish 2017-04-28 10:07:28 +02:00
Phillip Webb df9d2bc9f4 Remove @ConditionalOnProperty 'relaxed' attribute
Remove the `relaxed` attribute from `@ConditionalOnProperty` and instead
rely on the direct configuration property source relaxed name support.

Closes gh-9003
2017-04-27 13:59:25 -07:00
Madhura Bhave 69ab2e462e Use new configuration properties in autoconfigure
Update `spring-boot-autoconfigure` to use the new configuration
properties support.

See gh-9000
2017-04-27 13:59:25 -07:00
Phillip Webb 82b839e4fb Polish OnWebApplicationCondition message 2017-04-27 13:58:52 -07:00
Phillip Webb 45dd9f7144 Polish 2017-04-27 12:04:02 -07:00
Phillip Webb 42e24136ef Drop `spring-social-web-thymeleaf3`
Drop `spring-social-web-thymeleaf3` dependency since it's been merged
into `spring-social-web` as of Spring Social 2.0.

Fixes gh-9017
2017-04-27 11:29:56 -07:00
Vedran Pavic 33dd9d6d84 Remove Spring Session Mongo support
Remove auto-configuration support for Spring Session Mongo since it is
no longer supported in Spring Session 2.0.

See gh-9011
2017-04-27 10:59:22 -07:00
Stephane Nicoll 800eb010b1 Change the default JDBC connection pool to Hikari
Closes gh-6013
2017-04-27 16:11:45 +02:00
Stephane Nicoll 3dc9b125d7 Merge branch '1.4.x' into 1.5.x 2017-04-27 14:30:40 +02:00
Stephane Nicoll 703a6dc056 Prevents BasicErrorControllerIntegrationTest to start another server
`BasicErrorControllerIntegrationTest` is handling the context in each test
and yet it starts a useless test via `@SpringBootTest`. This commit
removes the useless runner and associated annotations.
2017-04-27 14:26:50 +02:00
Stephane Nicoll 227bcf44da Create jetty access log file in the temp directory 2017-04-27 14:19:08 +02:00
Stephane Nicoll 66298d85c4 Fix build 2017-04-27 14:12:32 +02:00
Stephane Nicoll e9abe3fcca Polish "Do not expose `exception` error attribute by default"
Closes gh-8971
2017-04-27 11:15:44 +02:00
Vedran Pavic afe0c6f432 Do not expose `exception` error attribute by default
See gh-8971
2017-04-27 10:57:04 +02:00
Stephane Nicoll f5db75792e Add support for configuring Jetty's request log via the environment
Closes gh-8819
2017-04-27 10:46:38 +02:00
olivier lamy ce892a06e4 Add support for configuring Jetty's request log via the environment
See gh-8819
2017-04-26 19:35:43 +02:00
Stephane Nicoll 45f76965f6 Rename cassandra bean names
Closes gh-8982
2017-04-26 15:47:20 +02:00
Stephane Nicoll 47037d5227 Polish "Add reactive support for Spring Data Cassandra"
Closes gh-8568
2017-04-26 15:31:01 +02:00
Eddú Meléndez abd35f041b Add reactive support for Spring Data Cassandra
See gh-8568
2017-04-26 15:31:01 +02:00
Madhura Bhave bc1ee76b55 Change default for new_generator_mappings to true
Closes gh-7612
2017-04-25 12:09:36 -07:00
Phillip Webb 1ad318d8a6 Refine Mustache support
Refine Mustache support to provide a cleaner separation between the
reactive and servlet implementations. The views have now moved to the
`spring-boot` project and the auto-configuration has been split into
two distinct `@Imports` to save needing full package declarations.

See gh-8941
2017-04-25 10:07:22 -07:00
Phillip Webb 06558675bb Polish 2017-04-25 09:45:14 -07:00
Brian Clozel ec25e51f1f Refactor Mustache views support in Spring MVC
This commit simplifies the Mustache support for Spring MVC and removes
the included (view-based) i18n support in favor of more idiomatic
constructs like Mustache lambdas.

Fixes gh-8941
2017-04-25 11:27:18 +02:00
Brian Clozel 7e77e648bf Add Mustache support for Spring WebFlux apps
This commit moves the existing Spring MVC Mustache support to its own
`servlet` package and adds a new one under `reactive` for the WebFlux
web applications.

New `MustacheView` and `MustacheViewResolver` types resolve and render
Mustache views for WebFlux applications.

Since this templating engine is now supported by two flavors of Spring
web apps, the `spring-boot-starter-mustache` does not depend anymore on
the `spring-boot-starter-web` one: it's up to the developer to add the
relevant starter `web` or `webflux` to their application.

Fixes gh-8648
2017-04-25 11:27:18 +02:00
Madhura Bhave c2e5fd031a Replace usage of WebMvcConfigurerAdapter
Closes gh-8964
2017-04-24 15:31:39 -07:00
Phillip Webb 28d6881118 Formatting 2017-04-24 14:33:50 -07:00