Commit Graph

616 Commits (839e686c9ef290a4183936d11e5ac10a8f7b56ed)

Author SHA1 Message Date
Stephane Nicoll a9b2826c26 Merge branch '1.5.x' into 2.0.x 7 years ago
Johnny Lim 6b0ce46491 Polish
Closes gh-13320
7 years ago
Stephane Nicoll 20e349c332 Polish 7 years ago
Stephane Nicoll 32aa5b9bae Merge branch '1.5.x' into 2.0.x 7 years ago
Phillip Webb f8ec2e6176 Polish 7 years ago
Phillip Webb 09fa1e7e11 Polish 7 years ago
Johnny Lim 4eb070767c Remove an unnecessary @QuartzDataSource
Closes gh-13302
7 years ago
dreis2211 3ed31d60dc Add assertion in IntegrationAutoConfigurationTests
Closes gh-13280
7 years ago
Stephane Nicoll 8a9d0bd22a Merge branch '1.5.x' into 2.0.x 7 years ago
Johnny Lim f385a1cb11 Polish
Closes gh-13243
7 years ago
Phillip Webb 6f0ccc64a5 Fix checkstyle violations 7 years ago
Phillip Webb 9fd3b9103a Format code 7 years ago
Phillip Webb 9c5f207e22 Fix merge error 7 years ago
Phillip Webb 21d80d87a3 Merge branch '1.5.x' into 2.0.x 7 years ago
Phillip Webb 2dc4f1df00 Polish 7 years ago
Phillip Webb 6d8b4710d7 Merge branch '1.5.x' into 2.0.x 7 years ago
Stephane Nicoll 125b5974c0 Merge branch '1.5.x' into 2.0.x 7 years ago
Johnny Lim 652bbf4ab2 Polish DefaultErrorWebExceptionHandler.renderErrorView()
Closes gh-13174
7 years ago
Johnny Lim b9aa934d78 Remove @Deprecated on CouchbaseProperties.Endpoints.setKeyValue()
Closes gh-13171
7 years ago
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
7 years ago
Johnny Lim 3dd2f5bb05 Polish
See gh-13148
7 years ago
Johnny Lim aa60d60b8a Polish JpaProperties.determineDdlAuto()
Closes gh-13036
7 years ago
dreis2211 e6a23fa3ff Remove unnecessary semicolons
Closes gh-13144
7 years ago
Johnny Lim 75e591e76e Polish
Closes gh-13130
7 years ago
Stephane Nicoll 4683940423 Merge branch '1.5.x' into 2.0.x 7 years ago
Andy Wilkinson c826310fd1 Polish 7 years ago
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
7 years ago
Phillip Webb 975e986fef Polish 7 years ago
Phillip Webb f9750248ef Migrate KafkaProperties to use PropertyMapper 7 years ago
Phillip Webb 6de479fe6a Polish 7 years ago
Madhura Bhave 6855c5556d EndpointRequest should consider server.servlet.path
Fixes gh-12934
7 years ago
Phillip Webb 5b3cb8a698 Update copyright header year for changed files 7 years ago
Phillip Webb 6e09e497f2 Formatting 7 years ago
Stephane Nicoll 18b1e8da60 Merge branch '1.5.x' into 2.0.x 7 years ago
Phillip Webb 2d70a7ae5e Polish caught exception names
Prefer `ex` over `e`.
7 years ago
Phillip Webb 41efea51a7 Polish ternary expressions
Consistently format ternary expressions and always favor `!=` as the
the check.
7 years ago
Phillip Webb e125085993 Merge branch '1.5.x' into 2.0.x 7 years ago
Stephane Nicoll 700ec6b840 Polish "Complete SSL configuration for Kafka"
Closes gh-13031
7 years ago
Toshiaki Maki d208641c59 Complete SSL configuration for Kafka
See gh-13031
7 years ago
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
7 years ago
Stephane Nicoll d6244889f5 Add default value for "spring.flyway.locations"
See gh-12193
7 years ago
Andy Wilkinson f019d5c85b Merge branch '1.5.x' into 2.0.x 7 years ago
Stephane Nicoll fbf8f57773 Merge branch '1.5.x' into 2.0.x 7 years ago
Stephane Nicoll 9f7be62687 Backport polish commit "22b99a90" 7 years ago
Johnny Lim d8700522d3 Rename nested *AutoConfiguration classes to *Configuration
Closes gh-12989
7 years ago
Madhura Bhave 0385bd4131 Use spring.session.timeout for Spring Session timeout
Fallback to server.servlet.session.timeout for backwards compatibility.

