Commit Graph

745 Commits

Author SHA1 Message Date
Johnny Lim b7fe3a5332 Make ErrorProperties.whitelabel final
Closes gh-13197
2018-05-17 15:31:51 +02:00
Andy Wilkinson 69aa4913e3 Align tests for OAuth properties adapter with changes in Spring Security
Closes gh-13185
2018-05-16 11:30:28 +01:00
Stephane Nicoll 9ea4fce03e Merge branch '2.0.x' 2018-05-16 09:29:02 +02:00
Johnny Lim 652bbf4ab2 Polish DefaultErrorWebExceptionHandler.renderErrorView()
Closes gh-13174
2018-05-16 09:28:26 +02:00
Andy Wilkinson b5185fbe10 Upgrade to Lettuce 5.1.0.M1
Closes gh-13181
2018-05-15 17:22:26 +01:00
Andy Wilkinson 148997fd43 Upgrade to Elasticsearch 6.2.4
Closes gh-13178
2018-05-15 17:11:28 +01:00
Andy Wilkinson 150a19523c Start building against Spring Data Lovelace M3 snapshots
See gh-13169
2018-05-15 16:57:51 +01:00
Stephane Nicoll e5ac3bc391 Merge branch '2.0.x' 2018-05-15 15:10:04 +02:00
Johnny Lim b9aa934d78 Remove @Deprecated on CouchbaseProperties.Endpoints.setKeyValue()
Closes gh-13171
2018-05-15 15:09:35 +02:00
Stephane Nicoll c7eec5c45e Polish "Add liquibase test rollback on update property"
Closes gh-13159
2018-05-14 16:14:11 +02:00
Vladyslav Kiriushkin 08279c889c Add liquibase test rollback on update property
See gh-13159
2018-05-14 16:06:08 +02:00
Stephane Nicoll 93c45cb6ec Move server.servlet.path to spring.mvc.servlet.path
Closes gh-12971
2018-05-14 12:24:38 +02:00
Stephane Nicoll 9b379b43ae Merge branch '2.0.x' 2018-05-14 09:33:16 +02:00
Stephane Nicoll 8f53c2e2bb Support for custom comment prefix
Some Quartz initialization scripts have comments in a different format.

This commit introduces a `comment-prefix` property that should be set by
the user if their target database has a script that contains those
unusual comments.

Closes gh-13041
2018-05-14 09:32:42 +02:00
Stephane Nicoll b17c58b114 Merge branch '2.0.x' 2018-05-14 08:23:36 +02:00
Johnny Lim 3dd2f5bb05 Polish
See gh-13148
2018-05-14 08:19:10 +02:00
Stephane Nicoll 15edd02e1d Merge branch '2.0.x' 2018-05-14 08:13:40 +02:00
Johnny Lim aa60d60b8a Polish JpaProperties.determineDdlAuto()
Closes gh-13036
2018-05-14 08:13:06 +02:00
Stephane Nicoll 8e9a873787 Polish "Improve LDAP auto-configuration conditions"
Closes gh-13143
2018-05-11 17:59:21 +02:00
Vedran Pavic dfceede0bc Improve LDAP auto-configuration conditions
At present, auto-configuration of `LdapContextSource` is conditional on
presence of a `ContextSource` bean. However, there are valid use cases
which require multiple `ContextSource` bean, for instance
`PooledContextSource`. With the current arrangement, the
auto-configuration of `LdapContextSource` will back off if user provides
a `PooledContextSource` bean, while it would still be reasonable to
reuse the auto-configured `LdapContextSource`.

This commit improves `LdapContextSource` factory method return value and
condition to back off only if users actually provide a
`LdapContextSource` bean themselves.

