剔除wms
This commit is contained in:
@@ -1,44 +0,0 @@
|
||||
package org.nl.sso.base.saconfig;
|
||||
|
||||
import cn.dev33.satoken.config.SaSsoConfig;
|
||||
import cn.dev33.satoken.interceptor.SaInterceptor;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import com.dtflys.forest.Forest;
|
||||
import lombok.Data;
|
||||
import org.nl.sso.base.LoginInterceptor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2022/11/24 3:55 下午
|
||||
*/
|
||||
@Configuration
|
||||
public class BaseConfig implements WebMvcConfigurer {
|
||||
|
||||
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
// 注册 Sa-Token 拦截器,打开注解式鉴权功能
|
||||
registry.addInterceptor(new SaInterceptor()).addPathPatterns("/**");
|
||||
registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/**");
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private void configSso(SaSsoConfig sso) {
|
||||
// 配置Http请求处理器
|
||||
sso.setSendHttp(url -> {
|
||||
HttpResponse execute = HttpRequest.get(url).execute();
|
||||
if (execute.getStatus() == 200){
|
||||
return execute.body();
|
||||
}
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user