1791 Commits

Author SHA1 Message Date
Andy Wilkinson
927003e0b7 Polish 2018-01-08 13:59:14 +00:00
Stephane Nicoll
8941dc746e Polish 2018-01-08 14:38:10 +01: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
6daad1f562 Allow to inject the Environment in FailureAnalyzer
Closes gh-11569
2018-01-08 14:24:23 +01:00
Stephane Nicoll
71aad04ea9 Update copyright header 2018-01-06 17:42:21 +01:00
Johnny Lim
67a5144112 Remove unnecessary condition in ConfigurationPropertyName
Closes gh-11486
2018-01-06 17:40:55 +01:00
Brian Clozel
11d4426b4d Provide client factory with supplier in RestTemplateBuilder
This commit removes
`RestTemplateBuilder.requestFactory(ClientHttpRequestFactory factory)`
because it can be misleading. This builder class is meant to be
immutable, but calling that method and then timeout related ones will
affect the `ClientHttpRequestFactory` instance.

Instead, this method is replaced with a
`Supplier<ClientHttpRequestFactory>` that is called every time a
`RestTemplate` is being built.

That approach may reduce the reusability of request factories, but it is
much more consistent.

Closes gh-11255
2018-01-05 16:29:18 +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
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
Brian Clozel
3ab32df242 Add support for HTTP/2 in Jetty with Conscrypt
This commit configures Jetty for HTTP/2 support as soon as the following
conditions are met:

* `server.http2.enabled=true`
* Both `org.eclipse.jetty:jetty-alpn-conscrypt-server` and
`org.eclipse.jetty.http2:http2-server` are on classpath

This will use the Conscrypt library for ALPN and TLS support using
native libraries shipped within the Conscrypt uber Jar. This does not
require a JVM agent or patching the JDK classes.

Closes gh-10902
2018-01-03 17:43:32 +01:00
Brian Clozel
8286cbc9f3 Merge branch '1.5.x' 2018-01-02 16:13:11 +01:00
Johnny Lim
a462255383 Polish
Closes gh-11451
2018-01-01 08:41:09 +01:00
dreis2211
67a84cd4f9 Fix typos
Closes gh-11450
2018-01-01 08:37:42 +01:00
Madhura Bhave
8102dc78cb Remove redundant throws declarations 2017-12-29 12:10:13 -08:00
Stephane Nicoll
106642a8d4 Polish 2017-12-29 14:48:24 +01:00
Stephane Nicoll
2bd8c2bfca Polish
See gh-11181
2017-12-28 12:52:40 +01:00
Johnny Lim
8f7ab95e0e Use BufferedReader.lines()
Closes gh-11436
2017-12-27 16:44:27 +01:00
Johnny Lim
e32287164b Use Supplier version of Assert.state()
Closes gh-11362
2017-12-23 14:31:38 +01:00
Johnny Lim
4cc598ac5e Replace contains() with indexOf()
Closes gh-11373
2017-12-23 14:00:27 +01:00
Johnny Lim
e4f0ad2165 Polish
Closes gh-11372
2017-12-23 13:11:53 +01:00
Phillip Webb
ad1c8d773f Start properties validator in background thread
Change the default JSR-303 validator used by the configuration
properties binder so that it's initialized in a background thread.
This change allows the context to carry on loading additional beans
whilst the validator is initializing.

Fixes gh-11412
2017-12-22 21:16:47 -08:00
Phillip Webb
5f10c82284 Change property mapper to use array returns
Update the `PropertyMapper` interface to return arrays rather than
Lists. Since implementations are package-private it's possible for us
to control how they are used and it helps to save a little memory.

Fixes gh-11411
2017-12-22 20:57:38 -08:00
Phillip Webb
2efa21c570 Make hot methods in-line friendly
Refactor a few hot methods so that they are more likely to be in-lined
by the JIT.

