Merge pull request #16478 from dreis2211

* pr/16478:
  Fix Thymeleaf deprecations
pull/16480/head
Stephane Nicoll 6 years ago
commit 424d98ce3e

@ -21,7 +21,7 @@ import java.util.Collections;
import java.util.Locale; import java.util.Locale;
import nz.net.ultraq.thymeleaf.LayoutDialect; 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.Rule;
import org.junit.Test; import org.junit.Test;
import org.thymeleaf.TemplateEngine; import org.thymeleaf.TemplateEngine;
@ -262,7 +262,7 @@ public class ThymeleafReactiveAutoConfigurationTests {
this.contextRunner.withUserConfiguration(LayoutDialectConfiguration.class) this.contextRunner.withUserConfiguration(LayoutDialectConfiguration.class)
.run((context) -> assertThat(ReflectionTestUtils.getField( .run((context) -> assertThat(ReflectionTestUtils.getField(
context.getBean(LayoutDialect.class), "sortingStrategy")) context.getBean(LayoutDialect.class), "sortingStrategy"))
.isInstanceOf(GroupingStrategy.class)); .isInstanceOf(GroupingRespectLayoutTitleStrategy.class));
} }
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@ -270,7 +270,7 @@ public class ThymeleafReactiveAutoConfigurationTests {
@Bean @Bean
public LayoutDialect layoutDialect() { 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 javax.servlet.DispatcherType;
import nz.net.ultraq.thymeleaf.LayoutDialect; 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.Rule;
import org.junit.Test; import org.junit.Test;
import org.thymeleaf.TemplateEngine; import org.thymeleaf.TemplateEngine;
@ -349,7 +349,7 @@ public class ThymeleafServletAutoConfigurationTests {
this.contextRunner.withUserConfiguration(LayoutDialectConfiguration.class) this.contextRunner.withUserConfiguration(LayoutDialectConfiguration.class)
.run((context) -> assertThat(ReflectionTestUtils.getField( .run((context) -> assertThat(ReflectionTestUtils.getField(
context.getBean(LayoutDialect.class), "sortingStrategy")) context.getBean(LayoutDialect.class), "sortingStrategy"))
.isInstanceOf(GroupingStrategy.class)); .isInstanceOf(GroupingRespectLayoutTitleStrategy.class));
} }
@Test @Test
@ -369,7 +369,7 @@ public class ThymeleafServletAutoConfigurationTests {
@Bean @Bean
public LayoutDialect layoutDialect() { public LayoutDialect layoutDialect() {
return new LayoutDialect(new GroupingStrategy()); return new LayoutDialect(new GroupingRespectLayoutTitleStrategy());
} }
} }

Loading…
Cancel
Save