mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge pull request #16478 from dreis2211
* pr/16478: Fix Thymeleaf deprecations
This commit is contained in:
commit
424d98ce3e
@ -21,7 +21,7 @@ import java.util.Collections;
|
||||
import java.util.Locale;
|
||||
|
||||
import nz.net.ultraq.thymeleaf.LayoutDialect;
|
||||
import nz.net.ultraq.thymeleaf.decorators.strategies.GroupingStrategy;
|
||||
import nz.net.ultraq.thymeleaf.decorators.strategies.GroupingRespectLayoutTitleStrategy;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.thymeleaf.TemplateEngine;
|
||||
@ -262,7 +262,7 @@ public class ThymeleafReactiveAutoConfigurationTests {
|
||||
this.contextRunner.withUserConfiguration(LayoutDialectConfiguration.class)
|
||||
.run((context) -> assertThat(ReflectionTestUtils.getField(
|
||||
context.getBean(LayoutDialect.class), "sortingStrategy"))
|
||||
.isInstanceOf(GroupingStrategy.class));
|
||||
.isInstanceOf(GroupingRespectLayoutTitleStrategy.class));
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ -270,7 +270,7 @@ public class ThymeleafReactiveAutoConfigurationTests {
|
||||
|
||||
@Bean
|
||||
public LayoutDialect layoutDialect() {
|
||||
return new LayoutDialect(new GroupingStrategy());
|
||||
return new LayoutDialect(new GroupingRespectLayoutTitleStrategy());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ import java.util.Map;
|
||||
import javax.servlet.DispatcherType;
|
||||
|
||||
import nz.net.ultraq.thymeleaf.LayoutDialect;
|
||||
import nz.net.ultraq.thymeleaf.decorators.strategies.GroupingStrategy;
|
||||
import nz.net.ultraq.thymeleaf.decorators.strategies.GroupingRespectLayoutTitleStrategy;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.thymeleaf.TemplateEngine;
|
||||
@ -349,7 +349,7 @@ public class ThymeleafServletAutoConfigurationTests {
|
||||
this.contextRunner.withUserConfiguration(LayoutDialectConfiguration.class)
|
||||
.run((context) -> assertThat(ReflectionTestUtils.getField(
|
||||
context.getBean(LayoutDialect.class), "sortingStrategy"))
|
||||
.isInstanceOf(GroupingStrategy.class));
|
||||
.isInstanceOf(GroupingRespectLayoutTitleStrategy.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -369,7 +369,7 @@ public class ThymeleafServletAutoConfigurationTests {
|
||||
|
||||
@Bean
|
||||
public LayoutDialect layoutDialect() {
|
||||
return new LayoutDialect(new GroupingStrategy());
|
||||
return new LayoutDialect(new GroupingRespectLayoutTitleStrategy());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user