Commit Graph

1386 Commits

Author SHA1 Message Date
Simon Braconnier 1a238bae29 Add JODConverter support
Closes gh-12098
2018-02-17 10:34:23 +01:00
Phillip Webb 1d83e87bcd Validate @ConfigurationProperties on @Bean methods
Refactor `ConfigurationPropertiesBindingPostProcessor` to allow JSR-303
validation on `@ConfigurationProperties` defined at the `@Bean` method
level.

JSR-303 validation is now applied when a JSR-303 implementation is
available and `@Validated` is present on either the configuration
properties class itself or the `@Bean` method that creates it.

Standard Spring validation is also supported using a validator bean
named `configurationPropertiesValidator`, or by having the configuration
properties implement `Validator`.

The commit also consolidates tests into a single location.

Fixes gh-10803
2018-02-16 18:11:54 -08:00
Phillip Webb 9e75680e6f Polish 2018-02-16 18:11:54 -08:00
Brian Clozel db7268b841 Fix TestRestTemplate request factory management
This commit fixes two issues in `TestRestTemplate`:

* it improves the detection of the underlying request factory, using
reflection to look inside the intercepting request factory if
interceptors were configured

* it avoids reusing the same request factory when creating a new
`TestRestTemplate` with `withBasicAuth`. Sharing the same instance would
result in sharing authentication state (HTTP cookies). Since the
original request factory can't be detected consistently, a new one is
selected automatically

See gh-8697
2018-02-16 22:36:20 +01:00
Madhura Bhave 51de220b55 Enable CSRF protection by default
Fixes gh-11758
2018-02-16 13:31:51 -08:00
Andy Wilkinson d1714a5c2a Upgrade to Hazelcast 3.9.3
Closes gh-12094
2018-02-16 20:32:14 +00:00
Andy Wilkinson c1c162ab0c Polish "Add auto-configuraton for exporting metrics to Wavefront"
Closes gh-12068
2018-02-16 20:30:31 +00:00
Jon Schneider 142dbb2213 Add auto-configuration for exporting metrics to Wavefront
See gh-12068
2018-02-16 20:00:45 +00:00
Andy Wilkinson 46eb88c299 Use Spring Session's bom for its dependency management
Closes gh-11853
2018-02-16 17:40:40 +00:00
Andy Wilkinson 17c7f027e0 Add details of the request mapping conditions to mappings endpoint
Closes gh-12080
2018-02-16 17:36:06 +00:00
Andy Wilkinson 2c19257d6d Add HandlerMethod and HandlerFunction details to mappings endpoint
Closes gh-11864
2018-02-16 17:08:47 +00:00
Brian Clozel 7ed4273fc3 Fix Redis Cache tests after key prefix changes
Update Redis Cache tests after changes in DATAREDIS-715.
2018-02-16 14:43:45 +01:00
Stephane Nicoll 99466e7fa6 Polish 2018-02-16 14:04:44 +01:00
Stephane Nicoll e2cb5349ba Merge micrometer docs
Closes gh-11930
2018-02-16 13:53:53 +01:00
Brian Clozel 03a6f97e76 TestRestTemplate should not override request factory
Previously `TestRestTemplate` would override the configured
`ClientHttpRequestFactory` if the Apache HTTP client library was on
classpath.

This commit fixes two issues:

1. The existing `ClientHttpRequestFactory` is overridden *only* if it is
using the Apache HTTP client variant, in order to wrap it with the
`TestRestTemplate` custom support

2. Calling `withBasicAuth` will no longer directly use the request
factory returned by the internal `RestTemplate`; if client interceptors
are configured, the request factory is wrapped with an
`InterceptingClientHttpRequestFactory`. If we don't unwrap it,
interceptors are copied/applied twice in the newly created
`TestRestTemplate` instance. For that, we need to use reflection as the
underlying request factory is not accessible directly.

Closes gh-8697
2018-02-16 12:29:47 +01:00
Andy Wilkinson 7872cda8c1 Try building against Spring Security 5.0.2 snapshots again
See gh-11870
2018-02-16 10:03:57 +00:00
Andy Wilkinson fe4c8f95ed Rename ReactiveWebServerAutoConfiguration
Closes gh-12086
2018-02-16 10:02:35 +00:00
Andy Wilkinson e72506c353 Protect TomcatMetrics auto-config against early MeterBinder init
Closes gh-11916
2018-02-16 09:07:12 +00:00
Andy Wilkinson 72740f6b59 Merge pull request #12082 from Vedran Pavic
* gh-12082:
  Use Jersey BOM in dependency management
