Merge branch '3.3.x' into 3.4.x
Closes gh-44416
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -77,7 +77,7 @@ class FreeMarkerServletWebConfiguration extends AbstractFreeMarkerConfiguration
|
||||
|
||||
@Bean
|
||||
@ConditionalOnEnabledResourceChain
|
||||
@ConditionalOnMissingFilterBean(ResourceUrlEncodingFilter.class)
|
||||
@ConditionalOnMissingFilterBean
|
||||
FilterRegistrationBean<ResourceUrlEncodingFilter> resourceUrlEncodingFilter() {
|
||||
FilterRegistrationBean<ResourceUrlEncodingFilter> registration = new FilterRegistrationBean<>(
|
||||
new ResourceUrlEncodingFilter());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -98,7 +98,7 @@ public class JerseyAutoConfiguration implements ServletContextAware {
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingFilterBean(RequestContextFilter.class)
|
||||
@ConditionalOnMissingFilterBean
|
||||
public FilterRegistrationBean<RequestContextFilter> requestContextFilter() {
|
||||
FilterRegistrationBean<RequestContextFilter> registration = new FilterRegistrationBean<>();
|
||||
registration.setFilter(new RequestContextFilter());
|
||||
|
||||
@@ -134,7 +134,7 @@ public class ThymeleafAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnEnabledResourceChain
|
||||
@ConditionalOnMissingFilterBean(ResourceUrlEncodingFilter.class)
|
||||
@ConditionalOnMissingFilterBean
|
||||
FilterRegistrationBean<ResourceUrlEncodingFilter> resourceUrlEncodingFilter() {
|
||||
FilterRegistrationBean<ResourceUrlEncodingFilter> registration = new FilterRegistrationBean<>(
|
||||
new ResourceUrlEncodingFilter());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -366,7 +366,7 @@ public class WebMvcAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean({ RequestContextListener.class, RequestContextFilter.class })
|
||||
@ConditionalOnMissingFilterBean(RequestContextFilter.class)
|
||||
@ConditionalOnMissingFilterBean
|
||||
public static RequestContextFilter requestContextFilter() {
|
||||
return new OrderedRequestContextFilter();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -46,7 +46,6 @@ class ConditionalOnMissingFilterBeanTests {
|
||||
|
||||
@Test
|
||||
void outcomeWhenValueIsOfMissingBeanReturnsMatch() {
|
||||
|
||||
this.contextRunner.withUserConfiguration(WithoutTestFilterConfig.class, OnMissingWithValueConfig.class)
|
||||
.run((context) -> assertThat(context).satisfies(filterBeanRequirement("myOtherFilter", "testFilter")));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user