package com.jiayue.ipp.common.security.authorize;

import org.springframework.core.annotation.Order;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer;
import org.springframework.stereotype.Component;

/**
 * Security身份认证相关的授权配置
 *
 */
@Component
@Order(Integer.MAX_VALUE) // 值越小加载越优先，值越大加载越靠后
public class SecurityAuthorizeConfigurerProvider implements AuthorizeConfigurerProvider {




    @Override
    public void confiure(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry config) {
       /* config.antMatchers(""
        ).permitAll(); // 放行登录页面访问*/

        // 其他请求都要通过身份认证
        config.anyRequest().authenticated();

    }
}
