一、springsecurity自定义过滤url配置
package com.school.information.config;import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;import java.util.List;/*** 需要放行的请求*/
@Data
@Component
@ConfigurationProperties(prefix = "ignore")
public class IgnoreRequestConfig {private List<String> url;
}
package com.school.information.config;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
import org.springframework.security.web.util.matcher.RequestMatcher;import java.util.ArrayList;
import java.util.List;@Configuration
public class CustomRequestMatcherConfig {@Autowired