Fixes gh-11409
2017-12-22 20:55:47 -08:00
Phillip Webb
e141f77801 Share BinderConversionService with a static
Use a single shared static `BinderConversionService` instance for all
created binders to save memory and improve performance.

Fixes gh-11352
2017-12-22 20:54:00 -08:00
Phillip Webb
c024313141 Drop environment variable "__" list support
Remove support for the `__` environment variable list shortcut in order
to reduce complexity. The shortcut was developed before the new `Binder`
code was fully formed and isn't really necessary now since comma-lists
can be converted automatically.

Fixes gh-11410
2017-12-22 12:15:12 -08:00
dreis2211
00d12c5b2d Align 'behavior' spelling to style guide
Closes gh-11394
2017-12-22 18:15:19 +01:00
Phillip Webb
241a7086c0 Add PropertyMapper utility class
Add a utility class that can help when mapping values from
`@ConfigurationProperties` to a third-party class.

See gh-9018
2017-12-15 18:32:06 -08:00
Stephane Nicoll
22aeb74d73 Polish 2017-12-14 08:40:03 +01:00
Phillip Webb
ed2460b091 Add support for animated GIFs
Update ImageBanner to support animated GIFs. Animations rely on ANSI
cursor codes so don't work so well in an IDE. They do, however, work
when running the app from a terminal.

See also commit 47bc5e71abb05ae888e3d24530e97d59884e8d68

Closes gh-11118
2017-12-13 14:58:11 -08:00
Phillip Webb
3273859fde Polish 2017-12-13 14:32:55 -08:00
Phillip Webb
5ca608330c Merge branch '1.5.x' 2017-12-13 13:07:18 -08:00
Stephane Nicoll
a626f5462d Consistent use of @AliasFor
Closes gh-10836
2017-12-13 14:42:16 +01:00
Stephane Nicoll
e5361d887c Relocate banner properties to spring.banner
Closes gh-11339
2017-12-13 12:01:23 +01:00
Johnny Lim
de72f2ae32 Polish
Closes gh-11327
2017-12-13 09:38:20 +01:00
Stephane Nicoll
23218add90 Polish 2017-12-12 11:57:30 +01:00
Stephane Nicoll
408368a1f9 Polish "Allow graceful shutdown of Atomikos"
Closes gh-11237
2017-12-12 08:30:24 +01:00
nklmish
46d94aba4f Allow graceful shutdown of Atomikos
See gh-11237
2017-12-12 08:18:42 +01:00
Johnny Lim
96250743b5 Add missing "abstract" keywords
Closes gh-11303
2017-12-09 15:29:15 -08:00
Johnny Lim
6d54072e04 Remove "final" keywords
Closes gh-11294
2017-12-08 11:13:07 -08:00
Stephane Nicoll
bd7bd6edc8 Fix session timeout conversion for Undertow
Closes gh-11283
2017-12-07 16:48:42 -08:00
Andy Wilkinson
953d69ce0b Polish "Fix system properties in file-appender.xml"
Closes gh-11232
2017-12-06 15:31:06 +00:00
Johnny Lim
d4d6a43fc2 Fix system properties in file-appender.xml
See gh-11232
2017-12-06 15:30:57 +00:00
Andy Wilkinson
54369a72ca Polish "Use LoggingSystemProperties constants"
Closes gh-11240
2017-12-06 15:00:29 +00:00
Johnny Lim
4c5de416ef Use LoggingSystemProperties constants
See gh-11240
2017-12-06 15:00:20 +00:00
Johnny Lim
2c204f2154 Polish
Closes gh-11242
2017-12-02 09:03:59 +01:00
Andy Wilkinson
e16579b416 Support Integer to Duration conversion during property binding
Closes gh-11216
2017-11-30 12:30:42 +00:00
Johnny Lim
44299bb980 Polish
Closes gh-11206
2017-11-29 09:37:36 -08:00
Phillip Webb
d7251f52a4 Polish 2017-11-29 09:09:53 -08:00