5139 Commits

Author SHA1 Message Date
Phillip Webb
916efb632c Merge branch '3.3.x' 2024-12-04 15:04:22 -08:00
Phillip Webb
9e7972a9b4 Polish code with code cleanup rules 2024-12-04 15:03:40 -08:00
Phillip Webb
3ddfd62f16 Prefer file resolution when loading SSL content
Update `SslAutoConfiguration` so that the used resource loader prefers
file based resolution when paths are specified without a prefix. This
restores the behavior found in Spring Boot 3.3.

The `ApplicationResourceLoader` has been updated with a new `get` method
that accepts a `preferFileResolution` parameter. Unfortunately, we can't
directly influence the resource returned by the delegate
`ResourceLoader` since we can't override `getResourceByPath(...)`.
Instead we check if the returned type was likely to have been created
by a call to that method. If so, we change it to a `FileSystemResource`.

This approach should hopefully work with `DefaultResourceLoader` and
subclasses.

Fixes gh-43274
2024-12-03 15:00:15 -08:00
Phillip Webb
7a4e071709 Polish 2024-12-03 14:45:25 -08:00
Phillip Webb
91778e9f96 Merge branch '3.3.x'
Closes gh-43359
2024-12-02 19:05:21 -08:00
Phillip Webb
b340c855c0 Prevent H2 console from causing early DataSource initialization
Update `H2ConsoleAutoConfiguration` so that DataSource connection
logging occurs outside of the `ServletRegistrationBean`.

Fixes gh-43337
2024-12-02 19:05:16 -08:00
Moritz Halbritter
ff9fde0ef4 Polish "Make UserDetailsServiceAutoConfiguration conditional on servlet app"
See gh-43334
2024-12-02 13:40:51 +01:00
BenchmarkingBuffalo
c5d41f1469 Make UserDetailsServiceAutoConfiguration conditional on servlet app
See gh-43334
2024-12-02 13:22:07 +01:00
Johnny Lim
859c235a95 Polish
See gh-43316
2024-11-29 10:35:11 +01:00
Andy Wilkinson
512584d990 Merge branch '3.3.x'
Closes gh-43325
2024-11-29 09:18:28 +00:00
Stefano Cordio
26b1d74470 Fix link to proxyBeanMethods in @AutoConfiguration javadoc
See gh-43323
2024-11-29 09:17:27 +00:00
Stéphane Nicoll
d8c41c2583 Defensively unwrap CacheConnectionFactory
This commit refines the optimization introduced in gh-39816 to only
unwrap our own caching connection factory. The more advanced unwrap
algorithm is still available, but opt-in only.

Unwrapping more aggressively may break use cases where the wrapped
ConnectionFactory is required, i.e. for transactional purposes.

Closes gh-43277
2024-11-26 19:56:32 +01:00
Andy Wilkinson
32433e84f3 Merge branch '3.3.x'
Closes gh-43270
2024-11-22 15:46:38 +00:00
Andy Wilkinson
109e731c83 Revert "Add @ConditionalOnMissingBean for JobRepository"
This reverts commit 73fc351d71cc9120c794bf6206b389a4dbb4ba4c.

See gh-43236
2024-11-21 13:31:20 +00:00
Phillip Webb
73fc351d71 Add @ConditionalOnMissingBean for JobRepository
Update `BatchAutoConfiguration` so that the `JobRepository` is not
defined when the user provides an appropriate bean.

Fixes gh-43236
2024-11-20 21:57:52 -08:00
Phillip Webb
3cae5c27d1 Merge branch '3.3.x' 2024-11-20 20:58:02 -08:00
Yanming Zhou
7fdc9742af Prohibit unnecessary value on @EnumSource
See gh-43214
2024-11-18 21:50:35 -08:00
Phillip Webb
26c775eff8 Register AutoConfigurations using fully qualified class name
Update `AbstractApplicationContextRunner` and `Configurations` to
allow registration of beans with a specific generated bean name. By
default, no name is generated, however, `AutoConfigurations` has been
updated to use bean names using the fully qualified class name.

The update brings `ApplicationContextRunners` closer the behavior of
a standard Spring Boot application where user `@Configuration` classes
are usually registered with a simple name and auto-configurations are
imported (via an `ImportSelector`) using a fully qualified name.

Fixes gh-17963