2018-02-16 08:26:17 +00:00
Vedran Pavic da7bf05c87 Use Jersey BOM in dependency management
Closes gh-12082
2018-02-16 08:25:20 +00:00
Brian Clozel 7a97764539 Update to Reactor Bismuth SNAPSHOTs 2018-02-16 08:45:47 +01:00
Andy Wilkinson a8899feea3 Merge branch '1.5.x' 2018-02-15 16:23:17 +00:00
Andy Wilkinson 87953b32b1 Merge pull request #12073 from Sébastien Deleuze
* gh-12073:
  Polish "Add Kotlin support reference documentation"
  Add Kotlin support reference documentation
2018-02-15 15:56:46 +00:00
Andy Wilkinson d96c570664 Polish "Add Kotlin support reference documentation"
Closes gh-12073
2018-02-15 15:55:48 +00:00
sdeleuze 889a06b65b Add Kotlin support reference documentation
See gh-12073
2018-02-15 15:55:42 +00:00
Brian Clozel 0c1aac14a0 Move server.display-name configuration property
The `server.display-name` configuration property is used to configure
the application display name for Servlet-based applications.

This commit moves that property to:
`server.servlet.application-display-name` and keeps the same defaults.

Closes gh-8624
2018-02-15 15:28:28 +01:00
Andy Wilkinson 83626c7c12 Polish metrics export auto-configuration tests 2018-02-15 10:46:11 +00:00
Andy Wilkinson b3c1b25274 Revert "Start building against Spring Security 5.0.2 snapshots"
This reverts commit 4179ed5a35.

See gh-11870
2018-02-15 08:49:38 +00:00
Andy Wilkinson a1ba2de06b Merge branch '1.5.x' 2018-02-14 17:22:52 +00:00
Andy Wilkinson c587549a68 Switch from webjars-locator to webjars-locator-core
Closes gh-12060
2018-02-14 16:16:55 +00:00
Brian Clozel 1f8d489e5a Improve reference doc for WebTestClient
Closes gh-11203
2018-02-14 15:39:48 +01:00
Andy Wilkinson 17258eeea3 Upgrade to Selenium 3.9.1
Closes gh-12057
2018-02-14 09:27:42 +00:00
Andy Wilkinson 3963303034 Upgrade to Selenium Htmlunit 2.29.2
Closes gh-12056
2018-02-14 09:27:41 +00:00
Andy Wilkinson 78130c16f1 Upgrade to Mongodb 3.6.3
Closes gh-12055
2018-02-14 09:27:40 +00:00
Andy Wilkinson 3def6d6c57 Upgrade to Mockito 2.15.0
Closes gh-12054
2018-02-14 09:27:40 +00:00
Andy Wilkinson 3221896b17 Upgrade to Jolokia 1.5.0
Closes gh-12053
2018-02-14 09:27:39 +00:00
Andy Wilkinson 3fd67880ac Upgrade to Kotlin 1.2.21
Closes gh-12052
2018-02-14 09:27:39 +00:00
Andy Wilkinson 08c08b9403 Upgrade to Infinispan 9.1.5.Final
Closes gh-12051
2018-02-14 09:27:38 +00:00
Andy Wilkinson 26560ef091 Upgrade to Elasticsearch 5.6.7
Closes gh-12050
2018-02-14 09:27:37 +00:00
Andy Wilkinson 9dccb01ca8 Upgrade to Activemq 5.15.3
Closes gh-12049
2018-02-14 09:27:37 +00:00
Andy Wilkinson 2204de4493 Upgrade to Thymeleaf Layout Dialect 2.3.0
Closes gh-12048
2018-02-14 09:27:36 +00:00
Andy Wilkinson 86d34bea0c Upgrade to Byte Buddy 1.7.10
Closes gh-12047
2018-02-14 09:27:36 +00:00
Andy Wilkinson 479d3a08f2 Upgrade to Rest Assured 3.0.7
Closes gh-12046
2018-02-14 09:27:35 +00:00
Andy Wilkinson da36323530 Upgrade to Netty 4.1.21.Final
Closes gh-12045
2018-02-14 09:27:34 +00:00
Andy Wilkinson acfacbd5d2 Upgrade to Embedded Mongo 2.0.3
Closes gh-12044
2018-02-14 09:27:34 +00:00
Andy Wilkinson 32c9847426 Upgrade to Hikaricp 2.7.7
Closes gh-12043
2018-02-14 09:27:33 +00:00
Andy Wilkinson 9e6068a3e4 Upgrade to Javax Mail 1.6.1
Closes gh-12042
2018-02-14 09:27:33 +00:00
Andy Wilkinson 69e0ee7799 Upgrade to Hazelcast Hibernate5 1.2.3
Closes gh-12041
2018-02-14 09:27:32 +00:00
Andy Wilkinson 2129218c4e Upgrade to Couchbase Client 2.5.5
Closes gh-12040
2018-02-14 09:27:32 +00:00
Andy Wilkinson fb38b04089 Merge branch '1.5.x' 2018-02-14 09:25:10 +00:00
Phillip Webb 45347af62e Allow lifecycleTimeout to be set for Netty
Update `NettyReactiveWebServerFactory` and `NettyWebServer` to allow
the lifecycle (start/stop) timeout to be configured.

