1913 Commits

Author SHA1 Message Date
Andy Wilkinson
95f26c6358 Configure Flyway with initSqls for any DataSource configuration
Previously, spring.flyway.init-sqls was only applied to Flyway's
configuration if Flyway was being configured to create the DataSource.
If Flyway was being configured to use an existing DataSource, init-sqls
was not applied. This is a hangover from when the init SQLs support was
introduced. At that time, Flyway only supported SQL to initialize the
connection when it was creating the DataSource. Flyway 5.2 added init
SQL support no matter how Flyway's DataSource was configured.

This commit updates FlywayAutoConfiguration to always apply the
init-sqls property to Flyway's configuration. The property's
documentation does not describe the current limitation so this change
should align the behaviour with what the documentation leads people to
expect.

Fixes gh-23392
2020-09-18 13:03:24 +01:00
Andy Wilkinson
5a266155b0 Disable proxyBeanMethods on Spring Session config sub-classes
Closes gh-23280
2020-09-15 16:32:15 +01:00
Phillip Webb
d8232b3c21 Polish 'Allow other "timestamp" types in MVC error model'
See gh-23256
2020-09-11 18:44:04 -07:00
lock14
d1d953819a Allow other "timestamp" types in MVC error model
Remove casting "timestamp" to `java.util.Date` in
`ErrorMvcAutoConfiguration` as the cast is not necessary and it
prevents other types (e.g. `java.time`) from being used.

See gh-23256
2020-09-11 18:11:47 -07:00
Stephane Nicoll
4b5a3f4ff9 Start building against Spring Framework 5.2.9 snapshots
See gh-23182
2020-09-07 08:47:57 +02:00
Andy Wilkinson
84a12c8436 Upgrade to Testcontainers 1.14.3
Closes gh-23122
2020-08-28 11:57:32 +01:00
Stephane Nicoll
5b0f22e8fe Fix unintended import on commons lang
Closes gh-23059
2020-08-24 12:12:33 +02:00
Andy Wilkinson
72551242fd Allow XADataSource auto-config with no spring.datasource properties
Fixes gh-20229
2020-07-29 13:57:50 +01:00
Andy Wilkinson
16eaae0b2f Defer background pre-init till the environment is prepared
Previously, background pre-init was started in response to the
application starting event. This meant that it would be running while
the logging turbo filter was in place and was rejecting all logging.
As a result, any logging performed during pre-init would be lost.

This commit changes background pre-init so that it is now started
in response to the application environment prepared event. By this
point, the logging turbo filter has been removed as the logging levels
have been configured from the environment.

Closes gh-21897
2020-07-27 11:24:36 +01:00
Andy Wilkinson
b98c3dccfd Fix property-based configuration of Undertow socket options
Previously, only UndertowOptions was used as the source of options for
both server and socket options, but it only contains server options.
As a result, attempting to configure any socket options defined by
XNIO's Options class would fail.

This commit updates the property-based configuration of options to use
UndertowOptions as the source for server options and XNIO's Options as
the source for socket options.

Fixes gh-22502
2020-07-27 10:47:14 +01:00
Phillip Webb
b5e70157dc Update copyright year of changed files 2020-07-22 17:01:36 -07:00
Andy Wilkinson
d9882f2c88 Clarify the effects of ordering auto-configuration classes
Closes gh-22337
2020-07-15 10:48:01 +01:00
Andy Wilkinson
afa5b12bdb Make reactive Jetty auto-config back off without jetty-servlet
Fixes gh-22275
2020-07-09 10:36:32 +01:00
Andy Wilkinson
4e79bb1cff Disable bean method proxying in SpringBootJdbcConfiguration
Closes gh-22231
2020-07-07 11:51:07 +01:00
Andy Wilkinson
a8d3f9af31 Polish "Rename NoneOfNestedConditions to NoneNestedConditions in example docs"
See gh-22207
2020-07-07 10:46:32 +01:00
Clayton Walker
7fee70a625 Rename NoneOfNestedConditions to NoneNestedConditions in example docs
See gh-22207
2020-07-07 10:46:20 +01:00
Andy Wilkinson
4301580095 Improve testing of PropertyPlaceholderAutoConfiguration
Since Spring Framework 4.3.0.RC2, a default embedded value resolver
has been registered with the bean factory when one is not otherwise
configured. This meant that placeholders in `@Value` would be resolved
with or without PropertyPlaceholderAutoConfiguration defining a
PropertySourcesPlaceholderConfigurer bean. However, placeholders in
bean definitions would only be resolved if a
PropertySourcesPlaceholderConfigurer was defined.

