Commit Graph

2828 Commits

Author SHA1 Message Date
Stephane Nicoll a4688bdb86 Polish "Use Redis client configuration to configure connection factories"
In particular, the Lettuce code is not using the new builder API when
pooling is required. This will be fixed in a future milestone.

Closes gh-9510
2017-06-14 15:33:56 +02:00
Mark Paluch 866fdb5d91 Use Redis client configuration to configure connection factories
We now use LettuceClientConfiguration and JedisClientConfiguration to
configure connection factories. Client-specific configuration can be
customized by providing LettuceClientConfigurationBuilderCustomizer and
JedisClientConfigurationBuilderCustomizer beans.

See gh-9510, gh-8894, gh-9490
2017-06-14 14:14:07 +02:00
Stephane Nicoll f05f1bcfba Polish "Add support for Kafka batch listener"
This commit reworks the property to be an enum with the list of
supported listener types rather than a boolean that flip to a
batch listener.

Closes gh-9448
2017-06-14 11:15:31 +02:00
mzagar 257f44357e Add support for Kafka batch listener
This commit adds a `spring.kafka.listener.batch-listener` property so
that a batch listener is created automatically.

See gh-9448
2017-06-14 11:15:31 +02:00
Stephane Nicoll be00dfafde Fix build failure
Force the use of the http Neo4j driver as the bolt one attempts to
connect to the server on startup by default (and there is no way to
disable that behaviour).

See https://github.com/neo4j/neo4j-java-driver/issues/380

Closes gh-9499
2017-06-13 11:44:25 +02:00
Phillip Webb b94bb00fa1 Remove need for attached test-jar artifacts
Remove test-jar artifacts from Maven projects and relocate classes. The
majority of utilities now live in the `spring-boot-testsupport` module.

This update will help us to deploy artifacts using the standard Maven
deploy plugin in the future (which doesn't support the filtering of
individual artifacts).

Fixes gh-9493
2017-06-12 21:11:35 -07:00
Andy Wilkinson aecfdc1dd8 Upgrade to Elasticsearch 5.4.1
Closes gh-9476
2017-06-12 18:36:38 +01:00
Andy Wilkinson 6ff449bd78 Align WebFluxAutoConfigurationTests with breaking Framework change
CompositeContentTypeResolver was recently removed [1] and
WebFluxConfigurationSupport now creates a RequestedContentTypeResolver
bean instead. This commit updates WebFluxAutoConfigurationTests
accordingly.

[1] 01a92517bd
2017-06-12 12:18:47 +01:00
Andy Wilkinson f7e9ec5f42 Minimise our usage of SocketUtils.findAvailableTcpPort
Closes gh-9382
2017-06-09 14:45:09 +01:00
Andy Wilkinson 10868519e1 Adapt to breaking API change in Spring Data Commons 2017-06-09 13:53:11 +01:00
Andy Wilkinson f5da19f2db Align HikariDriverConfigurationFailureAnalyzer with latest Framework change
The Framework now throws a CannotGetJdbcConnectionException rather
than an IllegalStateException.
2017-06-09 12:38:07 +01:00
Vedran Pavic a80348753d Fix `QuartzAutoConfigurtion` failure with multiple `Executor` beans
`QuartzAutoConfigurtion` currently blows up if there are multiple
`Executor` beans in the context.

This commit changes the configuration to retrieve `Executor` bean using
`ObjectProvider#getIfUnique` which won't fail in scenarios where there
are multiple `Executor` beans with none marked as `@Primary`.

