3765 Commits

Author SHA1 Message Date
Moritz Halbritter
b986a9b12e Add Flyway native-image support
The ResourceProviderCustomizer, which is used by FlywayAutoConfiguration
gets replaced with NativeImageResourceProviderCustomizer when running
in AOT mode. The NativeImageResourceProvider does the heavy lifting when
running in a native image: it uses PathMatchingResourcePatternResolver
to find the migration files.

Closes gh-31999
2022-10-18 12:07:04 +02:00
Bertolt Meier
647a2905c8 Add checkstyle rule for List.of() / Set.of() / Map.of()
This commits adds a checkstyle rule to not use List.of(), Set.of()
and Map.of(), preferring Collections.emptyList(), emptySet(), and
emptyMap() respectively.

It replaces usages of these methods across the codebase.

See gh-32655
2022-10-12 18:15:48 +01:00
Andy Wilkinson
3ab4606584 Make runScripts method of DB initializer more extensible
Closes gh-29137
2022-10-12 11:52:38 +01:00
Brian Clozel
d870474fcd Remove spring.webflux.multipart.streaming property
As of spring-projects/spring-framework#29293, the streaming mode on the
`DefaultPartHttpMessageReader` is deprecated as hard limitations have
been found with the design and won't be fixed. Instead, developers
should use the `PartEvent` API and the `PartEventHttpMessageReader`
(which is configured by default with the codecs).

This commit removes the `spring.webflux.multipart.streaming` property
and applies all `spring.webflux.multipart.*` properties that are
applicable to `PartEventHttpMessageReader`.

Closes gh-32658
2022-10-10 14:59:34 +02:00
Madhura Bhave
263433cd81 Populate base for embedded LDAPContextSource
Fixes gh-23030
2022-10-07 13:20:45 -07:00
Andy Wilkinson
3eb3d79104 Log condition evaluation report during AOT processing
Closes gh-32109
2022-10-07 18:08:18 +01:00
Andy Wilkinson
8e35f2ae92 Separate report logging from context initialization and events
See gh-32109
2022-10-07 18:08:18 +01:00
Brian Clozel
23a9818e0d Auto-configure ProblemDetails support
This commit auto-configures ProblemDetails support for both Spring MVC
and Spring WebFlux, contributing a `@ControllerAdvice` annotated
`ResponseEntityExceptionHandler` bean if the
`spring.mvc.problemdetails.enabled` or
`spring.webflux.problemdetails.enabled` properties are set to `true`.

Closes gh-32634
2022-10-07 17:23:12 +02:00
Vedran Pavic
e0a7bd8143 Fix deprecation warnings in Spring Session auto-configuration
This commit updates Spring Session auto-configuration to avoid usage of
deprecated methods, and moves to newly introduced Duration based
defaultMaxInactiveInterval setters across all session repository
implementations.

Additionally, this fixes several tests that are broken due to session
repository implementations now using Duration type for their
defaultMaxInactiveInterval fields.

See gh-32633
2022-10-07 15:38:46 +01:00
Brian Clozel
da7128ce7e Upgrade to Thymeleaf 3.1.0-M3
See gh-32628
2022-10-07 11:42:01 +02:00
Brian Clozel
0f3b94592b Temporarily suppress warnings on R2DBC deprecation
See gh-32601
See spring-projects/spring-data-relational#1350
2022-10-07 11:41:16 +02:00
Andy Wilkinson
7e47d3bbd6 Polish "Rework Spring Session auto-configuration to use customizers"
See gh-32554
2022-10-06 20:59:59 +01:00
Vedran Pavic
ad8753923a Rework Spring Session auto-configuration to use customizers
This commit reworks Spring Session auto-configuration to avoid
extending Spring Session's configuration classes. Instead, those
configuration classes are now imported and customizations are
applied using dedicated (Reactive)SessionRepositoryCustomizer beans.