Fixes gh-10977
2018-02-13 15:16:29 -08:00
dreis2211 cd0c5ba4d5 Polish BannerTests
Closes gh-12029
2018-02-13 14:55:40 -08:00
igor-suhorukov e98b93844a Polish static final usage for constants
Closes gh-12032
2018-02-13 14:53:26 -08:00
Jon Schneider d70594a2b1 Fix upstream micrometer renames
Fix for the rename of `HistogramConfig` to `DistributionStatisticConfig`

Closes gh-12030
2018-02-13 14:50:20 -08:00
Phillip Webb 6771cc9674 Polish 2018-02-13 14:41:12 -08:00
Andy Wilkinson d238a31d3d Polish 2018-02-13 17:50:40 +00:00
Andy Wilkinson 214c7ebdd5 Start building against Spring Framework 5.0.4 snapshots again
This reverts commit 682612efa3.
2018-02-13 17:42:16 +00:00
Brian Clozel 8d22a79eb6 Polish 2018-02-13 18:21:31 +01:00
sdeleuze e399cf6918 Improve WebFlux error logging
This commit avoids printing the stacktrace for ResponseStatusException
in order to be consistent with WebFlux ResponseStatusExceptionHandler
and because this stacktrace is usually not very useful in Reactive
world and mainly pollutes the logs, only the message is logged in that
case.

It also logs a WARN message for Bad Request (400) HTTP responses in
order to have a feedback when an exception is thrown due to client error
(unable to deserialize request body for example).

See related SPR-15083 issue on Spring Framework side.
2018-02-13 18:21:31 +01:00
Andy Wilkinson a19b1946d3 Clarify that both Java 8 and 9 are supported
Closes gh-12027
2018-02-13 17:11:54 +00:00
Andy Wilkinson 25520a9e32 Polish “Auto-configure FileDescriptorMetrics”
Closes gh-12022
2018-02-13 16:40:18 +00:00
Tommy Ludwig a51fcd071e Auto-configure FileDescriptorMetrics
See gh-12022
2018-02-13 16:40:18 +00:00
Tommy Ludwig 149963bc61 Auto-configure ClassLoaderMetrics
Auto-configure ClassLoaderMetrics as part of the JVM metrics from
Micrometer.

See gh-12022
2018-02-13 16:40:18 +00:00
Stephane Nicoll 83e0978a03 Polish 2018-02-13 17:37:56 +01:00
Andy Wilkinson 682612efa3 Revert "Start building against Spring Framework 5.0.4 snapshots"
This reverts commit 9dd7b0689d.
2018-02-13 16:24:26 +00:00
Andy Wilkinson e1ab62668f Merge branch '1.5.x' 2018-02-13 15:05:28 +00:00
Andy Wilkinson 9dd7b0689d Start building against Spring Framework 5.0.4 snapshots
This reverts commit f24c92c658 which is
no longer necessary as SPR-16456 has no been fixed.