See gh-13143
2018-05-11 17:59:21 +02:00
Stephane Nicoll a0a0bea427 Polish "Improve LDAP auto-configuration"
Closes gh-13136
2018-05-11 14:37:32 +02:00
Vedran Pavic f81f50c119 Improve LDAP auto-configuration
Auto-configuration of LDAP's `LdapTemplate` is currently a part of
`LdapDataAutoConfiguration` which is conditional of presence of
`LdapRepository` (i.e. Spring Data LDAP). This arrangement isn't ideal
since the `LdapTemplate` is a part of Spring LDAP project, and therefore
should not be tied to Spring Data LDAP.

This commit improves and simplifies LDAP auto-configuration by moving
`LdapTemplate` configuration to `LdapAutoConfiguration`. Consequently,
`LdapDataAutoConfiguration` is not needed anymore and is removed.

See gh-13136
2018-05-11 14:37:13 +02:00
Stephane Nicoll b0433d66c1 Merge branch '2.0.x' 2018-05-11 14:24:13 +02:00
dreis2211 e6a23fa3ff Remove unnecessary semicolons
Closes gh-13144
2018-05-11 14:23:47 +02:00
Andy Wilkinson b88a20fabb Polish 2018-05-11 13:05:17 +01:00
Stephane Nicoll 5e87a3d2fa Polish
See gh-13130
2018-05-11 10:03:03 +02:00
Stephane Nicoll 00a43d8f4d Merge branch '2.0.x' 2018-05-11 10:01:30 +02:00
Johnny Lim 75e591e76e Polish
Closes gh-13130
2018-05-11 10:00:15 +02:00
Stephane Nicoll c35cb1b69f Merge branch '2.0.x' 2018-05-11 09:57:18 +02:00
Stephane Nicoll 4683940423 Merge branch '1.5.x' into 2.0.x 2018-05-11 09:56:54 +02:00
Andy Wilkinson d77c4c83a1 Polish 2018-05-09 09:19:03 +01:00
Andy Wilkinson a41c9eb736 Merge branch '2.0.x' 2018-05-09 09:14:48 +01:00
Andy Wilkinson c826310fd1 Polish 2018-05-09 08:44:15 +01:00
Brian Clozel 84c9a65e9d Auto-configure Elasticsearch REST clients
This commit adds auto-configuration support for both `RestClient` and
`RestHighLevelClient` which are provided by `elasticsearch-rest-client`
and `elasticsearch-rest-high-level-client` dependencies respectively.

`RestClient` is associated with configuration properties in the
`spring.elasticsearch.rest.*` namespace, since this is the component
taking care of HTTP communication with the actual Elasticsearch node.

`RestHighLevelClient` wraps the first one and naturally inherits that
configuration.

Closes gh-12600
2018-05-07 17:57:09 +02:00
Stephane Nicoll ea2a98d009 Merge branch '2.0.x' 2018-05-05 07:22:20 +02:00
Stephane Nicoll c22e9a5514 Make sure that JpaProperties does not have Hibernate imports
This commit removes Hibernate imports from JpaProperties so that it can
be used with another JPA provider.

This commit is a breaking change for an internal, yet public class used
to transmit customizations provided by the user. It does not change the
external functionality though: naming strategies defined as bean are
still taken into account and a customizer has a chance to override it
regardless.

