Merge pull request #28967 from terminux
* pr/28967: Polish "Check for the presence of Spring Security" Check for the presence of Spring Security Closes gh-28967
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
* Copyright 2012-2021 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.
|
||||
@@ -58,6 +58,7 @@ 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.web.server.csrf.CsrfToken;
|
||||
import org.springframework.util.MimeType;
|
||||
import org.springframework.util.unit.DataSize;
|
||||
import org.springframework.web.servlet.resource.ResourceUrlEncodingFilter;
|
||||
@@ -279,7 +280,7 @@ public class ThymeleafAutoConfiguration {
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass({ SpringSecurityDialect.class })
|
||||
@ConditionalOnClass({ SpringSecurityDialect.class, CsrfToken.class })
|
||||
static class ThymeleafSecurityDialectConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
Reference in New Issue
Block a user