Commit Graph

255 Commits

Author SHA1 Message Date
Andy Wilkinson 23d8d608c4 Polish 2018-01-15 13:35:46 +00:00
Brian Clozel 67e5897c40 Disable suffix pattern matching in Spring MVC
This commit disables by default suffix pattern matching in Spring MVC
applications. As described in the Spring MVC documentation (see
https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html#mvc-ann-requestmapping-suffix-pattern-match),
this is considered as best practice.

This change also introduces new configuration properties to achieve
similar results in a safer way (using query parameters) or to rollback
to the former default.

Closes gh-11105
2018-01-15 11:58:26 +01:00
Johnny Lim 77150f8dc9 Polish
Closes gh-11630
2018-01-15 10:20:31 +01:00
Stephane Nicoll 3f88906b97 Fix handling of ResponseStatusException
This commit updates DefaultErrorAttributes to handle
ResponseStatusException explicitly. This exception is used in a
WebFlux application to signal that the processing of the query has
failed with an HTTP status code and a reason phrase. The latter is now
properly mapped to the `message` attribute of the response body.

Closes gh-11614
2018-01-15 10:03:15 +01:00
Andy Wilkinson 2b99962a85 Replace use of Date with OffsetDateTime and Instant in Actuator
Closes gh-10976
2018-01-12 17:26:05 +00:00
Stephane Nicoll 8aaf95b792 Polish 2018-01-12 11:40:35 +01:00
Johnny Lim 136e26e307 Fix typo in DynamicRegistrationBean class name
Closes gh-11606
2018-01-12 01:44:45 +01:00
Stephane Nicoll 4a9123d6e3 Detect user-defined RedisCacheConfiguration
This commits improves the cache auto-configuration for Redis by looking
up a custom "RedisCacheConfiguration" bean that allows to take full
control over the `RedisCacheManager`.

Closes gh-11599
2018-01-11 11:52:08 +01:00
Brian Clozel 98ac2218db Apply server.undertow.* config to reactive servers
This commit applies `server.undertow.*` configuration properties
to Undertow when configured as a reactive web server.

See gh-11500
2018-01-11 11:15:23 +01:00
Brian Clozel 15bc718248 Apply server.jetty.* config to reactive servers
This commit applies `server.jetty.*` configuration properties
to Jetty when configured as a reactive web server.

It also removes some infrastructure support for Jetty 8, which
is not supported anymore in Spring Boot 2.0 (partial fix for
gh-11504).

See gh-11500
2018-01-11 11:15:17 +01:00
Brian Clozel d264af8142 Apply server.tomcat.* config to reactive servers
This commit applies most `server.tomcat.*` configuration
properties to Tomcat when set up as a reactive web server.

Some Servlet-specific properties are not applied:

* server.tomcat.additional-tld-skip-patterns
* server.tomcat.redirect-context-root
* server.tomcat.use-relative-redirects

Fixes gh-11334
2018-01-11 11:15:02 +01:00
Stephane Nicoll b2eae0006d Polish "Make GsonAutoConfiguration align with JacksonAutoConfiguration"
Closes gh-11591
2018-01-11 10:36:58 +01:00
Johnny Lim 50518514b0 Make GsonAutoConfiguration align with JacksonAutoConfiguration
See gh-11591
2018-01-11 10:16:35 +01:00
Madhura Bhave e57aafd63d Provide EndpointRequest for WebFlux-based Security
Closes gh-11022
2018-01-09 16:06:36 -08:00
Phillip Webb b078698f20 Update copyright year of changed files 2018-01-09 12:13:27 -08:00
Phillip Webb b3ec2c9d1d Polish 2018-01-09 12:12:59 -08:00
Stephane Nicoll df647605af Merge branch '1.5.x' 2018-01-09 13:28:08 +01:00
Johnny Lim b8706c47d6 Use instance equality for Class
Closes gh-11534
2018-01-09 09:30:36 +01:00
Johnny Lim 0f0c6e0729 Polish
Closes gh-11536
2018-01-09 09:28:56 +01:00
Phillip Webb 286a3bb10a Polish GSON customization support
Closes gh-11498
2018-01-08 23:13:46 -08:00
ioann ba552f1d24 Allow GSON customization via properties or beans
Update GSON support to allow customization with either properties or
customize beans.

See gh-11498
2018-01-08 22:37:55 -08:00
Phillip Webb 9cb5f3da89 Create DynamicRegistrationBean
Extract functionality from the `RegistrationBean` into a new class
designed to work with dynamic registration. Servet and Filter
registration beans now extend from `DynaimcRegistrationBean`, where as
`ServletListenerRegistrationBean` extends directly from
`RegistrationBean`.

This refactor allows the removal of `ServletListenerRegistrationBean`
deprecated methods.

Fixes gh-11344
2018-01-08 22:05:00 -08:00
Phillip Webb fb614c64da Revert "Build against Spring Security 5.0.1 SNAPSHOT"
This reverts commit 2c52b9e87a
since the SNAPSHOT BOM doesn't appear to be published.

See gh-11573
2018-01-08 18:09:07 -08:00
Phillip Webb 2d76aad03e Further refine test containers 2018-01-08 17:24:42 -08:00
Phillip Webb 201da97774 Further refine test containers 2018-01-08 16:32:39 -08:00
Phillip Webb 2c52b9e87a Build against Spring Security 5.0.1 SNAPSHOT
See gh-11573
2018-01-08 15:19:06 -08:00
Phillip Webb 19ce0aa4f0 Refine BackgroundPreinitializer
Update `BackgroundPreinitializer` to start initialization earlier. Also
refine the startup order and initialize Charsets.

Fixes gh-11570
See gh-11412
2018-01-08 15:19:06 -08:00
Phillip Webb 25609c060e Polish 2018-01-08 15:19:06 -08:00
Madhura Bhave 9a6c339243 Use TestContainers util from spring-boot-test-support
See gh-10516
2018-01-08 14:05:15 -08:00
Andy Wilkinson 996b3ef7f2 Refine test containers 2018-01-08 14:05:05 -08:00
Andy Wilkinson 12e1fcbfab Do not pass null credential from ConnectionString to Mongo builder 2018-01-08 15:21:14 +00:00
Andy Wilkinson c7f5f0735d Stop reusing the Cluster when waiting for Cassandra to start
See gh-10516
2018-01-08 14:13:21 +00:00
Andy Wilkinson 927003e0b7 Polish 2018-01-08 13:59:14 +00:00
Stephane Nicoll b98c7ed9f8 Add InvalidConfigurationPropertyValueException
This commit adds a new exception type that denotes the value of a
configuration key is invalid, alongside a FailureAnalyzer that reports
a human-readable report when such exception is thrown on startup.

ResourceNotFoundException being a (useless) specialization of this new
exception, its usage has been refactored to use the more general
exception type.

Closes gh-10794
2018-01-08 14:24:57 +01:00
Stephane Nicoll b7f60c2ded Configure NettyStreamFactoryFactory by default if available
Closes gh-11526
Closes gh-10961
2018-01-08 10:46:51 +01:00
Stephane Nicoll 06572b0101 Polish 2018-01-08 10:10:50 +01:00
Brian Clozel 2bf15f814e Polish
This commit fixes the `responseCommitted` test in
`DefaultErrorWebExceptionHandlerIntegrationTests` and reworks the whole
test class to use the `ContextRunner` infrastructure.

Fixes gh-11519
2018-01-05 18:55:13 +01:00
Stephane Nicoll c4db22007c Polish "Add support for additional Kafka listener properties"
Closes gh-11502
2018-01-05 14:35:04 +01:00
Gary Russell 6fcbf80b31 Add support for additional Kafka listener properties
See gh-11502
2018-01-05 14:11:34 +01:00
Andy Wilkinson 94d5836618 Merge branch '1.5.x' 2018-01-05 12:02:11 +00:00
Stephane Nicoll 59d5ed5842 Add support for advanced customization of Hibernate settings
As HibernateJpaConfiguration is package private, it is no longer
possible to extend the default Spring Boot configuration to apply
advanced settings. The most notable use case for this is the
customization of Hibernate properties using instance value vs. string
value that can be set using the "spring.jpa.properties" namespace.

This commit adds a HibernatePropertiesCustomizer callback interface that
can be implemented to tune Hibernate properties at will.

Closes gh-11211
2018-01-05 12:19:22 +01:00
Stephane Nicoll 641013787d Polish 2018-01-05 11:40:26 +01:00
Stephane Nicoll ac004eabf3 Update copyright header
See gh-11510
2018-01-05 10:30:43 +01:00
Johnny Lim 37d8eedae3 Polish
Closes gh-11510
2018-01-05 10:29:22 +01:00
Madhura Bhave e28915bd4b Make integration tests self-contained
Fixes gh-10516
2018-01-04 11:26:40 -08:00
Phillip Webb bee5fa7fc6 Polish 2018-01-03 13:24:04 -08:00
Phillip Webb 37fe7bc8f6 Update validator background initializer
Update the validator background initializer to actually create
the validator.

Closes gh-11412
2018-01-03 13:19:31 -08:00
Madhura Bhave 716543828a Refactor some tests to use ApplicationContextRunner 2018-01-03 11:07:19 -08:00
Johnny Lim 24b5a78e39 Polish
Closes gh-11448
2017-12-30 17:21:13 +01:00
Madhura Bhave a46d1416ee Reinstate required parameter 2017-12-29 13:16:26 -08:00