Closes gh-13043
2018-05-05 07:21:50 +02:00
Phillip Webb a323a85e3b Merge branch '2.0.x' 2018-05-04 20:06:55 -07:00
Phillip Webb 975e986fef Polish 2018-05-04 20:06:27 -07:00
Phillip Webb f9750248ef Migrate KafkaProperties to use PropertyMapper 2018-05-04 20:06:11 -07:00
Phillip Webb 7b120c1c97 Formatting 2018-05-04 16:36:35 -07:00
Phillip Webb 42c053cf1b Merge branch '2.0.x' 2018-05-04 16:31:46 -07:00
Phillip Webb 6de479fe6a Polish 2018-05-04 16:08:05 -07:00
Madhura Bhave 6855c5556d EndpointRequest should consider server.servlet.path
Fixes gh-12934
2018-05-04 16:03:31 -07:00
Phillip Webb 5b3cb8a698 Update copyright header year for changed files 2018-05-04 15:59:26 -07:00
Phillip Webb 6e09e497f2 Formatting 2018-05-04 12:06:19 -07:00
Stephane Nicoll 23c49116ff Merge branch '2.0.x' 2018-05-04 16:57:27 +02:00
Stephane Nicoll 18b1e8da60 Merge branch '1.5.x' into 2.0.x 2018-05-04 16:57:12 +02:00
Phillip Webb b6a2a46f78 Merge branch '2.0.x' 2018-05-03 23:54:42 -07:00
Phillip Webb 2d70a7ae5e Polish caught exception names
Prefer `ex` over `e`.
2018-05-03 22:43:32 -07:00
Phillip Webb 41efea51a7 Polish ternary expressions
Consistently format ternary expressions and always favor `!=` as the
the check.
2018-05-03 22:43:12 -07:00
Phillip Webb 8c0c0ee55a Merge branch '2.0.x' 2018-05-03 12:44:58 -07:00
Phillip Webb e125085993 Merge branch '1.5.x' into 2.0.x 2018-05-03 12:43:50 -07:00
Stephane Nicoll 36a377764f Merge branch '2.0.x' 2018-05-03 15:53:32 +02:00
Stephane Nicoll 700ec6b840 Polish "Complete SSL configuration for Kafka"
Closes gh-13031
2018-05-03 15:50:33 +02:00
Toshiaki Maki d208641c59 Complete SSL configuration for Kafka
See gh-13031
2018-05-03 15:38:49 +02:00
Stephane Nicoll 921c037956 Merge branch '2.0.x' 2018-05-03 11:47:33 +02:00
Stephane Nicoll 69ab956e8b Stop assuming datasource creation failure originates from auto-config
There are documented way to reuse bits of the infrastructure in user
config to offer similar datasource configuration. If that fails, the
regular failure there will kick in.

This commit improves `DataSourceBeanCreationFailureAnalyzer` to not
misguide users that the auto-configuration has failed. Rather, it
describes what has failed in a more generic way.

Closes gh-12947
2018-05-03 11:46:27 +02:00
Gary Russell 8cf34238d3 Start building against Spring Kafka 2.2.0 snapshots
Closes gh-13007
2018-05-02 16:15:08 +02:00
Stephane Nicoll 4eeddbd889 Merge branch '2.0.x' 2018-05-02 16:08:03 +02:00
Stephane Nicoll d6244889f5 Add default value for "spring.flyway.locations"
See gh-12193
2018-05-02 16:07:38 +02:00
Andy Wilkinson 0526594a3c Merge branch '2.0.x' 2018-05-02 12:26:23 +01:00
Andy Wilkinson f019d5c85b Merge branch '1.5.x' into 2.0.x 2018-05-02 12:22:04 +01:00
Stephane Nicoll 0819822eb6 Merge branch '2.0.x' 2018-05-02 10:42:03 +02:00
Stephane Nicoll fbf8f57773 Merge branch '1.5.x' into 2.0.x 2018-05-02 10:41:24 +02:00
Stephane Nicoll 9f7be62687 Backport polish commit "22b99a90" 2018-05-01 11:33:26 -07:00
Stephane Nicoll 0fcffae0d9 Merge branch '2.0.x' 2018-04-30 16:50:51 +02:00
Johnny Lim d8700522d3 Rename nested *AutoConfiguration classes to *Configuration
Closes gh-12989
2018-04-30 16:50:18 +02:00
Stephane Nicoll 22b99a90de Polish
See gh-12906
2018-04-28 10:36:41 +02:00
Madhura Bhave acc1793e96 Merge branch '2.0.x' 2018-04-27 13:19:46 -07:00
Madhura Bhave 0385bd4131 Use spring.session.timeout for Spring Session timeout
Fallback to server.servlet.session.timeout for backwards compatibility.