Closes gh-9434
2017-06-09 09:00:16 +03:00
Johnny Lim bbab520926 Polish
Closes gh-9438
2017-06-09 08:54:55 +03:00
Andy Wilkinson 0061554105 Merge branch '1.5.x' 2017-06-07 17:19:56 +01:00
Andy Wilkinson e5906a6b64 Allow HttpMsgConverter to depend on ConvService without creating a cycle
In an MVC web application, DelegatingWebMvcConfiguration provides the
ConversionService while also consuming WebMvcConfigurerAdapters that,
among other things, can configure HTTP message converters. Boot's
WebMvcConfigurerAdapter, WebMvcAutoConfigurationAdapter, consumes
the HttpMessageConverters bean and uses it to configure Spring MVC's
HTTP message converters. This can create a bean dependency cycle if
an HTTP message converter bean depends, directly or indirectly on
the ConversionService. An example of the cycle is:

┌─────┐
|  jsonComponentConversionServiceCycle.ThingDeserializer defined in …
↑     ↓
|  org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration
↑     ↓
|  org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter
↑     ↓
|  org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration
↑     ↓
|  mappingJackson2HttpMessageConverter defined in class path resource [org/springframework/boot/autoconfigure/web/JacksonHttpMessageConvertersConfiguration$MappingJackson2HttpMessageConverterConfiguration.class]
↑     ↓
|  jacksonObjectMapper defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class]
└─────┘

This commit breaks the cycle by making WebMvcAutoConfigurationAdapter
consume HttpMessageConverters lazily. This allows the adapter to be
created without triggered instantiation of every HTTP message
converter bean and all their dependencies. This allows it to be
injected into DelegatingWebMvcConfiguration without triggering an
attempt to retrieve the ConversionService.

Closes gh-9409
2017-06-07 17:18:09 +01:00
Andy Wilkinson 6b7dfce5c6 Formatting 2017-06-07 17:17:57 +01:00
Andy Wilkinson a03ddd331c Polishing 2017-06-07 17:14:26 +01:00
Andy Wilkinson d0c8f80117 Merge branch '1.5.x' 2017-06-06 11:46:32 +01:00
Andy Wilkinson ad629055fa Ensure that custom static resource locations end with /
Closes gh-9360
2017-06-06 11:39:04 +01:00
Stephane Nicoll 7f420d1268 Polish contribution
Closes gh-9411
2017-06-06 10:52:31 +02:00
Vedran Pavic db060c847d Ensure `QuartzDatabaseInitializer` is initialized before `Scheduler`
If the auto-configured `Scheduler` instance backed by JDBC job store is
used as a dependency in an application component, the initialization of
`Scheduler` will be triggered before `QuartzDatabaseInitializer`. This
will result in failure due to schema not being prepared in time for
`Scheduler` to populate job details.

This commit ensures `QuartzDatabaseInitializer` is initialized before the
auto-configured `Scheduler` by introducing a dependency between the two.

See gh-9411
2017-06-06 10:14:49 +02:00
Stephane Nicoll 540dca7bdd Revisit InfluxDB configuration structure
This commit removes the `client` namespace for InfluxDB as the
component that is created is `InfluxDB`, not `InfluxDBClient` or
something.

This aligns with all the other url/user/password properties Spring
Boot provides already

See gh-9066
2017-06-05 11:00:14 +02:00
Phillip Webb 2c7dd9f519 Polish 2017-06-02 16:00:39 -07:00
Phillip Webb 8f7004738b Merge branch '1.5.x' 2017-06-02 13:48:27 -07:00
Phillip Webb b9fd99e268 Polish 2017-06-02 13:47:28 -07:00
Stephane Nicoll 9624bf14c4 Merge branch '1.5.x' 2017-06-02 17:58:18 +02:00
Stephane Nicoll f11edd1eb3 Add missing `@Configuration` on `EmbeddedDatabaseConfiguration` 2017-06-02 17:42:18 +02:00
Andy Wilkinson 8353843006 Merge branch '1.5.x' 2017-06-02 14:19:52 +01:00
Andy Wilkinson a347383111 Merge branch '1.4.x' into 1.5.x 2017-06-02 14:18:44 +01:00
Andy Wilkinson bf656c70ad Improve MultipartProperties' javadoc
Closes gh-9073
2017-06-02 14:13:26 +01:00
Stephane Nicoll 5e5b7e20ff Merge branch '1.5.x' 2017-06-02 14:57:08 +02:00
Stephane Nicoll c736a1698b Clarify default value of `ConditionalOnMissingBean` on bean methods
Closes gh-9387
2017-06-02 14:55:58 +02:00
Stephane Nicoll 297127e075 Polish "Add influxDB java client auto-configuration"
Closes gh-9066
2017-06-02 10:47:50 +02:00
Sergey Kuptsov 6a70b90128 Add influxDB java client auto-configuration
See gh-9066
2017-06-02 09:57:45 +02:00
Stephane Nicoll ba1bc45a53 Polish "Add PoolingOptions to CasandraProperties"
Closes gh-7946
2017-06-01 16:04:49 +02:00
Vladimir Tsanev 2aafc7daa9 Add PoolingOptions to CasandraProperties
This change allows users to configure some basic pooling
options for cassandra driver via configuration properties.

