5115 Commits

Author SHA1 Message Date
Stephane Nicoll
26d9c261c5 Group auto-configuration import selectors together
This commit updates Spring Boot's DeferredImportSelector implementations
to group imports in a consistent set. This makes sure ordering is
applied consistently.

Closes gh-12366
2018-03-14 05:02:22 -04:00
igor-suhorukov
97d803bd30 Polish
Closes gh-12448
2018-03-13 08:49:49 +01:00
Stephane Nicoll
bb25b0a1f4 Merge branch '1.5.x' 2018-03-12 15:40:50 +01:00
igor-suhorukov
aebb475bc5 Reorder modifiers to comply with the JLS
See gh-12432
2018-03-12 15:17:05 +01:00
Andy Wilkinson
3642636b60 Align test build-info.properties with ISO 8601 formatt changes
See gh-12420
2018-03-09 13:24:34 +00:00
Brian Clozel
72afdc676d Reorder WebMvcConfigurer from auto-configuration
Prior to this commit, all `WebMvcConfigurer` instances provided by user
configuration were processed *before* the one provided by the
`WebMvcAutoConfiguration`.

For many options this has no consequence, but for some, like the
`ContentNegotiationConfigurer`, settings were overriden by the
auto-configuration even if developers provided an opinion.

This commit orders the `WebMvcConfigurer` provided by the
auto-configuration at `0`, so that custom configurers (unordered, at
`Ordered.LOWEST_PRECEDENCE`) are processed *after*.

This still gives room to developers for configuring things *before* the
auto-configuration - they can still order their own configuration
accordingly.

Fixes gh-12389
2018-03-07 17:50:41 +01:00
Stephane Nicoll
1b36ab5be0 Fix wrong import 2018-03-07 14:10:49 +01:00
Stephane Nicoll
0207b816d9 Attempt to detect ddl-auto mode only if necessary
This commit defers the resolution of the default ddl auto mode only when
it is absolutely necessary. This prevents Spring Boot to attempt to get
a connection when it isn't necessary

Closes gh-12374
2018-03-07 13:06:01 +01:00
Andy Wilkinson
317b51f2ad Make ApplicationContextRequestMatcher and subclasses thread-safe
Previously, when performing lazy initialisation of the context,
ApplicationContextRequestMatcher assigned the context field before it
called initialized. The context being non-null is used as the signal
that it’s ok to call a subclass’s matches method. If one thread checks
for a non-null context in between the field being assigned and
initialized being called on another thread, matches will be called
before the subclass is ready.

This commit closes the window for the race condition by only assigning
the context field once the subclass’s initialized method has been
called.

There is a secondary problem in each of the subclasses. Due to the use
of double-checked locking in ApplicationContextRequestMatcher, it’s
possible for a subclass’s matches method to be called by a thread that
has not synchronised on the context lock that’s held when initialized
is called and the delegate field is assigned. This means that the
value assigned to the field may not be visible to that thread.

This commit declares the delegate field of each
ApplicationContextRequestMatcher subclass as volatile to ensure that,
following initialisation, its value is guaranteed to be visible to
all threads.

Closes gh-12380
2018-03-07 11:37:01 +00:00
Stephane Nicoll
42629cb8ae Add support for ConnectionNameStrategy
This commit detects if a `ConnectionNameStrategy` bean exists in the
context and associates it with the auto-configured RabbitMQ's
`ConnectionFactory` when that is the case.

Closes gh-12367
2018-03-07 11:15:50 +01:00
Stephane Nicoll
326c1e123c Merge branch '1.5.x' 2018-03-06 15:26:47 +01:00
Stephane Nicoll
6f7501f62b Remove my clone 2018-03-06 10:21:00 +01:00
Stephane Nicoll
7f5b7a6b47 Polish contribution
Closes gh-12326
2018-03-03 12:26:14 +01:00
Johnny Lim
751c444166 Polish
See gh-12326
2018-03-03 12:25:41 +01:00
Johnny Lim
83ed0c7783 Make UserDetailsServiceAutoConfiguration.getOrDeducePassword() private
Closes gh-12295
2018-03-02 10:41:11 +01:00
Phillip Webb
7bc535e4fa Polish 2018-02-28 10:59:26 -08:00
Andy Wilkinson
9b46221345 Escape backslashes so they are preserved during Properties parsing
Closes gh-12285
2018-02-28 16:34:05 +00:00
Stephane Nicoll
0f652cdf4f Fix injection point with proxied DataSource
Prior to this commit, the `ApplicationContext` couldn't start with a
JDK-proxied `HikariDataSource` as the JMX auto-configuration was
attempting to inject a (too narrowed) `HikariDataSource`.

This commit rather injects a regular `DataSource` and attempt to unwrap
it as a `HikariDataSource`.

Closes gh-12271
2018-02-28 15:37:07 +01:00
Stephane Nicoll
5fa71a1f94 Switch test to ApplicationContextRunner 2018-02-28 14:13:45 +01:00
Stephane Nicoll
4180762d6d Polish contribution
Closes gh-12236
2018-02-28 09:01:59 +01:00
igor-suhorukov
56cbc65e7b Polish
See gh-12236
2018-02-28 08:58:46 +01:00
Phillip Webb
c23b0e99f1 Fix failing PathRequestTests
Fix test failing due to commit d66496787d.