Fixes gh-12906
7 years ago
Johnny Lim b941c5f1a6 Polish
Closes gh-12981
7 years ago
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
7 years ago
dreis2211 a930835b92 Replace <code> tags where possible
Closes gh-12922
7 years ago
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
7 years ago
Stephane Nicoll e4e56bbcc3 Migrate to ApplicationContextRunner 7 years ago
Phillip Webb ba85cefce3 Polish 7 years ago
Stephane Nicoll 6692301d51 Polish "Replace Couchbase's deprecated methods"
Closes gh-12655
7 years ago
Yulin Qin 3236306e53 Replace Couchbase's deprecated methods
See gh-12655
7 years ago
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
7 years ago
Madhura Bhave 2f5ab50367 Add @QuartzDataSource for quartz auto-configuration
Closes gh-12755
7 years ago
Phillip Webb 41dc70146a Polish "Prevent warnings when running embedded Artemis"
Closes gh-12680
7 years ago
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
7 years ago
Phillip Webb 685babc829 Polish "Use lambdas for map entry iteration where possible"
Closes gh-12626
7 years ago
igor-suhorukov 69bc19e0ca Use lambdas for map entry iteration where possible
See gh-12626
7 years ago
Phillip Webb 598e9bb842 Polish 7 years ago
Phillip Webb d49a1024bd Merge branch '1.5.x' 7 years ago
Phillip Webb 6fb4fba43a Merge branch '1.5.x' 7 years ago
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
7 years ago
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
7 years ago
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
7 years ago
Phillip Webb 98a2a91d16 Polish 7 years ago
Stephane Nicoll d456e1de49 Polish contribution
Closes gh-12590
7 years ago
Johnny Lim 74f9a84ea9 Make intermediate classes in type hierarchy of public class public
See gh-12590
7 years ago
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
7 years ago
Stephane Nicoll ccbfcbedf0 Add support for org.jooq.RecordUnmapperProvider
Closes gh-12560
7 years ago
Stephane Nicoll 42e81e987b Fix @EnableIntegrationManagement
Restore proper use of `defaultCountsEnabled` that was inadvertently
changed to `countsEnabled`

Closes gh-12594
7 years ago
Stephane Nicoll 553b184248 Polish "Use Supplier variants of Assert methods"
Closes gh-12630
7 years ago
dreis2211 3b0f6e7168 Use Supplier variants of Assert methods
See gh-12630
7 years ago
Stephane Nicoll 62cc4e9552 Polish "Remove value in @ConditionalOnMissingBean if possible"
Closes gh-12604
7 years ago
Johnny Lim c100510222 Remove value in @ConditionalOnMissingBean if possible
See gh-12604
7 years ago
Johnny Lim 625bf93598 Polish
See gh-12584
7 years ago
Stephane Nicoll 9cac45d514 Polish "Add Redis Sentinel database support"
Closes gh-12556
7 years ago
Alen Turkovic 1f80079c49 Add Redis Sentinel database support
See gh-12556
7 years ago
igor-suhorukov 21628a9a59 Polish
Closes gh-12553
7 years ago
Andy Wilkinson 72e36eadae Polish 7 years ago
Andy Wilkinson 6c77b012f0 Polish "Follow project convention for lambda expression"
Csee gh-12527
7 years ago
igor-suhorukov 261264cef3 Follow project convention for lambda expression
Closes gh-12527
7 years ago
Stephane Nicoll 78571f50f8 Restore server.error.include-stacktrace default value 7 years ago
Phillip Webb 79ad03b584 Merge branch '1.5.x' 7 years ago
Phillip Webb 620208a802 Polish 7 years ago
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
7 years ago
Brian Clozel 161ecc0575 Bind server.error.whitelabel.enabled to ErrorProperties
Closes gh-12516
7 years ago
Andy Wilkinson 2da4897aa8 Polish 7 years ago
Phillip Webb c201c1dac1 Polish 7 years ago
Madhura Bhave cb3da28bb9 Enforce length > 1 for H2 and WebServices path
Fixes gh-12485
7 years ago
Brian Clozel a0b9974796 Polish Couchbase tests 7 years ago
dreis2211 ca30739bf9 Use ApplicationContextRunner in tests
Closes gh-12495
7 years ago
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
7 years ago
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
7 years ago
Phillip Webb c3bc6f6dd6 Polish "Move test to ApplicationContextRunner"
Closes gh-12477
7 years ago
dreis2211 3246496e2c Move test to ApplicationContextRunner
Move `DispatcherServletAutoConfigurationTests` to use the
`ApplicationContextRunner`