See gh-11894
2018-02-13 13:43:47 +00:00
Stephane Nicoll b28cabdb12 Polish "Remove unnecessary config options for metrics"
Closes gh-12017"
2018-02-13 14:36:52 +01:00
Jon Schneider 49f21a2264 Remove unnecessary config options for JDBC, Rabbit, and Cache metrics
See gh-12017
2018-02-13 14:36:52 +01:00
Andy Wilkinson db4ffbbc4b Expose constants for Spring application JSON property names
Closes gh-12012
2018-02-13 13:22:50 +00:00
Andy Wilkinson ce9b2b8266 Auto-configure Micrometer’s Tomcat metrics
Closes gh-11916
2018-02-13 12:47:25 +00:00
Andy Wilkinson 01b1c1d947 Perform failure analysis of MissingRequiredConfigurationException
Closes gh-12010
2018-02-13 11:35:18 +00:00
Stephane Nicoll 28f5392787 Polish "Add health indicator for reactive MongoDB"
Closes gh-11997
2018-02-13 11:22:04 +01:00
Yulin Qin eee2694648 Add health indicator for reactive MongoDB
See gh-11997
2018-02-13 11:22:04 +01:00
Andy Wilkinson a02fdc755e Stop MeterRegistries when context is closed
Closes gh-12006
2018-02-13 09:34:11 +00:00
Stephane Nicoll d468a0714e Polish "Polish modifier order"
Closes gh-12019
2018-02-13 09:50:20 +01:00
Johnny Lim 87bf0b26df Polish modifier order
See gh-12019
2018-02-13 09:49:59 +01:00
Stephane Nicoll 31da4cc35d Polish "Remove redundant casts"
Closes gh-12011
2018-02-13 09:34:08 +01:00
igor-suhorukov 71351de694 Remove redundant casts
See gh-12011
2018-02-13 09:33:49 +01:00
Phillip Webb 74cede5cdc Migrate integration tests to context runner
Migrate `IntegrationAutoConfigurationTests` to use the
`ApplicationContextRunner`.
2018-02-12 17:49:54 -08:00
Phillip Webb 728b522307 Include scope support on ApplicationContextAssert
Update `ApplicationContextAssert` with support for scopes. Allows
tests to consider the all ancestors, or limit assertions to just the
current context.

Fixes gh-12015
2018-02-12 17:49:54 -08:00
Phillip Webb d6858ae162 Fix ConfigurationPropertySources parent attach
Update `ConfigurationPropertySources` so that the underlying sources
are checked when attaching. Prior to this commit, in a parent/child
setup the `ConfigurationPropertySources` adapter may already present
on the parent. This means the attaching is skipped but the managed
sources are incorrect.

Fixes gh-12013
2018-02-12 17:49:53 -08:00
Phillip Webb 7ab587a067 Add initializer support
Add `ApplicationContextInitializer` support to
`ApplicationContextRunner`.
2018-02-12 17:49:53 -08:00
Phillip Webb 3bec55e16c Formatting 2018-02-12 17:49:53 -08:00
Madhura Bhave 3880bdb908 Add example for customizing webflux security
Closes gh-11928
2018-02-12 16:26:30 -08:00
Madhura Bhave 16a499b2fa Cloud Foundry health should always show details
Fixes gh-12014
2018-02-12 15:28:06 -08:00
Phillip Webb f34aa6f4d8 Migrate to Spring Integration Micrometer support
Remove custom `SpringIntegrationMetrics` and instead provide
auto-configuration to the direct Micrometer support added in Spring
Integration 5.0.2.

Closes gh-11985
2018-02-12 13:24:29 -08:00
Andy Wilkinson b0e86bd7ac Align New Relic and Signal FX tests with those for other exporters
Closes gh-11970
2018-02-12 20:43:56 +00:00
Andy Wilkinson 384a4ed6a9 Use metrics export.*.enabled properties to control auto-configuration
Closes gh-11978
2018-02-12 20:18:11 +00:00
Phillip Webb 0348889fd7 Polish 2018-02-12 10:03:06 -08:00
Andy Wilkinson e49d50fe9d Improve testing of metrics auto-configuration
Closes gh-11970
2018-02-12 17:05:05 +00:00
Johnny Lim 5a9865dabb Polish
Closes gh-12004
2018-02-12 17:10:43 +01:00
Stephane Nicoll c97a9a0cb2 Merge branch '1.5.x' 2018-02-12 17:08:09 +01:00
Brian Clozel 2be0c46562 Remove TestRestTemplate constructors taking template args
As discussed in gh-11872, `TestRestTemplate` constructor variants taking
a `RestTemplate` argument are confusing since the main goal of that
class is to mutate `RestTemplate`.

This commit removes all those constructor variants and replaces them
with `RestTemplateBuilder` arguments when possible.

Closes gh-11872
2018-02-12 16:57:15 +01:00
Stephane Nicoll eec3eed5f5 Mention how to configure the web application type in tests
Closes gh-11025
2018-02-12 14:32:46 +01:00
Stephane Nicoll 51de8ae6be Polish doc
See gh-11803
2018-02-12 14:15:44 +01:00
Stephane Nicoll ce36529ef8 Fix javadoc generation 2018-02-12 14:09:57 +01:00
Stephane Nicoll ca5ebea24b Polish 2018-02-12 14:07:58 +01:00
Stephane Nicoll 9aa751a949 Make an explicit link to MongoDataAutoConfiguration
Closes gh-12001
2018-02-12 14:03:43 +01:00
Stephane Nicoll 7473642f58 Harmonize endpoints exclude property
Closes gh-11914
2018-02-12 14:00:40 +01:00