Check for the presence of Spring Security

See gh-28967
pull/29015/head
Guirong Hu 3 years ago committed by Stephane Nicoll
parent f1f43e8577
commit 4462f9157e

@ -58,6 +58,9 @@ import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.security.core.context.ReactiveSecurityContextHolder;
import org.springframework.security.web.reactive.result.view.CsrfRequestDataValueProcessor;
import org.springframework.security.web.server.csrf.CsrfToken;
import org.springframework.util.MimeType;
import org.springframework.util.unit.DataSize;
import org.springframework.web.servlet.resource.ResourceUrlEncodingFilter;
@ -279,7 +282,8 @@ public class ThymeleafAutoConfiguration {
}
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass({ SpringSecurityDialect.class })
@ConditionalOnClass({ SpringSecurityDialect.class, ReactiveSecurityContextHolder.class,
CsrfRequestDataValueProcessor.class, CsrfToken.class })
static class ThymeleafSecurityDialectConfiguration {
@Bean

Loading…
Cancel
Save