|
|
|
|
@ -27,6 +27,7 @@ import org.junit.jupiter.api.extension.ExtendWith;
@@ -27,6 +27,7 @@ import org.junit.jupiter.api.extension.ExtendWith;
|
|
|
|
|
import org.thymeleaf.TemplateEngine; |
|
|
|
|
import org.thymeleaf.context.Context; |
|
|
|
|
import org.thymeleaf.context.IContext; |
|
|
|
|
import org.thymeleaf.extras.springsecurity5.dialect.SpringSecurityDialect; |
|
|
|
|
import org.thymeleaf.extras.springsecurity5.util.SpringSecurityContextUtils; |
|
|
|
|
import org.thymeleaf.spring5.ISpringWebFluxTemplateEngine; |
|
|
|
|
import org.thymeleaf.spring5.SpringWebFluxTemplateEngine; |
|
|
|
|
@ -36,6 +37,7 @@ import org.thymeleaf.spring5.view.reactive.ThymeleafReactiveViewResolver;
@@ -36,6 +37,7 @@ import org.thymeleaf.spring5.view.reactive.ThymeleafReactiveViewResolver;
|
|
|
|
|
import org.thymeleaf.templateresolver.ITemplateResolver; |
|
|
|
|
|
|
|
|
|
import org.springframework.boot.autoconfigure.AutoConfigurations; |
|
|
|
|
import org.springframework.boot.test.context.FilteredClassLoader; |
|
|
|
|
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; |
|
|
|
|
import org.springframework.boot.test.system.CapturedOutput; |
|
|
|
|
import org.springframework.boot.test.system.OutputCaptureExtension; |
|
|
|
|
@ -216,6 +218,12 @@ class ThymeleafReactiveAutoConfigurationTests {
@@ -216,6 +218,12 @@ class ThymeleafReactiveAutoConfigurationTests {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
void securityDialectAutoConfigurationBacksOffWithoutSpringSecurity() { |
|
|
|
|
this.contextRunner.withClassLoader(new FilteredClassLoader("org.springframework.security")) |
|
|
|
|
.run((context) -> assertThat(context).doesNotHaveBean(SpringSecurityDialect.class)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
void renderTemplate() { |
|
|
|
|
this.contextRunner.run((context) -> { |
|
|
|
|
|