See gh-7946
2017-06-01 14:33:14 +02:00
Stephane Nicoll 5ea3ab4595 Polish "Allow to customize the JdbcTemplate"
Closes gh-7960
2017-06-01 10:50:52 +02:00
Kazuki Shimizu fa357f0e27 Allow to customize the JdbcTemplate
See gh-7960
2017-06-01 10:50:43 +02:00
Stephane Nicoll ad85902880 Reuse JdbcTemplate in NamedParameterJdbcTemplate
This commit makes sure to reuse an existing or auto-configured
`JdbcTemplate` when auto-configuring a `NamedParameterJdbcTemplate`.

This ensures that whatever customizations have been applied on the
`JdbcTemplate` are properly shared.

Closes gh-4945
2017-06-01 10:08:13 +02:00
Phillip Webb 42762a66b8 Upgrade to Elasticsearch 5.4.0
Upgrade to Elasticsearch 5.4.0 and fix auto-configuration to account for
API changes.

See gh-9374
2017-05-31 21:48:14 -07:00
Stephane Nicoll 6f25131a1d Polish 2017-05-31 17:25:38 +02:00
Andy Wilkinson 5ef29653c7 Polish 2017-05-31 15:05:19 +01:00
Andy Wilkinson a9cecc860c Apply TestPropertyValues to the context under test
Closes gh-9367
2017-05-31 15:05:18 +01:00
Stephane Nicoll eaa34874e8 Polish "Allow customization of MongoClientSettings.Builder"
Closes gh-9341
2017-05-31 15:48:22 +02:00
Mark Paluch eeb961075f Allow customization of MongoClientSettings.Builder
MongoClientSettingsBuilderCustomizer allows customization of the
auto-configured `MongoClientSettings.Builder`.

See gh-9341
2017-05-31 15:48:22 +02:00
Stephane Nicoll 026682d7e3 Polish jOOQ auto-configuration 2017-05-31 11:25:26 +02:00
Stephane Nicoll efdf451e6e Polish "Auto-detect jOOQ dialect"
Closes gh-9355
2017-05-31 11:16:12 +02:00
Michael J. Simons 1b4c5dffaf Auto-detect jOOQ dialect
See gh-9355
2017-05-31 10:43:40 +02:00
Stephane Nicoll 59a15b259c Polish "Add Quartz Scheduler support"
Closes gh-4299
2017-05-30 18:48:12 +02:00
Vedran Pavic 9e23206c31 Add Quartz Scheduler support
See gh-4299
2017-05-30 18:48:12 +02:00
Vedran Pavic 639641feea Replace `WebMvcRegistrationsAdapter` with default methods
Closes gh-9340
2017-05-30 14:14:47 +02:00
Stephane Nicoll 677d52f494 Polish "Add Spring Data Web configuration properties"
Closes gh-9339
2017-05-30 11:19:21 +02:00
Vedran Pavic e9ac41f83f Add Spring Data Web configuration properties
This commit adds support for configuring Spring Data Web
`PageableHandlerMethodArgumentResolver` and
`SortHandlerMethodArgumentResolver` using configuration properties.

