mirror of https://github.com/elunez/eladmin
2.3 优化
parent
474e5688d9
commit
5fde06bb55
|
@ -6,6 +6,7 @@ import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
|||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
/**
|
||||
* WebMvcConfigurer
|
||||
|
|
|
@ -88,7 +88,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
|||
HandlerMethod handlerMethod = infoEntry.getValue();
|
||||
AnonymousAccess anonymousAccess = handlerMethod.getMethodAnnotation(AnonymousAccess.class);
|
||||
PreAuthorize preAuthorize = handlerMethod.getMethodAnnotation(PreAuthorize.class);
|
||||
if (null != preAuthorize && preAuthorize.value().contains("anonymous")) {
|
||||
if (null != preAuthorize && preAuthorize.value().toLowerCase().contains("anonymous")) {
|
||||
anonymousUrls.addAll(infoEntry.getKey().getPatternsCondition().getPatterns());
|
||||
} else if (null != anonymousAccess && null == preAuthorize) {
|
||||
anonymousUrls.addAll(infoEntry.getKey().getPatternsCondition().getPatterns());
|
||||
|
|
Loading…
Reference in New Issue