639 Commits

Author SHA1 Message Date
Phillip Webb
16b7dbf487 Only use Map converter binding when no descendants
Update `MapBinder` to only attempt conversion based binding when there
are no know descendant elements.

See gh-11892
2018-02-02 19:00:35 -08:00
Phillip Webb
d6ae4e48d8 Add support for @Delimiter binding
Add a new `@Delimiter` annotation that can be used to change how a
String value is bound to a Collection.

Fixes gh-11883
2018-02-02 19:00:34 -08:00
Phillip Webb
f24c92c658 Workaround ResolvableType.forClassWithGenerics bug
Temporarily work around SPR-16456
2018-02-02 18:59:06 -08:00
Phillip Webb
60d525e732 Polish IndexedElementsBinder 2018-02-02 18:59:06 -08:00
Phillip Webb
69234f8c08 Polish 2018-02-02 18:59:05 -08:00
Madhura Bhave
49a72b007b Bind to map with numeric key without needing []
Closes gh-10751
2018-02-02 09:48:04 -08:00
Andy Wilkinson
cebe6579d1 Merge branch '1.5.x' 2018-02-02 15:01:35 +00:00
Andy Wilkinson
875091ed85 Polish “Remove or use unused method parameters”
Closes gh-11812
2018-02-02 09:34:19 +00:00
igor-suhorukov
717bd2c580 Remove or use unused method parameters 2018-02-02 09:34:19 +00:00
Phillip Webb
c3ec316890 Move Application* and *FileWriter classes
Move `ApplicationHome`, `ApplicationPid` and `ApplicationTemp` to the
`system` package. Since `system` package is now much lower level, the
existing `FileWriter` implementations also needed to move to prevent
package tangles.

Fixes gh-8614
2018-02-01 16:44:42 -08:00
Phillip Webb
3ff772957b Add WebServerApplicationContext abstraction
Add a new `WebServerApplicationContext` interface that provides a common
abstraction for all application contexts that create and manage the
lifecycle of an embedded `WebServer`.

Allows server namespaces to become a first-class concept (rather
subverting `ConfigurableWebApplicationContext.getNamespace()`) and
allow us to drop `getServerId()` from `WebServerInitializedEvent`.

Also helps to improve `ManagementContextAutoConfiguration` and
`ManagementContextFactory`.

Fixes gh-11881
2018-02-01 16:38:15 -08:00
Andy Wilkinson
4a1bea1fed Polish 2018-02-01 20:03:02 +00:00
Phillip Webb
7d5e41f7dc Polish 2018-02-01 10:25:33 -08:00
Andy Wilkinson
cafe6dbbb1 Suppress debug log output during Logback initialization
Closes gh-11761
2018-02-01 12:48:59 +00:00
Johnny Lim
3cead7693d Polish
Closes gh-11871
2018-02-01 08:35:42 +01:00
Andy Wilkinson
a6bb48a2f4 Remove remaining references to no longer supported container versions
Closes gh-11504
2018-01-31 17:29:55 +00:00
Phillip Webb
187c4d728c Merge branch '1.5.x' 2018-01-30 12:47:30 -08:00
Stephane Nicoll
f7bf79c9b3 Polish deprecated metadata 2018-01-30 17:45:01 +01:00
Phillip Webb
1a2186e6ef Attempt to fix lambda error detection on JDK 9
Update `LambdaSafe` to also detect `ClassCastException` messages that
start with "module/name".

See gh-11584
2018-01-29 23:05:38 -08:00
Phillip Webb
c90a5a9e9e Polish 2018-01-29 21:35:56 -08:00
dreis2211
e7248ff273 Use interfaces for collection declarations
Closes gh-11839
2018-01-29 16:54:11 -08:00
Phillip Webb
3a12f98bab Migrate callbacks to LambdaSafe util
Migrate existing code to the new `LambaSafe` callback handler.

Closes gh-11584
2018-01-29 14:31:10 -08:00
Phillip Webb
b0cb728944 Add general utility to deal with lambda callbacks
Add `LambdaSafe` utility that provides a consistent way to deal with
the problems that can occur when calling lambda based callbacks.

See gh-11584
2018-01-29 14:31:10 -08:00
Andy Wilkinson
f5102516fa Merge branch '1.5.x' 2018-01-29 20:16:55 +00:00
Andy Wilkinson
244a287484 Merge branch '1.5.x' 2018-01-29 19:51:50 +00:00
Phillip Webb
af50a18da9 Polish 2018-01-29 09:47:03 -08:00
Andy Wilkinson
70dabdbf39 Add application/json and /xml to default compressible mime types
Closes gh-11828
2018-01-29 14:33:02 +00:00
Andy Wilkinson
844782b20b Remove default JUL handler to prevent duplicate console logging
By default, JUL configures a single root handler. That handler is a
ConsoleHandler. Previously, we removed all root handlers from JUL but
this is problematic in environments where other handlers are
registered with JUL and those handlers need to be retained.
0679d436 attempted to fix the problem by leaving the root handlers in
place and only adding and removing the bridge handler. This resulted
in log output from Tomcat (and anything else that uses JUL) being
duplicated.