See gh-9339
2017-05-30 10:07:14 +02:00
Stephane Nicoll 7aa84cf395 Fix checkstyle violation 2017-05-29 17:09:13 +02:00
Stephane Nicoll a05dd4a1b3 Polish 2017-05-29 16:23:36 +02:00
Stephane Nicoll b8591206d5 Polish 2017-05-29 11:49:46 +02:00
Stephane Nicoll 062dc3cb9a Upgrade to Neo4J OGM 2.1.3
Closes gh-9335
2017-05-29 11:48:55 +02:00
Stephane Nicoll 337e645263 Upgrade to Atomikos 4.0.4
Closes gh-5591
2017-05-29 09:44:10 +02:00
Johnny Lim 6939ff1e65 Polish
Closes gh-9330
2017-05-28 17:46:43 +02:00
Stephane Nicoll 9332a3a4ae Merge branch '1.5.x' 2017-05-28 17:46:00 +02:00
Stephane Nicoll b5709fd618 Polish
See gh-9330
2017-05-28 17:44:58 +02:00
Madhura Bhave d745b69630 Replace usages of EnvironmentTestUtils 2017-05-24 14:59:04 -07:00
Brian Clozel fed8c8a681 Adapt WebFlux.fn auto-config to SPR-15536
Since SPR-15536, WebFlux.fn is now configured with `@EnableWebFlux`,
along the annotated controllers. Both `RouterFunction` and Controller
instances can now live within the same application and they share
the same web infrastructure.

This commit removes the custom auto-configuration for `RouterFunction`
and relies on `@EnableWebFlux` for that.

Closes gh-9165
2017-05-24 14:54:05 +02:00
Andy Wilkinson 48fb0f4ad5 Polish "Adapt to relocated packages in Spring Data Cassandra"
Closes gh-9291
2017-05-24 11:11:53 +01:00
Mark Paluch 7e8e2c486e Adapt to relocated packages in Spring Data Cassandra
See gh-9291
2017-05-24 11:11:36 +01:00
Phillip Webb 6531423519 Fix following upstream API change
Update implementations of `WebFluxConfigurer` to no longer return an
`Optional` validator.
2017-05-23 17:04:44 -07:00
Phillip Webb 05111a17b8 Polish 2017-05-23 17:04:44 -07:00
Andy Wilkinson d5438c299c Polish "Use try-with-resources to close resources automatically"
- Apply code formatting
- Use try-with-resources in many other places that were missed in the
  pull request

Closes gh-8045
2017-05-23 19:38:48 +01:00
rajadilipkolli 3e797c326a Use try-with-resources to close resources automatically
See gh-8045
2017-05-23 17:34:35 +01:00
Andy Wilkinson 9192db692b Use WebRequest rather than RequestAttributes in ErrorAttributes
This change aligns ErrorAttributes with ResponseEntityExceptionHandler
which takes a WebRequest as a parameter of its handleException method.
WebRequest extends RequestAttributes and provides access to much more
than just the request's attributes. For example request headers and
parameters are available from WebRequest.