See gh-32554
2022-10-06 20:59:13 +01:00
Brian Clozel
c8c73b195d Switch to Spring Batch 5.0.0-SNAPSHOT
See gh-32618
2022-10-06 16:11:26 +02:00
Stephane Nicoll
4ffc421b3c Adapt to Spring Framework API change 2022-10-06 09:58:05 +02:00
Stephane Nicoll
e94a1f7988 Replace outcome of JsonMixins scanning in AOT optimized contexts
This commit adds an AOT contribution that replaces the scanning of
@JsonMixin by a mapping in generated code. This makes sure that such
components are found in a native image.

Closes gh-32567
2022-10-05 15:55:33 +02:00
Andy Wilkinson
5199ffe6a9 Allow auto-configured Rabbit Stream Environment to be customized
Closes gh-32580
2022-10-05 11:56:32 +01:00
Andy Wilkinson
0ae7e935c3 Allow user to replace auto-configured Data JDBC beans
Closes gh-32571
2022-10-04 18:07:56 +01:00
Andy Wilkinson
e6568596b9 Make max header size config consistent across web servers
Closes gh-29382
2022-10-04 15:16:54 +01:00
Andy Wilkinson
4f86f685c5 Reinstate support for Infinispan
Closes gh-32556
2022-10-04 11:32:56 +01:00
Phillip Webb
e0b67889a8 Use Stream.toList instead of Stream.collect when possible
Update code to make use of `Stream.toList()` whenever possible.

Closes gh-28177
2022-10-04 00:29:22 -07:00
Andy Wilkinson
803d353d49 Fix formatting of R2dbcDataAutoConfiguration
See c2b8d3d.
2022-10-03 14:29:46 +01:00
Stephane Nicoll
c2b8d3de21 Declare beans that can be instantiated at build-time static
This commit updates the bean factory methods for beans that can be
instantiated at build-time to be static. Doing so makes sure that
the enclosing configuration class does not have to be resolved in
order to create the instance.

Closes gh-32570
2022-10-03 14:36:04 +02:00
Andy Wilkinson
51df7813a5 Remove code deprecated in 2.x and add since and forRemoval attributes
Closes gh-32548
Closes gh-32549
2022-09-30 14:39:05 +01:00
Andy Wilkinson
0bfa9cd704 Upgrade to Logback 1.4 and SLF4J 2.0
Closes gh-12649
2022-09-28 21:14:08 +01:00
Andy Wilkinson
7d583939ff Auto-configure stream template and env irrespective of listener type
Closes gh-32477
2022-09-23 17:28:17 +01:00
Vedran Pavic
230f2cda84 Migrate to AuthorizationFilter in Spring Security auto-config
This commit updates Servlet based Spring Security auto-configuration
to use AuthorizationFilter, which is intended to supersede
FilterSecurityInterceptor.

See gh-31255
2022-09-22 13:53:54 +01:00
Scott Frederick
08022ba86e Remove support for locating imports using spring.factories
With this commit, loading `@AutoConfiguration`,
`@ImportAutoConfiguration`, and `@ManagementContextConfiguration`
classes is supported with `.imports` files only. Support for loading
these classes with `spring.factories` is removed.

Closes gh-29699
2022-09-21 17:34:51 -05:00
Scott Frederick
f9c341c75a Revert "Generate the AutoConfiguration.imports file from annotations"
This reverts commit da4de7d67d442771704fba268f33fbc90aaaf1aa.
2022-09-21 14:50:15 -05:00
Andy Wilkinson
2977373505 Polish "Add property to configure Spring Session Redis repository type"
See gh-32205
2022-09-21 17:16:29 +01:00
Vedran Pavic
3093380e35 Add property to configure Spring Session Redis repository type
With Spring Session moving to RedisSessionRepository as the preferred
session repository, Spring Boot auto-configuration should make it
possible to easily switch back to the previous default
(RedisIndexedSessionRepository).

This commit introduces spring.session.redis.repository configuration
property that allows selecting the desired Redis-backed session
repository implementation.