This commit makes another attempt at tackling the problem. It attempts
to detect JUL's default configuration (a single root handler that's a
ConsoleHandler) and only removes the handler if it appears to be from
the default configuration. For environments where default JUL
configuration is being used, this will prevent duplicate logging and
for environments where custom JUL configuration is being used, this
will prevent that configuration from being undone.

Closes gh-8933
2018-01-29 14:22:28 +00:00
dreis2211
a7663c88d3 Replace casted Mockito.any() calls
Closes gh-11817
2018-01-29 07:50:29 +01:00
Johnny Lim
6d68806275 Polish
Closes gh-11805
2018-01-27 05:22:04 +01:00
Phillip Webb
b234501af3 Polish 2018-01-26 11:39:41 -08:00
Andy Wilkinson
92138e4c32 Polish "Mark thread as interrupted after catching InterruptedException"
See gh-11784
2018-01-26 15:27:09 +00:00
igor-suhorukov
0c30c969bf Mark thread as interrupted after catching InterruptedException
Closes gh-11784
2018-01-26 15:27:09 +00:00
Stephane Nicoll
1880a25cfb Polish
Closes gh-11788
2018-01-26 12:31:30 +01:00
Stephane Nicoll
584985c7fa Polish 2018-01-26 11:06:11 +01:00
Stephane Nicoll
e95cda10ee Add whenInstanceOf to PropertyMapper
Add an operation on PropertyMapper that takes care of casting. Returns
a source for the requested type if the current value is of the right
type.

Closes gh-11788
2018-01-26 11:05:13 +01:00
Stephane Nicoll
3f1aaa1f7e Polish contribution
Closes gh-11783
2018-01-26 10:03:47 +01:00
Raja Kolli
64c324612e Polish
See gh-11783
2018-01-26 09:52:52 +01:00
Phillip Webb
adfb6dc128 Polish 2018-01-25 13:20:29 -08:00
Andy Wilkinson
0679d4369c Use uninstall to remove SL4FJBridgeHandler
Closes gh-8933
2018-01-25 16:17:06 +00:00
Andy Wilkinson
11064b5d78 List valid values in failure analysis for enum binding failure
Closes gh-11771
2018-01-25 13:26:43 +00:00
Andy Wilkinson
cedb6b2f17 Revert "Clean up the logging system later in context close processing"
This reverts commit 8619256d2a425a60235e1e1491e9bb9e5ce5d00d.

See gh-11676
2018-01-25 13:15:41 +00:00
Andy Wilkinson
8619256d2a Clean up the logging system later in context close processing
Previously, the logging system was cleaned up in response to the
root context's ContextClosedEvent being received. This event is
published early in a context's close processing. As a result, the
logging system is in cleaned up state while, for example, disposable
beans are being destroyed.

This commit reworks the logic that triggers logging system clean up
to use a disposable bean instead. Disposable beans are called in
reverse-registration order. The logging clean up bean is registered as
early as possible so that it should be the last disposable bean to
be called.

Closes gh-11676
2018-01-25 10:33:56 +00:00
Phillip Webb
d61ba241b5 Move "testdb" naming to DataSourceProperties
Move the "testdb" naming logic to `DataSourceProperties` and expose
the `deduceDatabaseName` method so they can be used in
auto-configuration.

See gh-11719
2018-01-24 20:43:00 -08:00
Stephane Nicoll
b67903a04a Keep "testdb" default datasource name internal
Previously, Hikari's pool name was auto-configured with the value of
`spring.datasource.name` that defaults  to `testdb`, which brings some
confusion.

This commit removes the default `testdb` value on
`spring.datasource.name` as it is a sane default only for an embedded
datasource. It is applied whenever applicable instead.

Closes gh-11719
2018-01-24 17:41:32 -08:00
igor-suhorukov
093ca0a687 Use EnumMap whenever possible
Replace regular Map instances with EnumMap to reduce memory consumption.

Closes gh-11760
2018-01-24 16:24:47 -08:00
Phillip Webb
ab6ad6aa4b Polish 2018-01-24 16:09:14 -08:00
Brian Clozel
be7c0a15f7 Move reactive ErrorAttributes into spring-boot
Closes gh-11714
2018-01-23 11:55:34 +01:00
andrey.onufreyko
b19dcb13e2 Replace string arguments with char
Optimize method calls by replacing single character String arguments
with char.

Closes gh-11680
2018-01-22 16:35:06 -08:00
Johnny Lim
768e7c07e6 Polish
Closes gh-11720
2018-01-22 16:06:45 -08:00