See gh-12238
2018-02-27 17:06:21 -08:00
Phillip Webb
d66496787d Propagate exceptions in security matchers
Update `ApplicationContextRequestMatcher` and
`ApplicationContextServerWebExchangeMatcher` to use a supplier for
the context, rather than the context itself.

This allow exceptions to be propagated to subclasses which may choose
to deal with them.

See gh-12238
2018-02-27 16:29:14 -08:00
Andy Wilkinson
dc36360155 Polish 2018-02-27 21:25:48 +00:00
Phillip Webb
3e4da3cc37 Polish 2018-02-27 12:53:01 -08:00
Andy Wilkinson
c7ed5c3d4a Upgrade to EhCache 3.5.0
Closes gh-12256
2018-02-27 20:45:54 +00:00
Stephane Nicoll
6676967cc1 Polish 2018-02-27 16:47:55 +01:00
Phillip Webb
29c3be3590 Polish 2018-02-26 10:26:02 -08:00
Stephane Nicoll
306c79f0de Merge branch '1.5.x' 2018-02-26 18:03:32 +01:00
igor-suhorukov
98f4692c62 Polish
This commit changes invocations to immediately return the expression
instead of assigning it to a temporary variable. The method name should
be sufficient for callers to know exactly what will be returned.

Closes gh-12211
2018-02-25 10:59:02 +01:00
Johnny Lim
d441a8a89a Polish
Closes gh-12205
2018-02-24 11:53:25 +01:00
Andy Wilkinson
1314678890 Nest @EnableWebFluxSecurity to avoid overzealous Wildfly warnings
Closes gh-12174
2018-02-23 20:50:20 +00:00
Andy Wilkinson
782ab2803e Polish documentation regarding target class proxying
Closes gh-12196
2018-02-23 14:52:43 +00:00
Stephane Nicoll
9b61df6a2b Polish 2018-02-23 15:18:46 +01:00
Stephane Nicoll
13b736b1cd Migrate remaining duration-based properties for Rabbit
Closes gh-12192
2018-02-23 15:16:57 +01:00
Stephane Nicoll
976a23d977 Fix duration unit of spring.messages.cache-duration
Closes gh-12183
2018-02-23 13:38:20 +01:00
Stephane Nicoll
92d1c6126b Harmonize accesslog.enabled flag for Undertow
Closes gh-12178
2018-02-23 11:26:33 +01:00
Stephane Nicoll
09ff815f00 Harmonize metadata
Closes gh-12177
2018-02-23 11:02:28 +01:00
Phillip Webb
4b9c3c137e Polish Collection.toArray
Consistently use `StringUtils.toStringArray`, `ClassUtils.toClassArray`
or zero length when converting collections to arrays.

Fixes gh-12160
2018-02-22 21:11:30 -08:00
Phillip Webb
cd5266ac03 Polish 2018-02-22 20:25:28 -08:00
Brian Clozel
dcf61abe30 Fix Reactive Server auto-configuration ordering
This commit ensures that Tomcat is the first reactive server configured
if the Tomcat dependency is on classpath.

Spring Boot chose Reactor Netty as the default for the reactive web
starter, but the Reactor Netty dependency can be used also for its HTTP
client. In case developers are adding Tomcat, Undertow or Jetty on their
classpath, we must configure those and consider Reactor Netty for the
client only.

Fixes gh-12176
2018-02-22 18:04:53 +01:00
Johnny Lim
2fe86da95b Use isTrue() and isFalse() for AssertJ
Closes gh-12170
2018-02-22 09:55:40 +01:00
Andy Wilkinson
e7176c63f5 Stop DataSource initialization from preventing Hikari instrumentation
Closes gh-12129
2018-02-21 10:32:41 +00:00
Phillip Webb
46021928ba Rework common server customization
Update the configurable embedded web server factory interfaces to
extend `ConfigurableWebServerFactory` so that the can be used in a
`WebServerFactoryCustomizer`.

Extract server specific customization to their own auto-configuration
and align reactive/servlet server auto-configuration.

Closes gh-8573
2018-02-20 16:27:15 -08:00
Phillip Webb
05faac2b09 Polish 2018-02-20 15:53:25 -08:00
Andy Wilkinson
b5e2c5ec1c Polish 2018-02-20 19:58:39 +00:00
Stephane Nicoll
ce01a9145b Polish 2018-02-20 18:45:36 +01:00
Stephane Nicoll
20f104766b Add missing default values for enums 2018-02-20 17:33:32 +01:00
Stephane Nicoll
6f59dd6b17 Polish "Update documentation to reference webjars-locator-core"
Closes gh-12135
2018-02-20 16:37:34 +01:00
Nikola Kološnjaji
4da4a4d385 Update documentation to reference webjars-locator-core
See gh-12135
2018-02-20 16:33:19 +01:00