This commit updates PropertyPlaceholderAutoConfigurationTests to align
with this change in Framework. We now test that placeholders are
resolved in `@Value` annotations with or without the auto-configuration
and that placeholders in bean definitions are only resolved with the
auto-configured.

Closes gh-22230
2020-07-06 14:24:36 +01:00
Andy Wilkinson
21453b5016 Ignore scoped targets when finding matching beans
Fixes gh-22038
2020-07-02 10:39:56 +01:00
Andy Wilkinson
81d6751ba7 Use ApplicationContextRunner in ConditionalOnSingleCandidateTests 2020-07-02 10:10:28 +01:00
dreis2211
8c0e302f2e Accept empty filter dispatcher types in auto-configurations
Prior to this commit, the usage of EnumSet.copyOf resulted in exceptions when
the underlying collection was empty.

See gh-22138
2020-06-30 17:39:21 +01:00
Stephane Nicoll
cc3575b3f4 Merge branch '2.1.x' into 2.2.x 2020-06-09 16:26:44 +02:00
Stephane Nicoll
9a457527fd Polish test 2020-06-09 16:00:50 +02:00
Andy Wilkinson
a0f29edd4d Always initialize stompWebSocketHandlerMapping eagerly
Previously, when lazy initialization was enabled, STOMP-based WebSocket
messaging would not work as the stompWebSocketHandlerMapping bean was
not initialized and CONNECT requests would go unanswered.

This commit adds a LazyInitializationExcludeFilter that causes the
stompWebSocketHandlerMapping bean to always be initialized eagerly.
This triggers initialization of the WebSocket transport allowing
requests to be received and processed.

Fixes gh-19611
2020-06-09 11:02:02 +01:00
Andy Wilkinson
8da1e3addb Merge branch '2.1.x' into 2.2.x 2020-06-08 11:35:10 +01:00
Andy Wilkinson
6a9450ee8b Polish 2020-06-08 11:34:56 +01:00
Phillip Webb
bfe1c281f0 Merge branch '2.1.x' into 2.2.x
Closes gh-21743
2020-06-07 10:25:33 -07:00
Phillip Webb
70e0a27949 Drop the use of the term "white list"
Closes gh-21737
2020-06-07 10:22:35 -07:00
Phillip Webb
0a05b4c9fd Update copyright year of changed files 2020-06-05 15:36:09 -07:00
dreis2211
9bb22ffb69 Remove usages of deprecated Connector.setAttribute()
See gh-21671
2020-06-05 16:32:42 +02:00
Stephane Nicoll
77981ac2ae Polish "Use the container IP address for tests using TestContainer"
See gh-21480
2020-05-25 14:29:24 +02:00
olivier lamy
0c2bf70bb8 Use the container IP address for tests using TestContainer
See gh-21480
2020-05-25 14:03:18 +02:00
Madhura Bhave
27ada029b5 Revert "Expose property to configure OAuth2 provider configurationMetadata"
This reverts commit 7b79029949dbc09a98de66522bb6a45f620d33a6.

See gh-21375
2020-05-13 13:53:46 -07:00
Phillip Webb
daed512076 Restore getUseRelativeRedirects in deprecated form
Restore the `getUseRelativeRedirects` method with a `Boolean` object
result and introduce `isUseRelativeRedirects` for the primitive boolean
variant.