Fixes gh-12906
2018-04-27 13:16:17 -07:00
Stephane Nicoll 4d0fe5bbe6 Merge branch '2.0.x' 2018-04-27 09:33:48 +02:00
Johnny Lim b941c5f1a6 Polish
Closes gh-12981
2018-04-27 09:29:16 +02:00
Stephane Nicoll b090280b0c Improve Couchbase auto-configuration
This commit improves the couchbase auto-configuration so that it is
easier to customize the way the connection to the couchbase server is
initiated.

See gh-11146
2018-04-25 13:35:49 +02:00
Brian Clozel e39e125aa2 Merge branch '2.0.x' 2018-04-23 13:54:42 +02:00
Brian Clozel e3e404f9f9 Fix optional ContentNegotiationStrategy for Actuator
Since https://jira.spring.io/browse/SPR-16624, the contract for
`ContentNegotiationStrategy` has been refined and should never return an
empty list if it's got no preference for a media type, but it should
rather respond with a `"*/*"` instead.

This commit fixes the `OptionalPathExtensionContentNegotiationStrategy`
defined in the Spring MVC auto-configuration to have that behavior.

Fixes gh-12900
2018-04-23 13:48:42 +02:00
Stephane Nicoll 719fcb4038 Merge branch '2.0.x' 2018-04-20 07:20:24 +02:00
dreis2211 a930835b92 Replace <code> tags where possible
Closes gh-12922
2018-04-20 07:19:31 +02:00
Vedran Pavic 7b9c5a3dc3 Use Jersey BOM in dependency management
Closes gh-12847
2018-04-12 15:58:32 +02:00
Stephane Nicoll 38bd4bd58c Stop associating an Executor bean to Quartz
This commits make sure that the Quartz auto-configuration no longer
associates an `Executor` bean if present in the context as Quartz offers
properties to tune it, which would mutate and lead to unexpected
results.

Closes gh-12823
2018-04-12 15:48:20 +02:00
Stephane Nicoll e4e56bbcc3 Migrate to ApplicationContextRunner 2018-04-12 15:48:20 +02:00
Phillip Webb ba85cefce3 Polish 2018-04-09 14:50:03 -07:00
Stephane Nicoll 6692301d51 Polish "Replace Couchbase's deprecated methods"
Closes gh-12655
2018-04-09 16:17:46 +02:00
Yulin Qin 3236306e53 Replace Couchbase's deprecated methods
See gh-12655
2018-04-09 13:22:22 +02:00
Stephane Nicoll 92d9479765 Gracefully handle exclusion of DataSourceAutoConfiguration
This commit makes sure that an auto-configuration that requires
`DataSourceProperties` will not break if `DataSourceAutoConfiguration`
has been explicitly excluded.

Closes gh-12512
2018-04-09 10:34:23 +02:00
Madhura Bhave 2f5ab50367 Add @QuartzDataSource for quartz auto-configuration
Closes gh-12755
2018-04-05 16:49:04 -07:00
Phillip Webb 41dc70146a Polish "Prevent warnings when running embedded Artemis"
Closes gh-12680
2018-04-04 21:10:35 -07:00
Benjamin Graf 19818b752c Prevent warnings when running embedded Artemis
Configure AddressSettings for DLQ and ExpiryQueue for the embedded
Artemis broker to prevent warnings from being logged.

Closes gh-12680
2018-04-04 21:03:04 -07:00
Phillip Webb 685babc829 Polish "Use lambdas for map entry iteration where possible"
Closes gh-12626
2018-04-04 19:36:18 -07:00
igor-suhorukov 69bc19e0ca Use lambdas for map entry iteration where possible
See gh-12626
2018-04-04 19:36:10 -07:00
Phillip Webb 598e9bb842 Polish 2018-04-04 18:01:25 -07:00
Phillip Webb d49a1024bd Merge branch '1.5.x' 2018-04-04 15:35:20 -07:00
Phillip Webb 6fb4fba43a Merge branch '1.5.x' 2018-04-04 12:17:57 -07:00
Madhura Bhave 8e81f0c23d Fix conditions report message for same short name
If two auto-configuration classes with the same name are present,
the conditions report message now uses the fully qualified name for
both instead of the short name.

