1863 Commits

Author SHA1 Message Date
Anton Telechev
aa69621078 Refactor spring-boot JSON parsers
Refactor JSON parser wrappers to remove duplicate code portions in the
parseMap() and parseList() methods by adding an AbstractJsonParser.

See gh-12428
2018-03-14 14:53:35 -07:00
Phillip Webb
a4b0be089d Polish 2018-03-14 14:05:26 -07:00
Brian Clozel
220f8cdca2 Order WelcomePageHandlerMapping at lower precedence
This commit orders the `WelcomePageHandlerMapping` at
`Ordered.LOWEST_PRECEDENCE -1` in order to give a chance to other
mappings to handle the incoming requests.

In this case, developers might provide a custom `ViewController` or
custom `HandlerMapping` for the `"/"` path and we should not override
that opinion.

Closes gh-12335
2018-03-14 17:16:39 +01:00
Stephane Nicoll
5320081d0b Revert "Only create a WebTestClient with WebFlux"
This reverts commit 282bd9f
2018-03-14 08:34:48 -04:00
Stephane Nicoll
b80620fe28 Revert "Group auto-configuration import selectors together"
This reverts commit 26d9c26
2018-03-14 08:34:30 -04:00
Stephane Nicoll
282bd9f0db Only create a WebTestClient with WebFlux
This commit updates WebTestClientAutoConfiguration to only create a
WebTestClient when running a WebFlux-based application as mocking the
context only works with that mode at the moment.

Closes gh-12318
2018-03-14 05:12:45 -04:00
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
Jon Schneider
172794d446 Correct default Wavefront proxy port in docs
Closes gh-12471
2018-03-13 17:52:13 -07:00
dreis2211
0d3f3e46dd Fix typos
Closes gh-12468
2018-03-13 17:42:19 -07:00
Andy Wilkinson
2f1b2e3ce2 Log summary of web-exposed endpoints during startup
Closes gh-12442
2018-03-13 14:55:51 +00:00
Andy Wilkinson
f758a4ddd5 Do not link to controller endpoints in Jersey-based Actuator
Closes gh-12463
2018-03-13 14:55:51 +00:00
dreis2211
a21ea612db Remove duplicated @author tags
Closes gh-12454
2018-03-13 08:51:17 +01:00
igor-suhorukov
97d803bd30 Polish
Closes gh-12448
2018-03-13 08:49:49 +01:00
igor-suhorukov
cca976eccd Remove redundant "close" call
Closing the resource is handled automatically by the try-with-resources.

Closes gh-12453
2018-03-13 08:48:13 +01:00
igor-suhorukov
12185251c1 "toString()" should never be called on a String object
Closes gh-12452
2018-03-13 08:45:02 +01:00
igor-suhorukov
93f9bd0a32 Polish
Closes gh-12450
2018-03-13 08:37:50 +01:00
Madhura Bhave
6d9692ffb7 Fix binding to empty prefix when empty name present
Fixes gh-12381
2018-03-12 12:35:08 -07:00
Andy Wilkinson
b88e3cb27e Upgrade to Hibernate Validator 6.0.8.Final
Closes gh-12440
2018-03-12 15:58:52 +00:00
Andy Wilkinson
db466a1ae2 Upgrade to Hibernate 5.2.15.Final
Closes gh-12439
2018-03-12 15:58:52 +00:00
Stephane Nicoll
0fbe3c28a2 Polish "Add reference to RabbitMQ (advanced usage) starter"
Closes gh-12427
2018-03-12 15:45:59 +01:00
Vincent Fuchs
61c44cf672 Add reference to RabbitMQ (advanced usage) starter
See gh-12427
2018-03-12 15:43:11 +01:00
Stephane Nicoll
bb25b0a1f4 Merge branch '1.5.x' 2018-03-12 15:40:50 +01:00
Stephane Nicoll
ed05e1f7ca Polish "Reorder modifiers to comply with the JLS"
Closes gh-12432
2018-03-12 15:17:23 +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
6d16c5ff6e Omit libraries with null destination when repackaging
Closes gh-12437
2018-03-12 13:33:42 +00:00
Stephane Nicoll
7f9ab8078f Merge branch '1.5.x' 2018-03-12 09:07:05 +01:00
igor-suhorukov
6ee04ff942 Polish
Closes gh-12425
2018-03-10 10:28:04 +01:00
Madhura Bhave
6bcdd57ef2 Polish 2018-03-09 10:39:44 -08:00
Madhura Bhave
26811b8974 Ignore top-level ConfigurationProperty binding failures
Fixes gh-12357
2018-03-09 10:36:36 -08:00
Stephane Nicoll
a55180aa1e Polish "Get rid of "magic" time constants"
Closes gh-12411
2018-03-09 16:37:18 +01:00
igor-suhorukov
ce78a78231 Get rid of "magic" time constants
See gh-12411
2018-03-09 16:36:45 +01:00
Johnny Lim
3c9cee2a8c Invoke mapStatus() only when necessary
Closes gh-12419
2018-03-09 16:21:42 +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
Andy Wilkinson
9b637d4f0d Use millisecond precision for build time in BuildPropertiesTests
Closes gh-12420
2018-03-09 11:59:26 +00:00
Andy Wilkinson
87239ba6c9 Parse build.time as an ISO 8601 instant
Closes gh-12420
2018-03-09 11:32:43 +00:00
igor-suhorukov
4f4cc1569c Polish
Declarations should use Java collection interfaces such as "Deque" rather
than specific implementation classes such as "LinkedList".

Closes gh-12405
2018-03-09 09:32:14 +01:00
Andy Wilkinson
8109267de8 Upgrade to Spring Batch 4.0.1.RELEASE
Closes gh-12410
2018-03-08 17:04:26 +00:00
Andy Wilkinson
63a7a9bf42 Merge branch '1.5.x' 2018-03-08 15:52:47 +00:00
Andy Wilkinson
d08b228813 Merge branch '1.5.x' 2018-03-08 15:46:59 +00:00
Andy Wilkinson
43d05315b3 Use Surefire and Failsafe 2.21.0 when building with JDK 10
Closes gh-12332
2018-03-08 13:11:27 +00:00
Madhura Bhave
89e42d40c5 Provide security matchers for actuator links
Fixes gh-12353
2018-03-07 19:02:35 -08:00
Stephane Nicoll
7d1faa1c88 Ignore static and abstract accessors
This commit updates the annotation processor and the binder to ignore
any static or abstract method that has the characteristics of a JavaBean
accessor. As a result, no property is generated for those (invalid)
accessor and no binding occurs on them either.

Closes gh-12390
2018-03-07 17:55:12 +01: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
9b1003d9f6 Properly identify accessor methods
This commit fixes the binder so that it property identifies JavaBean
accessors. Previously an accessor named `get` or `is` was identified.
Similarly, a setter named `set` was identified.

Closes gh-12363
2018-03-07 15:14:07 +01:00
Stephane Nicoll
36ed7ae699 Polish 2018-03-07 14:23:49 +01:00
Stephane Nicoll
3804466ad5 Fix description of JDBC starter
Closes gh-12387
2018-03-07 14:17:14 +01:00
Andy Wilkinson
bf84215b90 Merge branch '1.5.x' 2018-03-07 13:14:40 +00: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