See gh-32205
2022-09-21 17:13:58 +01:00
Andy Wilkinson
64f4da80cb Align with breaking changes in latest Batch snapshots
Batch is now auto-configured to use the context's
PlatformTransactionManager and DataSource or `@BatchDataSource`.
When this does not meet the user's needs, they can use
`@EnableBatchProcessing` or sub-class `DefaultBatchConfiguration` to
take complete control with the auto-configuration backing off.

Closes gh-32330
2022-09-20 15:42:52 +01:00
dreis2211
bac7d62476 Fix Spring Batch deprecations
See gh-32419
2022-09-19 14:31:54 +02:00
Andy Wilkinson
2b3ef96156 Merge branch '2.7.x'
Closes gh-32407
2022-09-16 17:03:34 +01:00
Andy Wilkinson
a800f7d77c Merge branch '2.6.x' into 2.7.x
Closes gh-32406
2022-09-16 17:03:13 +01:00
Andy Wilkinson
61e11cd361 Ensure that TCCL is clean when DataSource is accessed
Previously, when using Tomcat, its web app class loader was the thread
context class loader when H2ConsoleAutoConfiguration triggered
initialization of Hikari's pool. This was the case because it's done
in the bean method of a ServletRegistrationBean. Such Servlet-related
beans are intentionally created with Tomcat's web app classloader as
the TCCL. This arrangement results in the pool's threads using
Tomcat's web app class loader as their TCCL which is not desirable.
One consequence of this was that Tomcat could log a warning at
shutdown about the thread being left running when it will, in fact,
be stopped as part of the context being closed.

This commit updates H2ConsoleAutoConfiguration to set the TCCL to its
own ClassLoader while the DataSource information is being logged.

Closes gh-32382
2022-09-16 16:24:57 +01:00
Phillip Webb
db89ee6904 Deprecate spring.mvc.ignore-default-model-on-redirect property
Closes gh-32381
2022-09-14 13:49:03 -07:00
Stephane Nicoll
bcb5f048d2 Upgrade to Liquibase 4.16.0
Closes gh-32354
2022-09-14 15:56:59 +02:00
Andy Wilkinson
6d2a1d3f3b Adapt to breaking changes in Batch's transaction management
See gh-32237
2022-09-14 10:15:30 +01:00
Stephane Nicoll
d4a88041dc Upgrade to R2DBC Bom Borca-SR2
Closes gh-32328
2022-09-14 11:01:19 +02:00
Andy Wilkinson
c6990a34f9 Merge branch '2.7.x' 2022-09-14 09:20:37 +01:00
Andy Wilkinson
a533f4fa32 Polish 2022-09-14 09:20:13 +01:00
Andy Wilkinson
4e8e5f623b Adapt to recent deprecations in Spring Batch
See gh-32237
2022-09-13 17:44:50 +01:00
Phillip Webb
aa62e3d1bd Fix deprecation issues in WebMvcAutoConfigurationTests 2022-09-09 12:52:27 -07:00
Phillip Webb
fc279b7083 Deprecate ThemeResolver auto-configuration
Update `WebMvcAutoConfiguration` to deprecate the `ThemeResolver` bean
to align with recent Spring Framework changes.
2022-09-09 12:45:24 -07:00
Andy Wilkinson
aafceb3868 Merge branch '2.7.x'
Closes gh-32285
2022-09-09 16:47:06 +01:00
Andy Wilkinson
f17df7bf30 Merge branch '2.6.x' into 2.7.x
Closes gh-32284
2022-09-09 16:46:43 +01:00
Andy Wilkinson
23c2f73b3f Update tests to allow them to run on Java 19
Closes gh-32280
2022-09-09 16:46:14 +01:00
Phillip Webb
46be4a3f30 Merge branch '2.7.x' 2022-09-08 19:38:18 -07:00
Phillip Webb
e88a682220 Merge branch '2.6.x' into 2.7.x 2022-09-08 19:37:52 -07:00