See gh-20796
2020-05-13 11:36:24 -07:00
Madhura Bhave
7b79029949 Expose property to configure OAuth2 provider configurationMetadata
Closes gh-21375
2020-05-12 13:42:03 -07:00
Stephane Nicoll
31f9a965f0 Merge branch '2.1.x' into 2.2.x
Closes gh-21351
2020-05-07 14:12:53 +02:00
Stephane Nicoll
1a4f6df0a3 Upgrade to Spring Ldap 2.3.3.RELEASE
Closes gh-21342
2020-05-07 14:11:24 +02:00
Madhura Bhave
5583f64b1f Add tests to verify Jetty's thread pool defaults match server defaults
Closes gh-21213
2020-05-06 16:35:00 -07:00
Madhura Bhave
f29bce657e Harmonize default for server.tomcat.use-relative-redirects
Prior to this commit, the property was a Boolean with a null default.
If it was explicitly set by the user, a context customizer would use
that value to set it on the context. However, if it was not set, the default
wouldn't be tomcat's default but `false` because it was explicitly set to
`false` in `TomcatServletWebServerFactory`. This commit defaults the property
itself to `false` so that the default is more obvious to the user.

Fixes gh-20796
2020-05-06 15:54:27 -07:00
Brian Clozel
a63ab468a3 Upgrade to RSocket 1.0.0-RC7
This commit upgrades to RSocket 1.0.0-RC7.
This new RC brings API changes we have to adapt to. As of this commit,
we're introducing a new `RSocketServerCustomizer` which replaces the now
deprecated `ServerRSocketFactoryProcessor`.

Closes gh-21046
2020-04-28 11:09:37 +02:00
Stephane Nicoll
8ac3ab5551 Add missing metadata for removed configuration keys
Closes gh-20846
2020-04-23 14:39:10 +02:00
Stephane Nicoll
311952730e Merge branch '2.1.x' into 2.2.x
Closes gh-21097
2020-04-23 14:07:31 +02:00
Stephane Nicoll
291165f060 Order additional metadata according to lexicographic order
Closes gh-21095
2020-04-23 13:58:49 +02:00
Phillip Webb
102729b5e1 Merge branch '2.1.x' into 2.2.x
Closes gh-21082
2020-04-22 11:58:39 -07:00
Phillip Webb
b3d33754a5 Remove outdated FIXMEs from tests
Closes gh-19782
2020-04-22 11:55:35 -07:00
Phillip Webb
7d0b14fe1c Merge branch '2.1.x' into 2.2.x
Closes gh-21070
2020-04-21 11:43:09 -07:00
Phillip Webb
6011470ba6 Auto-configure cors on WelcomePageHandlerMapping
Update `WebMvcAutoConfiguration` to automatically apply cors
configuration to the `WelcomePageHandlerMapping`.

Fixes gh-21048
2020-04-21 11:40:26 -07:00
Andy Wilkinson
439d9beecb Test that gridFsDatabase is honored by auto-configured GridFsTemplate
Closes gh-21039
2020-04-20 17:09:37 +01:00
Stephane Nicoll
90c0378a7d Apply configuration properties deprecation consistently
This commit makes sure that both the getter and the setter of a
deprecated configuration properties is flagged with `@Deprecated`.

Closes gh-20812
2020-04-19 16:35:16 +02:00
Phillip Webb
1a8aa72afd Merge branch '2.1.x' into 2.2.x
Closes gh-21003
2020-04-17 15:19:45 -07:00
Phillip Webb
822d9f6a31 Allow empty URIs to create embedded datasource
Refine `DataSourceAutoConfiguration` conditions so that an empty
`spring.datasource.url` property can be used to enable the embedded
source.

Fixed gh-20996
2020-04-17 15:07:50 -07:00