Fixes gh-11710
2018-04-02 12:57:28 -07:00
Phillip Webb 7649eb6230 Allow auto-configure sort with incomplete chain
Update `AutoConfigurationSorter` so that all `@AutoConfigureBefore` and
`@AutoConfigureAfter` classes are considered even if they are ultimately
not part of the requested set.

Prior to this commit, given classes ordered with annotations such that
A -> B -> C a call to sort only [A, B] could return the incorrect order.

Fixes gh-12660
2018-03-29 18:00:38 -07:00
Stephane Nicoll 4b4a8acb9d 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-29 17:41:35 -07:00
Phillip Webb 98a2a91d16 Polish 2018-03-29 14:00:13 -07:00
Stephane Nicoll d456e1de49 Polish contribution
Closes gh-12590
2018-03-29 08:53:17 +02:00
Johnny Lim 74f9a84ea9 Make intermediate classes in type hierarchy of public class public
See gh-12590
2018-03-29 08:51:46 +02:00
Stephane Nicoll 13f45e6434 Remove misleading Jersey configuration property
This commit removes an override of a `ResourceConfig` property that was
set as an init parameter property (and therefore ignored).

Closes gh-3557
2018-03-28 13:53:26 +02:00
Stephane Nicoll ccbfcbedf0 Add support for org.jooq.RecordUnmapperProvider
Closes gh-12560
2018-03-28 13:42:54 +02:00
Stephane Nicoll 42e81e987b Fix @EnableIntegrationManagement
Restore proper use of `defaultCountsEnabled` that was inadvertently
changed to `countsEnabled`

Closes gh-12594
2018-03-27 18:57:41 +02:00
Stephane Nicoll 553b184248 Polish "Use Supplier variants of Assert methods"
Closes gh-12630
2018-03-26 17:59:35 +02:00
dreis2211 3b0f6e7168 Use Supplier variants of Assert methods
See gh-12630
2018-03-26 17:58:17 +02:00
Stephane Nicoll 62cc4e9552 Polish "Remove value in @ConditionalOnMissingBean if possible"
Closes gh-12604
2018-03-26 17:47:00 +02:00
Johnny Lim c100510222 Remove value in @ConditionalOnMissingBean if possible
See gh-12604
2018-03-26 17:38:46 +02:00
Johnny Lim 625bf93598 Polish
See gh-12584
2018-03-26 17:33:25 +02:00
Stephane Nicoll 9cac45d514 Polish "Add Redis Sentinel database support"
Closes gh-12556
2018-03-26 12:37:37 +02:00
Alen Turkovic 1f80079c49 Add Redis Sentinel database support
See gh-12556
2018-03-26 12:33:16 +02:00
igor-suhorukov 21628a9a59 Polish
Closes gh-12553
2018-03-20 09:08:21 -04:00
Andy Wilkinson 72e36eadae Polish 2018-03-17 15:28:05 +00:00
Andy Wilkinson 6c77b012f0 Polish "Follow project convention for lambda expression"
Csee gh-12527
2018-03-17 15:23:50 +00:00
igor-suhorukov 261264cef3 Follow project convention for lambda expression
Closes gh-12527
2018-03-17 15:22:37 +00:00
Stephane Nicoll 78571f50f8 Restore server.error.include-stacktrace default value 2018-03-17 07:00:09 -04:00
Phillip Webb 79ad03b584 Merge branch '1.5.x' 2018-03-16 15:06:08 -07:00
Phillip Webb 620208a802 Polish 2018-03-16 13:39:50 -07:00
Brian Clozel 0162978c78 Support server.error.whitelabel.enabled in WebFlux
This commit disables the default HTML view in the WebFlux error handling
support when `server.error.whitelabel.enabled=false`.
In this case, the original exception will be forwarded down the stream
and handled by the default `WebExceptionHandler` provided by Spring
WebFlux (likely to respond a blank page and an error HTTP response
status).

