Commit Graph

2251 Commits

Author SHA1 Message Date
Andy Wilkinson e83f3f40be Merge branch '2.2.x' into 2.3.x
Closes gh-24029
2020-11-04 16:47:23 +00:00
Andy Wilkinson a8b8f43180 Improve description of spring.datasource.initialization-mode
Closes gh-21121
2020-11-04 16:46:28 +00:00
Andy Wilkinson 28f7bc37a5 Merge branch '2.2.x' into 2.3.x
Closes gh-24025
2020-11-04 10:15:07 +00:00
Andy Wilkinson c289ba0c2c Recommend disabling context root redirects with proxied Tomcat
Closes gh-22908
2020-11-04 10:13:55 +00:00
Andy Wilkinson d1a9dba25d Polish "Avoid repeated calls of WebFlux and MVC registrations' getters"
See gh-23999
2020-11-03 17:23:16 +00:00
Michal Růžička 2aac5c0095 Avoid repeated calls of WebFlux and MVC registrations' getters
See gh-23999
2020-11-03 16:51:39 +00:00
Andy Wilkinson f9ff39a7a6 Merge branch '2.2.x' into 2.3.x
Closes gh-24014
2020-11-03 16:38:33 +00:00
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
2020-11-03 15:56:44 +00:00
Andy Wilkinson 2dce4aa42b Merge branch '2.2.x' into 2.3.x
Closes gh-24009
2020-11-03 14:04:08 +00:00
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
2020-11-03 13:59:38 +00:00
Stephane Nicoll 1e9c9b9d73 Add missing default values in configuration properties metadata
Closes gh-23991
2020-11-02 10:44:06 +01:00
Phillip Webb b0c2687aa9 Update copyright year of changed files 2020-10-29 09:07:42 -07:00
Andy Wilkinson 58aa34489f Wait for DataSource init before allowing context refresh to complete
Closes gh-22852
2020-10-28 16:01:14 +00:00
Stephane Nicoll d1e503602b Polish 2020-10-24 07:39:50 +02:00
Andy Wilkinson a754b791a2 Merge branch '2.2.x' into 2.3.x
Closes gh-23750
2020-10-19 14:32:23 +01:00
Andy Wilkinson 11bc62fb83 Stop using PostConstruct to default session timeout to ServerProperties'
Fixes gh-23716
2020-10-19 14:31:01 +01:00
Stephane Nicoll dd74810c80 Revert "Fix detection logic for embedded databases"
This reverts commit c4a5a34702.

See gh-23721
2020-10-19 12:25:00 +02:00
Asha Somayajula c4a5a34702 Fix detection logic for embedded databases
Closes gh-23721
2020-10-17 07:51:24 +02:00
Andy Wilkinson 0abe38d478 Merge branch '2.2.x' into 2.3.x
Closes gh-23676
2020-10-13 13:18:53 +01:00
Andy Wilkinson 7fc345f587 Apply server.undertow.eager-filter-init to factory
Fixes gh-23675
2020-10-13 13:02:36 +01:00
Madhura Bhave e2289e2f21 Merge branch '2.2.x' into 2.3.x
Closes gh-23569
2020-10-01 18:19:35 -07:00
Madhura Bhave c0f158dffd Polish "Do not fail if h2Console bean cannot connect to db"
See gh-23566
2020-10-01 18:16:11 -07:00
Shraddha Yeole 2d76de29ff Do not fail if h2Console bean cannot connect to db
See gh-23566
2020-10-01 18:10:48 -07:00
Madhura Bhave 9a6d52e30d Merge branch '2.2.x' into 2.3.x 2020-10-01 18:01:53 -07:00
Madhura Bhave 3118ca9313 Polish 2020-10-01 18:01:11 -07:00
Stephane Nicoll cd15cbdc79 Do not execute datasource initialization in a separate thread
This commit makes sure that `data.sql` is performed in the same thread
as the one initializing the JPA container.