Closes gh-7952
Closes gh-6555
2017-05-23 15:15:22 +01:00
Stephane Nicoll 8094a6409f Fix build
Spring Session's MongoDB store is no longer supported on master.
2017-05-23 14:14:12 +02:00
Stephane Nicoll 41a36b3f7a Merge branch '1.5.x' 2017-05-23 11:40:26 +02:00
Stephane Nicoll 50876382db Improve Spring Session validation message
Closes gh-9284
2017-05-23 11:37:26 +02:00
Andy Wilkinson 3def99ad7b Align with breaking API changes in latest Spring Framework snapshots 2017-05-23 09:40:14 +01:00
Andy Wilkinson d4140d6a69 Configure Undertow to eagerly initialize Filters by default
Closes gh-9232
2017-05-22 16:58:16 +01:00
Phillip Webb 302f038e84 Polish 2017-05-15 20:35:29 -07:00
Phillip Webb f4444a36b3 Merge branch '1.5.x' 2017-05-15 16:00:28 -07:00
Phillip Webb 440d03bf9e Merge branch '1.4.x' into 1.5.x 2017-05-15 15:59:08 -07:00
Phillip Webb 9a4a20537c Polish 2017-05-15 11:19:19 -07:00
Andy Wilkinson 2c315d3d6f Merge branch '1.5.x' 2017-05-15 17:44:50 +01:00
Andy Wilkinson fd2ab2fee0 Merge branch '1.4.x' into 1.5.x 2017-05-15 17:44:42 +01:00
Andy Wilkinson 198093c6a8 Fix violation reported by Checkstyle 2017-05-15 17:44:17 +01:00
Andy Wilkinson 8afaba0b9f Merge branch '1.5.x' 2017-05-15 17:11:56 +01:00
Andy Wilkinson 5693acf558 Merge branch '1.4.x' into 1.5.x 2017-05-15 17:08:53 +01:00
Andy Wilkinson a6f8351dd6 Close Liquibase-specific DataSource once database has been migrated
Previously, when the liquibase.url, .username, and .password
properties were used to configure a DataSource specifically for
Liquibase that DataSource would never be explicitly closed. As it is
created by DataSourceBuilder with no explicitly configured type it
will use whichever connection pool is available and, therefore, will
create and keep open the pool's minimum number of connections. This
is an unnecessary use of resources both in the application and in the
database.

This commit updates LiquibaseAutoConfiguration so that if it uses
DataSourceBuilder to create a DataSource then it will also close that
DataSource once the database has been migrated.

Closes gh-9218
2017-05-15 17:08:45 +01:00
Stephane Nicoll 1480f0717f Polish "Add Kafka Kerberos Configuration Properties"
Closes gh-9151
2017-05-14 18:13:00 +02:00
Gary Russell c4cfc4dd0c Add Kafka Kerberos Configuration Properties
See gh-9151
2017-05-14 17:56:53 +02:00
Stephane Nicoll b2e3c5dd61 Fix order of connection pools in DataSourceBuilder
Closes gh-6013
2017-05-14 17:48:48 +02:00
Madhura Bhave f15cf4b991 Remove redundant uses of @NestedConfigurationProperty
Closes gh-9216
2017-05-12 10:43:43 -07:00
Andy Wilkinson 61d89ef207 Remove misleading use of legacy from simple container's description
Closes gh-9173
2017-05-12 17:30:17 +01:00
Stephane Nicoll cf88508e1d Avoid exposing `spring.resources.favicon-locations` as a property
Closes gh-9214
2017-05-12 17:25:35 +02:00
Brian Clozel d7ba7ecc48 Allow RouterFunction parameterized with different types
This commit allows *any* type of `RouterFunction` to be injected in the
WebFlux.fn auto-configuration; previously the `RouterFunction<T>` would
restrict injected beans to a single parameterized type.

Doing requires using the `RouterFunction.andOther` method to collect
them.

Fixes gh-9181
2017-05-12 17:18:14 +02:00
Brian Clozel 4a47c1eff8 Keep default Thymeleaf media types in reactive support
This commit removes the default configuration value previously set
for `spring.thymeleaf.reactive.media-types` since this value overrides
the defaults provided by Thymeleaf.

This value does not drive the default media type used by views, but
rather all media types that the templating engine should support.

Fixes gh-9134
2017-05-12 17:17:49 +02:00
Brian Clozel 89c284cb13 Add reactive websocket auto-configuration for Tomcat
This commit adds a `TomcatWebSocketReactiveWebServerCustomizer`
that customizes the Tomcat context to accept WebSockets connections.
Since reactive servers don't use the JSR 356 for that support,
only Tomcat customization is required for now.

This commit also reorders the server auto-configuration
so that undertow has a chance to be auto-configured before
reactor-netty, which should be a popular dependency thanks to
its HTTP client library.