Closes gh-12520
2018-03-16 16:54:34 +01:00
Brian Clozel 161ecc0575 Bind server.error.whitelabel.enabled to ErrorProperties
Closes gh-12516
2018-03-16 16:54:22 +01:00
Andy Wilkinson 2da4897aa8 Polish 2018-03-16 09:57:35 +00:00
Phillip Webb c201c1dac1 Polish 2018-03-15 16:09:14 -07:00
Madhura Bhave cb3da28bb9 Enforce length > 1 for H2 and WebServices path
Fixes gh-12485
2018-03-15 12:14:28 -07:00
Brian Clozel a0b9974796 Polish Couchbase tests 2018-03-15 15:49:21 +01:00
dreis2211 ca30739bf9 Use ApplicationContextRunner in tests
Closes gh-12495
2018-03-15 14:28:56 +01:00
Brian Clozel 57147241cb Make WebClientCustomizer optional for WebClient
This commit removes the required dependency on `WebClientCustomizer`
instances when creating `WebClient` beans, making it optional.

Closes gh-12458
2018-03-15 10:47:45 +01:00
Brian Clozel a08deff0ce Fix WelcomePageHandlerMapping order
This commit fixes 220f8cd and moves the order for
`WelcomePageHandlerMapping` to `2` since the previous order was
conflicting with the resource mapping.

Closes gh-12335
2018-03-14 23:38:17 +01:00
Phillip Webb c3bc6f6dd6 Polish "Move test to ApplicationContextRunner"
Closes gh-12477
2018-03-14 15:20:56 -07:00
dreis2211 3246496e2c Move test to ApplicationContextRunner
Move `DispatcherServletAutoConfigurationTests` to use the
`ApplicationContextRunner`

See gh-12477
2018-03-14 15:20:16 -07:00
dreis2211 8626daf135 Replace Mockito.times(0) with Mockito.never()
Closes gh-12475
2018-03-14 15:12:20 -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 b80620fe28 Revert "Group auto-configuration import selectors together"
This reverts commit 26d9c26
2018-03-14 08:34:30 -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
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
Stephane Nicoll 44b7673ee6 Polish 2018-02-20 11:04:52 +01:00
Phillip Webb 20109e27be Add ApplicationConversionService and fix binder
Create a new `ApplicationConversionService` similar in design to the
DefaultFormattingConversionService from Spring Framework. The new
conversion service provides a central place for custom conversion logic
supported by Spring Boot.

Also replace the `BindingConversionService` with an internal
`BindConverter` class that now invokes the `SimpleTypeConverter`
directly. Binding for `@ConfigurationProperties` has been updated so
that any custom property editors registered with the BeanFactory can
be used.

Fixes gh-12095
2018-02-19 20:25:47 -08:00
Phillip Webb 61f44179cb Relocate XA wrapper types
Move `XADataSourceWrapper` to `jdb` and `XAConnectionFactoryWrapper` to
`jms` so that they are packaged in a similar way to the underlying XA
types.

Fixes gh-12061
2018-02-19 20:22:03 -08:00
igor-suhorukov fe023817c7 Polish static finals
Closes gh-12083
2018-02-19 20:10:58 -08:00
Johnny Lim 88b184ca23 Polish 2018-02-19 20:00:20 -08:00
Andy Wilkinson da5bebf574 Revert "Use Jersey BOM in dependency management"
This reverts commit da7bf05c87.

