Skip to content

Commit

Permalink
Merge pull request #28967 from terminux
Browse files Browse the repository at this point in the history
* pr/28967:
  Polish "Check for the presence of Spring Security"
  Check for the presence of Spring Security

Closes gh-28967
  • Loading branch information
snicoll committed Dec 10, 2021
2 parents f1f43e8 + f6f5aec commit 96baef4
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -58,6 +58,7 @@
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;
Expand Down Expand Up @@ -279,7 +280,7 @@ DataAttributeDialect dialect() {
}

@Configuration(proxyBeanMethods = false)
@ConditionalOnClass({ SpringSecurityDialect.class })
@ConditionalOnClass({ SpringSecurityDialect.class, CsrfToken.class })
static class ThymeleafSecurityDialectConfiguration {

@Bean
Expand Down

0 comments on commit 96baef4

Please sign in to comment.