Closes gh-22852
2020-09-30 10:10:16 +02:00
Stephane Nicoll 466c1012d6 Merge branch '2.2.x' into 2.3.x
Closes gh-23521
2020-09-29 10:44:30 +02:00
Stephane Nicoll fd3683646a Migrate SessionAutoConfigurationMongoTests to Testcontainers
Closes gh-23512
2020-09-29 10:34:59 +02:00
Andy Wilkinson 55bfef9901 Merge branch '2.2.x' into 2.3.x
Closes gh-23408
2020-09-18 13:32:46 +01:00
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 409743eddb Merge branch '2.2.x' into 2.3.x
Closes gh-23320
2020-09-15 16:32:43 +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 f5ae58e8e5 Fix deprecation warning
See gh-23256
2020-09-11 19:01:22 -07:00
Phillip Webb 507fae5141 Merge branch '2.2.x' into 2.3.x
Closes gh-23258
2020-09-11 18:45:05 -07: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 7c13c01cb6 Fix mapping of Cassandra's idle-timeout and heartbeat-interval
Previous to this commit the connection idle timeout and heartbeat
interval were mapped to seconds whereas Cassandra expects ms for all
duration types.

This commit fixes the mapping and removes the default duration unit
since it should be considered ms like every other duration properties.

Closes gh-23249
2020-09-11 08:59:34 +02:00
Stephane Nicoll d2eeb9524f Merge branch '2.2.x' into 2.3.x
See gh-23183
2020-09-07 09:17:51 +02: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
dreis2211 d8ba7dd4d0 Remove unused methods
See gh-23086
2020-08-26 09:57:49 +02:00
Andy Wilkinson 7a5392d6bd Polish 2020-08-25 09:45:40 +01:00
Stephane Nicoll 0374ed2a0c Merge branch '2.2.x' into 2.3.x
Closes gh-23063
2020-08-24 12:20:30 +02:00
Stephane Nicoll 5b0f22e8fe Fix unintended import on commons lang
Closes gh-23059
2020-08-24 12:12:33 +02:00
Phillip Webb 15a0cbc96b Update copyright year of changed files 2020-08-18 15:39:23 -07:00
Andy Wilkinson 8c4e6f766c Revert "Merge pull request #21060 from dsyer"
This reverts commit 6547ea56f9, reversing
changes made to e9e4a34e62.

Fixes gh-22039
2020-08-13 13:31:45 +01:00
Stephane Nicoll d0662e824a Fix default value of server.jetty.accesslog.format
Closes gh-22921
2020-08-13 09:43:37 +02:00
Andy Wilkinson abf6123bae Upgrade to Kafka 2.5.1
Closes gh-22868
2020-08-11 12:50:15 +01:00
Stephane Nicoll dc4de06b35 Restore customization of the Couchbase cache manager
With the upgrade to the new Couchbase SDK and the related changes in
Spring Data Couchbase, CacheManagerCustomizer can no longer be used to
customize the Couchbase cache manager as it is an immutable class.

This commit introduces a dedicated callback for the
CouchbaseCacheManagerBuilder that is used by the auto-configuration and
update the documentation to refer to it with a sample usage.

Closes gh-22573
2020-08-11 13:32:17 +02:00
Andy Wilkinson 1270af90c2 Only enable full path optimization when there's one DispatcherServlet
Previously, UrlPathHelper's full path optimization was enabled when
there was a dispatcher servlet mapped to /. The UrlPathHelper is used
across Spring MVC and if there are multiple dispatcher servlets they
all share the sample UrlPathHelper. This meant that any additional
dispatcher servlets mapping to locations other than / would not be able
to map requests correctly as the UrlPathHelper would use the full path,
ignoring the url mapping of the dispatcher servlet.

This commit updates the MVC auto-configuration so that use of the full
path is only enabled if there's a single dispatcher servlet
registration.

Fixes gh-22682
2020-08-11 09:59:06 +01:00