Closes gh-12103
2018-02-18 09:52:19 +00:00
Phillip Webb 9e75680e6f Polish 2018-02-16 18:11:54 -08:00
Madhura Bhave 51de220b55 Enable CSRF protection by default
Fixes gh-11758
2018-02-16 13:31:51 -08: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
Andy Wilkinson fe4c8f95ed Rename ReactiveWebServerAutoConfiguration
Closes gh-12086
2018-02-16 10:02:35 +00:00
Vedran Pavic da7bf05c87 Use Jersey BOM in dependency management
Closes gh-12082
2018-02-16 08:25:20 +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
Phillip Webb 6771cc9674 Polish 2018-02-13 14:41:12 -08: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
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 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
Phillip Webb 0348889fd7 Polish 2018-02-12 10:03:06 -08: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
Andy Wilkinson 1b156fc2c3 Polish 2018-02-12 11:26:53 +00:00
Andy Wilkinson 6d1d9eb816 Polish 2018-02-12 10:53:30 +00:00
Stephane Nicoll 2f13449b26 Polish "Improve FailureAnalyzer for embedded datasource"
Closes gh-11953
2018-02-12 11:11:36 +01:00
Patryk Kostrzewa e66745a98a Improve FailureAnalyzer for embedded datasource
See gh-11953
2018-02-12 11:11:36 +01:00
Phillip Webb 3ec778fb64 Polish 2018-02-09 11:31:53 -08:00
Stephane Nicoll a97a762086 Only set mapping resources when present
This commit sets a mapping resources list only when there is at least an
element in it. This allows the default fallback of finding an "orm.xml"
file to kick in when no customization has been applied.

Closes gh-11964
2018-02-09 12:01:08 +01:00
Phillip Webb 5de46c3186 Polish 2018-02-08 16:35:10 -08:00
Andy Wilkinson 5522174e96 Provide package info for all packages included in javadoc 2018-02-08 16:50:37 +00:00
Andy Wilkinson a09c64e18c Polish 2018-02-08 11:15:36 +00:00
Andy Wilkinson 76a450dfba Format with Eclipse Oxygen SR2 2018-02-08 10:53:53 +00:00
Madhura Bhave 0a446cb962 Refactor Spring Security auto-configuration classes
The auto-configuration for a `UserDetailsService` and the web bits
has been split into two.

Closes gh-11915
Fixes gh-11891
2018-02-07 16:12:46 -08:00
Andy Wilkinson 9a456924e4 Remove - from path-match and content-negotiation properties
Closes gh-11913
2018-02-07 15:09:32 +00:00
Phillip Webb a631619f63 Allow subpath H2 console matching
Fixes gh-11926
2018-02-06 13:25:17 -08:00
Phillip Webb eab1705351 Restore EmbeddedLdapAutoConfiguration condition
Restore a `@Condition` guard to `EmbeddedLdapAutoConfiguration`.

See gh-11764
2018-02-04 19:39:55 -08:00
Phillip Webb eab0b84a80 Polish 'Add support for multi baseDn;
Update multi baseDn support to use the recently introduced
`@Delimter` annotation

Closes gh-11764
2018-02-04 10:43:26 -08:00
Eddú Meléndez 270dc2cd72 Add support for multi baseDn
Update LDAP properties and auto-configuration to support multiple
base DN values.

See gh-11764
2018-02-04 10:41:57 -08:00
Eddú Meléndez 44ad630de3 Migrate LDAP tests to use ApplicationContextRunner 2018-02-04 10:41:23 -08:00
Lukas Eder 44cd3352a5 Detect jOOQ SQLDialect through jOOQ's JDBCUtils
This change updates SqlDialectLookup to delegate to jOOQ's JDBCUtils
rather than creating an additional mapping between
org.springframework.boot.jdbc.DatabaseDriver and org.jooq.SQLDialect.

This has the following advantages:

1. jOOQ's `SQLDialect` to URL mappings are already maintained by jOOQ,
   so no additional changes will be necessary to Spring Boot in the
   future.
2. Delegating to jOOQ means that the mapping also works for the
   commercial jOOQ distributions, e.g. when working with DB2, Oracle,
   SQL Server, etc., as the JDBCUtils of the commercial distribution
   also contains the relevant logic to map to e.g. `SQLDialect.DB2`,
   `SQLDialect.ORACLE`, `SQLDialect.SQLSERVER` (which are not
   available from the open source distribution linked by Spring Boot
   by default).