The existing WebSocket infrastructure for Serlvet based containers
has been moved to a dedicated package and renamed accordingly.

Fixes gh-9113
2017-05-12 17:17:35 +02:00
Andy Wilkinson 9f55deeb95 Merge branch '1.5.x' 2017-05-12 15:01:06 +01:00
Andy Wilkinson a2e749940e Merge branch '1.4.x' into 1.5.x 2017-05-12 15:00:58 +01:00
Andy Wilkinson a3f5cbc4a2 Polishing 2017-05-12 15:00:44 +01:00
Andy Wilkinson 47807b8925 Upgrade to SendGrid 3.2.0
Closes gh-9211
2017-05-12 14:22:45 +01:00
Andy Wilkinson f24b55a236 Upgrade to Thymeleaf 3.0.6.RELEASE
Closes gh-9207
2017-05-12 13:20:47 +01:00
Andy Wilkinson b71daac58a Remove redundant logic for uninstalling Tomcat's URL stream handler factory
Closes gh-8622
2017-05-11 17:22:15 +01:00
Vedran Pavic 94f96a281f Improve `HashMapSessionConfiguration`
This commit updates `MapSessionRepository` bean definition return type
and applies equivalent change to `SessionAutoConfigurationTests`.

These changes also ensure compatibility with Spring Session 2.0 which
will merge `ExpiringSession` API with `Session` API.

Closes gh-9145
2017-05-11 14:05:25 +02:00
Andy Wilkinson 9ee1edcca5 Polishing 2017-05-10 10:12:17 +01:00
Andy Wilkinson 9480e09c21 Upgrade to Spring Security 5.0.0.M1
Closes gh-8714
2017-05-10 08:48:32 +01:00
Phillip Webb 5cad11d6d2 Formatting 2017-05-09 21:59:59 -07:00
Phillip Webb fd2e3b3505 Merge branch '1.5.x' 2017-05-09 21:55:31 -07:00
Phillip Webb 4a7dcc8786 Formatting 2017-05-09 21:43:24 -07:00
Stephane Nicoll 275bff39aa Remove deprecated code
Closes gh-8891
2017-05-05 14:32:09 +02:00
Stephane Nicoll 1e9c1a68e4 Remove deprecated spring.rabbitmq.listener.* properties
See gh-9055, gh-9108
2017-05-05 12:03:21 +02:00
Stephane Nicoll 2894e57146 Polish "Support direct AMQP container"
Closes gh-9055
2017-05-05 11:32:25 +02:00
Gary Russell 6eddf1b372 Support direct AMQP container
Add support for auto configuration - select container type and separate
discrete properties.

See gh-9055
2017-05-05 10:08:13 +02:00
Stephane Nicoll 0f38031f93 Merge branch '1.5.x' 2017-05-05 10:04:27 +02:00
Stephane Nicoll e236b71615 Move RabbitMQ Simple listener support to dedicated namespace
Move `spring.rabbitmq.listener.*` to `spring.rabbitmq.listener.simple.*`
in preparation for Spring AMQP 2.0 that supports different container
types.

Closes gh-9108
See gh-9055
2017-05-05 10:03:47 +02:00
Phillip Webb a841a6a11d Polish 2017-05-04 11:41:15 -07:00
Andy Wilkinson 525f421441 Update MultipartProperties' prefix to reflect that it's Servlet-specific
Closes gh-8628
2017-05-04 16:47:46 +01:00
Andy Wilkinson 9caf82ce80 Remove redundant ordering from ImportBeanDefinitionRegistrar implementations
Closes gh-8603
2017-05-04 16:30:01 +01:00
Stephane Nicoll 0aded58884 Polish "Add auto-configuration support for Hazelcast client"
Closes gh-7469
2017-05-04 15:52:02 +02:00
Vedran Pavic 3fbf1a2ea6 Add auto-configuration support for Hazelcast client
See gh-7469
2017-05-04 14:20:03 +02:00
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
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