Commit Graph

1926 Commits (189463a23b449bebe2214c9b138e858e2f6470e5)

Author SHA1 Message Date
Phillip Webb f9e3e0d532 Register default resource path using a Resource
Update `WebMvcAutoConfiguration` so that the default "/" resource path
is registered directly as a `ServletContextResource`.

Closes gh-24745
4 years ago
Phillip Webb 286ef61071 Narrow auto-configure checkstyle suppressions
Closes gh-21015
4 years ago
Phillip Webb 837fc83527 Fix checkstyle header violations
See gh-24337
4 years ago
Andy Wilkinson a8b8f43180 Improve description of spring.datasource.initialization-mode
Closes gh-21121
4 years ago
Andy Wilkinson c289ba0c2c Recommend disabling context root redirects with proxied Tomcat
Closes gh-22908
4 years ago
Andy Wilkinson 35bff55097 Ensure that Quartz can be auto-configured with a Quartz-specific TM
Previously, Quartz could be configured with a specific DataSource
using `@QuartzDataSource` but it was not possible to configure a
Quartz-specific transaction manager. This could result in the
different DataSources being used by Quartz itself and Quart'z
DataSourceTransactionManager.

This commit introduces a new qualifier, `@QuartzTransactionManager`,
that can be used to avoid the above-described problem. Any
`@QuartzTransactionManager`-annotated bean will be used by the
Quartz auto-configure configuration instead of the application's main
`TransactionManager`. If no such qualified bean is present, the
application's main TransactionManager, if any, will be used as before.

Fixes gh-20184
4 years ago
Andy Wilkinson 30a0ccab02 Remove use of `@PostConstruct` from main code
When running on Java 11 (where `@PostConstruct` is no longer part of
the JRE) and without a dependency on jakarta-annotation-api,
`@PostContruct` annotions are silently dropped. This leads to obscure and
hard-to-track down changes in the behaviour of our auto-configuration
as the `@PostConstruct`-annotated methods are not invoked.

To allow users to run on Java 11 without having jakarta-annotation-api
on the classpath, this commit removes use of `@PostConstruct` from main
code. A Checkstyle rule has also been added to prevent its usage in
main code from being reintroduced.

Closes gh-23723
4 years ago
Andy Wilkinson 11bc62fb83 Stop using PostConstruct to default session timeout to ServerProperties'
Fixes gh-23716
4 years ago
Andy Wilkinson 7fc345f587 Apply server.undertow.eager-filter-init to factory
Fixes gh-23675
4 years ago
Madhura Bhave c0f158dffd Polish "Do not fail if h2Console bean cannot connect to db"
See gh-23566
4 years ago
Shraddha Yeole 2d76de29ff Do not fail if h2Console bean cannot connect to db
See gh-23566
4 years ago
Madhura Bhave 3118ca9313 Polish 4 years ago
Stephane Nicoll fd3683646a Migrate SessionAutoConfigurationMongoTests to Testcontainers
Closes gh-23512
4 years ago
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
4 years ago
Andy Wilkinson 5a266155b0 Disable proxyBeanMethods on Spring Session config sub-classes
Closes gh-23280
4 years ago
Phillip Webb d8232b3c21 Polish 'Allow other "timestamp" types in MVC error model'
See gh-23256
4 years ago
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
4 years ago
Stephane Nicoll 4b5a3f4ff9 Start building against Spring Framework 5.2.9 snapshots
See gh-23182
4 years ago
Andy Wilkinson 84a12c8436 Upgrade to Testcontainers 1.14.3
Closes gh-23122
4 years ago
Stephane Nicoll 5b0f22e8fe Fix unintended import on commons lang
Closes gh-23059
4 years ago
Andy Wilkinson 72551242fd Allow XADataSource auto-config with no spring.datasource properties
Fixes gh-20229
4 years ago
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
4 years ago
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
4 years ago
Phillip Webb b5e70157dc Update copyright year of changed files 4 years ago
Andy Wilkinson d9882f2c88 Clarify the effects of ordering auto-configuration classes
Closes gh-22337
4 years ago
Andy Wilkinson afa5b12bdb Make reactive Jetty auto-config back off without jetty-servlet
Fixes gh-22275
4 years ago
Andy Wilkinson 4e79bb1cff Disable bean method proxying in SpringBootJdbcConfiguration
Closes gh-22231
4 years ago
Andy Wilkinson a8d3f9af31 Polish "Rename NoneOfNestedConditions to NoneNestedConditions in example docs"
See gh-22207
4 years ago
Clayton Walker 7fee70a625 Rename NoneOfNestedConditions to NoneNestedConditions in example docs
See gh-22207
4 years ago
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
4 years ago
Andy Wilkinson 21453b5016 Ignore scoped targets when finding matching beans
Fixes gh-22038
4 years ago
Andy Wilkinson 81d6751ba7 Use ApplicationContextRunner in ConditionalOnSingleCandidateTests 4 years ago
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
4 years ago
Stephane Nicoll cc3575b3f4 Merge branch '2.1.x' into 2.2.x 5 years ago
Stephane Nicoll 9a457527fd Polish test 5 years ago
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
5 years ago
Andy Wilkinson 8da1e3addb Merge branch '2.1.x' into 2.2.x 5 years ago
Andy Wilkinson 6a9450ee8b Polish 5 years ago
Phillip Webb bfe1c281f0 Merge branch '2.1.x' into 2.2.x
Closes gh-21743
5 years ago
Phillip Webb 70e0a27949 Drop the use of the term "white list"
Closes gh-21737
5 years ago
Phillip Webb 0a05b4c9fd Update copyright year of changed files 5 years ago
dreis2211 9bb22ffb69 Remove usages of deprecated Connector.setAttribute()
See gh-21671
5 years ago
Stephane Nicoll 77981ac2ae Polish "Use the container IP address for tests using TestContainer"
See gh-21480
5 years ago
olivier lamy 0c2bf70bb8 Use the container IP address for tests using TestContainer
See gh-21480
5 years ago
Madhura Bhave 27ada029b5 Revert "Expose property to configure OAuth2 provider configurationMetadata"
This reverts commit 7b79029949.

See gh-21375
5 years ago
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
5 years ago
Madhura Bhave 7b79029949 Expose property to configure OAuth2 provider configurationMetadata
Closes gh-21375
5 years ago
Stephane Nicoll 31f9a965f0 Merge branch '2.1.x' into 2.2.x
Closes gh-21351
5 years ago
Stephane Nicoll 1a4f6df0a3 Upgrade to Spring Ldap 2.3.3.RELEASE
Closes gh-21342
5 years ago
Madhura Bhave 5583f64b1f Add tests to verify Jetty's thread pool defaults match server defaults
Closes gh-21213
5 years ago