Closes gh-11466
2018-02-02 13:02:36 +00:00
Andy Wilkinson 00489c74ea Start building against Spring Data Kay SR4 snapshots
The fix in Spring Data Redis for sentinel configuration means that
two Jedis sentinel tests now attempt to connect to a Sentinel. As a
result the tests fail. Running a Redis Sentinel in a Docker container
appears to be non-trivial. As an alternative, this commit updates the
tests to capture the JedisConnectionFactory prior to its
initialization (which is the failure trigger) and then assert that its
configuration is as expected.

See gh-11884
Closes gh-11855
2018-02-02 11:12:37 +00:00
Andy Wilkinson 9a87424809 Use ApplicationContextRunner in RedisAutoConfigurationJedisTests 2018-02-02 11:12:22 +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
Andy Wilkinson 4a1bea1fed Polish 2018-02-01 20:03:02 +00:00
Phillip Webb 7d5e41f7dc Polish 2018-02-01 10:25:33 -08:00
dreis2211 3e84f5bdbe Remove obsolete comment
Closes gh-11874
2018-02-01 09:00:32 +01:00
Johnny Lim 3cead7693d Polish
Closes gh-11871
2018-02-01 08:35:42 +01:00
Madhura Bhave 71e9db012b Convert tests to use ApplicationContextRunner 2018-01-31 19:03:09 -08:00
Madhura Bhave 905666e797 Document usage of `AuthenticationEventPublisher`
Closes gh-11420
2018-01-31 18:41:08 -08:00
Stephane Nicoll 1106c582a7 Remove error-level metadata for Spring Mobile
While Spring Mobile support has been removed from Spring Boot, the
auto-configuration has been relocated to a separate module that uses
the same keys.

Flagging those keys as deprecated means that the IDE will be confused
when the extra jar is present on the classpath as it advertizes, as
it should, support fo them.

Closes gh-11844
2018-01-30 15:28:28 +01:00
Stephane Nicoll 726a1d075e Polish metadata for spring.flyway.sql-migration-suffix 2018-01-30 14:41:06 +01:00
Stephane Nicoll 87c82310cf Merge branch '1.5.x' 2018-01-30 10:42:45 +01:00
Phillip Webb c90a5a9e9e Polish 2018-01-29 21:35:56 -08:00
Madhura Bhave 134628a62d Add PathRequest to reactive security for parity 2018-01-29 18:34:46 -08:00
Madhura Bhave e80c22cbf8 Add RequestMatcher for H2 console
Fixes gh-11704
2018-01-29 18:34:46 -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
Andy Wilkinson 6582afea4a Polish 2018-01-29 21:04:41 +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
Stephane Nicoll c2a2999799 Use proper classloader for value serialization
Closes gh-11822
2018-01-29 13:55:05 +01:00
dreis2211 c1675c2d5f Use InvocationOnMock.getArgument() where possible
Closes gh-11818
2018-01-29 08:06:00 +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 192fe929c7 Polish "Use custom DataSource if Flyway or Liquibase has user or url"
Closes gh-11751
2018-01-26 14:51:43 +00:00
Dominic Gunn 5d3cd23eed Use custom DataSource if Flyway or Liquibase has user or url
This commit enables a more flexible Liquibase/Flyway configuration by
allowing for a combination of the provider's and the primary
DataSource's configuration to be used. This gives developers the
flexibility to specify only a user or a url and having
Liquibase/Flyway fall back to individual datasource properties rather
than ignoring the Liquibase/Flyway properties and falling back to the
default data source.

See gh-11751
2018-01-26 14:51:43 +00:00
Stephane Nicoll 1c195f5b9a Polish "Migrate server customizer to PropertyMapper"
Closes gh-11772
2018-01-26 13:48:07 +01:00