package com.YuyeTech.TPlat.config;

import com.YuyeTech.TPlat.aspect.AuthorizeFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.DelegatingFilterProxy;

import javax.servlet.Filter;

/**
 * @author:slambb
 * @date:2019/12/27
 */
//@Configuration
//public class WebConfig {
//
//    @Bean
//    public Filter AuthorizeFilter() {
//        return new AuthorizeFilter();
//    }
//
//
//    @Bean
//    public FilterRegistrationBean authorizeFilterRegistration() {
//        FilterRegistrationBean registration = new FilterRegistrationBean();
//        registration.setFilter(new DelegatingFilterProxy("AuthorizeFilter"));
//        registration.addUrlPatterns("/*");
//        registration.setName("AuthorizeFilter");
//        registration.setOrder(1);
//        return registration;
//    }
//
//}