Co-authored-by: Stéphane Nicoll <stephane.nicoll@broadcom.com>
Co-authored-by: Andy Wilkinson <andy.wilkinson@broadcom.com>
Co-authored-by: Dmytro Nosan <dimanosan@gmail.com>
2024-11-18 21:37:42 -08:00
Phillip Webb
a705402e75 Polish
Co-authored-by: Stéphane Nicoll <stephane.nicoll@broadcom.com>
2024-11-18 21:36:56 -08:00
Phillip Webb
76226f99d8 Merge branch '3.3.x'
Closes gh-43199
2024-11-15 13:27:24 -08:00
Phillip Webb
dba395dc0c Merge branch '3.2.x' into 3.3.x
Closes gh-43198
2024-11-15 13:27:17 -08:00
Phillip Webb
a20cc3d4e6 Clarify documentation for 'spring.datasource.type'
Closes gh-43193
2024-11-15 13:26:45 -08:00
Moritz Halbritter
70d5756ce5 Polish "Add logger warning if Hikari datasource doesn't have pool suspension configured"
See gh-42937
2024-11-14 11:03:53 +01:00
Stéphane Nicoll
9fb7077402 Upgrade to Neo4j Java Driver 5.26.2
Closes gh-43132
2024-11-13 09:30:35 +09:00
Andy Wilkinson
1e8b23e300 Merge branch '3.3.x'
Closes gh-43072
2024-11-08 11:04:29 +00:00
Andy Wilkinson
1ae9b8ea1b Merge branch '3.2.x' into 3.3.x
Closes gh-43071
2024-11-08 10:55:52 +00:00
Andy Wilkinson
5d63335a5c Polish "Use constants for well-known scope names"
See gh-43065
2024-11-08 10:53:11 +00:00
Yanming Zhou
03841b1229 Use constants for well-known scope names
See gh-43065
2024-11-08 10:01:19 +00:00
Stéphane Nicoll
fdf24c6caa Merge branch '3.3.x'
Closes gh-42976
2024-11-02 20:25:35 +09:00
Stéphane Nicoll
a224c8188c Fix copyright year of updated file
See gh-42974
2024-11-02 20:21:19 +09:00
Tran Ngoc Nhan
9e92bfe906 Polish
See gh-42974
2024-11-02 20:20:06 +09:00
Phillip Webb
06f0b91429 Add @Order to WebSocketMessageConverterConfiguration
Add `@Order` to `WebSocketMessageConverterConfiguration` so that custom
`WebSocketMessageBrokerConfigurer` implementations can be added before
or after ours.

Fixes gh-42924
2024-11-01 17:49:38 -07:00
Dmytro Nosan
85b1c567f1 Support timeout property for GraphQL over SSE
See gh-42966
2024-11-01 14:13:32 -07:00
Andy Wilkinson
2b3c93ffda Consider factory beans when finding candidates
Previously, if a bean name was a factory dereference its definition
would not be found. When the definition wasn't found it was assumed
that the bean was an autowire candidate and a default candidate.
If this, in fact, was not the case, @ConditionalOnMissingBean would
not match when it should have done and @ConditionalOnBean would
match when it should not had done.

This commit updates the bean-based conditions to correctly consider
factory beans so that whether or not they are a candidate can be
evaluated correctly.

Fixes gh-42970
2024-11-01 15:19:49 +00:00
Andy Wilkinson
f4c6aab02b Merge branch '3.3.x'
Closes gh-42945
2024-10-30 10:44:27 +00:00
Andy Wilkinson
53186655f9 Merge branch '3.2.x' into 3.3.x
Closes gh-42944
2024-10-30 10:44:04 +00:00
Andy Wilkinson
e8b8584175 Merge branch '3.3.x'
Closes gh-42943
2024-10-30 10:26:19 +00:00
Andy Wilkinson
1ad5fb8638 Merge branch '3.2.x' into 3.3.x
Closes gh-42942
2024-10-30 10:26:04 +00:00
Andy Wilkinson
1c61e59099 Prohibit unnecessary values on @ConditionalOnMissingBean
Closes gh-42941
2024-10-30 10:24:00 +00:00
Andy Wilkinson
00ceb378c4 Polish "Remove unnecessary values from @ConditionalOnMissingBean"
See gh-42933
2024-10-30 10:02:27 +00:00
Yanming Zhou
88d7a1e74a Remove unnecessary values from @ConditionalOnMissingBean
See gh-42933
2024-10-30 10:00:11 +00:00
Andy Wilkinson
fbb09cd09c Merge branch '3.3.x'
Closes gh-42926
2024-10-29 14:58:23 +00:00
Andy Wilkinson
87f29f63aa Merge branch '3.2.x' into 3.3.x
Closes gh-42925
2024-10-29 14:57:43 +00:00
Andy Wilkinson
b1653708e4 Improve thread-safety of OnClassCondition
Closes gh-41709
2024-10-29 13:26:16 +00:00
Yanming Zhou
46c40b4ddc Polish
See gh-42912
2024-10-29 13:45:40 +09:00
Phillip Webb
24202a0a78 Update copyright year of changed files 2024-10-25 18:21:53 -07:00
Moritz Halbritter
85b1c55bb8 Polish 2024-10-25 13:40:21 +02:00
Phillip Webb
36a22fcd59 Unify HTTP client redirect behavior and provide configuration option
Update `ClientHttpRequestFactoryBuilder` implementations to ensure
that all libraries have consistent redirect follow behavior. Following
of redirects is enabled by default.

The `ClientHttpRequestFactorySettings` may be used to change if
redirects should be followed. The `spring.http.client.redirects`
property may also be used to update the default behavior.

Closes gh-42879
2024-10-25 02:45:36 -07:00
Phillip Webb
3a8b2e4bc8 Add HttpClientAutoConfiguration and use it wherever possible
Add a new `HttpClientAutoConfiguration` class that provides
`ClientHttpRequestFactoryBuilder` and `ClientHttpRequestFactorySettings`
beans and new configuration properties.

The existing `RestTemplate`, `RestClient` and `WebServiceTemplate`
auto-configurations have been updated to make use of the new
HTTP client support.

Users may now set `spring.http.client` property to globally change
the `ClientHttpRequestFactory` used in their application.

Closes gh-36266
2024-10-25 02:45:35 -07:00
Phillip Webb
e6b840004d Support ResourceLoader delegation from ApplicationResourceLoader
Update `ApplicationResourceLoader` to support delegation to another
`ResourceLoader`. The update allows customer resource loaders to be
used when loading SSL resources.

Closes gh-42835
2024-10-22 22:07:42 -07:00