See gh-12477
7 years ago
dreis2211 8626daf135 Replace Mockito.times(0) with Mockito.never()
Closes gh-12475
7 years ago
Phillip Webb a4b0be089d Polish 7 years ago
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
7 years ago
Stephane Nicoll b80620fe28 Revert "Group auto-configuration import selectors together"
This reverts commit 26d9c26
7 years ago
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
7 years ago
igor-suhorukov 97d803bd30 Polish
Closes gh-12448
7 years ago
Stephane Nicoll bb25b0a1f4 Merge branch '1.5.x' 7 years ago
igor-suhorukov aebb475bc5 Reorder modifiers to comply with the JLS
See gh-12432
7 years ago
Andy Wilkinson 3642636b60 Align test build-info.properties with ISO 8601 formatt changes
See gh-12420
7 years ago
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
7 years ago
Stephane Nicoll 1b36ab5be0 Fix wrong import 7 years ago
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
7 years ago
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
7 years ago
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
7 years ago
Stephane Nicoll 326c1e123c Merge branch '1.5.x' 7 years ago
Stephane Nicoll 6f7501f62b Remove my clone 7 years ago
Stephane Nicoll 7f5b7a6b47 Polish contribution
Closes gh-12326
7 years ago
Johnny Lim 751c444166 Polish
See gh-12326
7 years ago
Johnny Lim 83ed0c7783 Make UserDetailsServiceAutoConfiguration.getOrDeducePassword() private
Closes gh-12295
7 years ago
Phillip Webb 7bc535e4fa Polish 7 years ago
Andy Wilkinson 9b46221345 Escape backslashes so they are preserved during Properties parsing
Closes gh-12285
7 years ago
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
7 years ago
Stephane Nicoll 5fa71a1f94 Switch test to ApplicationContextRunner 7 years ago
Stephane Nicoll 4180762d6d Polish contribution
Closes gh-12236
7 years ago
igor-suhorukov 56cbc65e7b Polish
See gh-12236
7 years ago
Phillip Webb c23b0e99f1 Fix failing PathRequestTests
Fix test failing due to commit d66496787d.

See gh-12238
7 years ago
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
7 years ago
Andy Wilkinson dc36360155 Polish 7 years ago
Phillip Webb 3e4da3cc37 Polish 7 years ago
Andy Wilkinson c7ed5c3d4a Upgrade to EhCache 3.5.0
Closes gh-12256
7 years ago
Stephane Nicoll 6676967cc1 Polish 7 years ago
Phillip Webb 29c3be3590 Polish 7 years ago
Stephane Nicoll 306c79f0de Merge branch '1.5.x' 7 years ago
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
7 years ago
Johnny Lim d441a8a89a Polish
Closes gh-12205
7 years ago
Andy Wilkinson 1314678890 Nest @EnableWebFluxSecurity to avoid overzealous Wildfly warnings
Closes gh-12174
7 years ago
Andy Wilkinson 782ab2803e Polish documentation regarding target class proxying
Closes gh-12196
7 years ago
Stephane Nicoll 9b61df6a2b Polish 7 years ago
Stephane Nicoll 13b736b1cd Migrate remaining duration-based properties for Rabbit
Closes gh-12192
7 years ago
Stephane Nicoll 976a23d977 Fix duration unit of spring.messages.cache-duration
Closes gh-12183
7 years ago
Stephane Nicoll 92d1c6126b Harmonize `accesslog.enabled` flag for Undertow
Closes gh-12178
7 years ago
Stephane Nicoll 09ff815f00 Harmonize metadata
Closes gh-12177
7 years ago
Phillip Webb 4b9c3c137e Polish Collection.toArray
Consistently use `StringUtils.toStringArray`, `ClassUtils.toClassArray`
or zero length when converting collections to arrays.

Fixes gh-12160
7 years ago
Phillip Webb cd5266ac03 Polish 7 years ago
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
7 years ago
Johnny Lim 2fe86da95b Use isTrue() and isFalse() for AssertJ
Closes gh-12170
7 years ago
Andy Wilkinson e7176c63f5 Stop DataSource initialization from preventing Hikari instrumentation
Closes gh-12129
7 years ago
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
7 years ago
Phillip Webb 05faac2b09 Polish 7 years ago
Andy Wilkinson b5e2c5ec1c Polish 7 years ago
Stephane Nicoll ce01a9145b Polish 7 years ago
Stephane Nicoll 20f104766b Add missing default values for enums 7 years ago
Stephane Nicoll 6f59dd6b17 Polish "Update documentation to reference webjars-locator-core"
Closes gh-12135
7 years ago