1 changed files with 53 additions and 55 deletions
@ -1,55 +1,53 @@ |
|||||
package com.yxt.yyth.config; |
//package com.yxt.yyth.config;
|
||||
|
//
|
||||
import cn.dev33.satoken.interceptor.SaInterceptor; |
//import cn.dev33.satoken.interceptor.SaInterceptor;
|
||||
import cn.dev33.satoken.stp.StpUtil; |
//import cn.dev33.satoken.stp.StpUtil;
|
||||
import org.springframework.context.annotation.Configuration; |
//import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry; |
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
//
|
||||
/** |
///**
|
||||
* @author wangpengfei |
// * @author wangpengfei
|
||||
* @date 2023/5/16 14:43 |
// * @date 2023/5/16 14:43
|
||||
*/ |
// */
|
||||
@Configuration |
//@Configuration
|
||||
public class SaTokenConfigure implements WebMvcConfigurer { |
//public class SaTokenConfigure implements WebMvcConfigurer {
|
||||
|
//
|
||||
// 注册 Sa-Token 拦截器
|
// // 注册 Sa-Token 拦截器
|
||||
@Override |
// @Override
|
||||
public void addInterceptors(InterceptorRegistry registry) { |
// public void addInterceptors(InterceptorRegistry registry) {
|
||||
// 注册 Sa-Token 拦截器,校验规则为 StpUtil.checkLogin() 登录校验。
|
// // 注册 Sa-Token 拦截器,校验规则为 StpUtil.checkLogin() 登录校验。
|
||||
|
//
|
||||
registry.addInterceptor(new SaInterceptor(handler -> StpUtil.checkLogin())) |
// registry.addInterceptor(new SaInterceptor(handler -> StpUtil.checkLogin()))
|
||||
.addPathPatterns("/**") |
// .addPathPatterns("/**")
|
||||
.excludePathPatterns("/sysuser/doLogin") |
// .excludePathPatterns("/sysuser/doLogin")
|
||||
.excludePathPatterns("/lpkgiftcard/gifCardByCustomerSid") |
// .excludePathPatterns("/lpkgiftcard/gifCardByCustomerSid")
|
||||
.excludePathPatterns("/empcardgift/gifCardByCustomerSid") |
// .excludePathPatterns("/empcardgift/gifCardByCustomerSid")
|
||||
.excludePathPatterns("/empcard/getEmpCardByCustomerSid") |
// .excludePathPatterns("/empcard/getEmpCardByCustomerSid")
|
||||
.excludePathPatterns("/lpkgiftcard/getGifCardBySid/**") |
// .excludePathPatterns("/lpkgiftcard/getGifCardBySid/**")
|
||||
.excludePathPatterns("/empcardgift/getGifCardBySid/**") |
// .excludePathPatterns("/empcardgift/getGifCardBySid/**")
|
||||
.excludePathPatterns("/empcard/getEmpCardBySid/**") |
// .excludePathPatterns("/empcard/getEmpCardBySid/**")
|
||||
.excludePathPatterns("/lpkgiftcard/isSaturAndSun/**") |
// .excludePathPatterns("/lpkgiftcard/isSaturAndSun/**")
|
||||
.excludePathPatterns("/empcardgift/isSaturAndSun/**") |
// .excludePathPatterns("/empcardgift/isSaturAndSun/**")
|
||||
.excludePathPatterns("/empcard/isSaturAndSun/**") |
// .excludePathPatterns("/empcard/isSaturAndSun/**")
|
||||
.excludePathPatterns("/lpkgiftcard/getReservationBySid/**") |
// .excludePathPatterns("/lpkgiftcard/getReservationBySid/**")
|
||||
.excludePathPatterns("/lpksreservoorder/submission") |
// .excludePathPatterns("/lpksreservoorder/submission")
|
||||
.excludePathPatterns("/empsreservoorder/submission") |
// .excludePathPatterns("/empsreservoorder/submission")
|
||||
.excludePathPatterns("/empsreservoorder/submissionEmp") |
// .excludePathPatterns("/empsreservoorder/submissionEmp")
|
||||
.excludePathPatterns("/empcardgift/generateCard") |
// .excludePathPatterns("/empcardgift/generateCard")
|
||||
.excludePathPatterns("/lpkgiftcard/bindCard") |
// .excludePathPatterns("/lpkgiftcard/bindCard")
|
||||
.excludePathPatterns("/empcard/bindCard") |
// .excludePathPatterns("/empcard/bindCard")
|
||||
.excludePathPatterns("/lpksreservoorder/orderByCardSid/**") |
// .excludePathPatterns("/lpksreservoorder/orderByCardSid/**")
|
||||
.excludePathPatterns("/lpksreservoorder/orderListByUserSid/**") |
// .excludePathPatterns("/lpksreservoorder/orderListByUserSid/**")
|
||||
.excludePathPatterns("/lpksreservoorder/orderDetails/**") |
// .excludePathPatterns("/lpksreservoorder/orderDetails/**")
|
||||
.excludePathPatterns("/lpkgoods/goodsDetails/**") |
// .excludePathPatterns("/lpkgoods/goodsDetails/**")
|
||||
.excludePathPatterns("/lpkstore/getAllStoreByQuery") |
// .excludePathPatterns("/lpkstore/getAllStoreByQuery")
|
||||
.excludePathPatterns("/lpkgiftcard/getCardByBank") |
// .excludePathPatterns("/lpkgiftcard/getCardByBank")
|
||||
.excludePathPatterns("/empcardgift/shareEmpCard/**") |
// .excludePathPatterns("/empcardgift/shareEmpCard/**")
|
||||
.excludePathPatterns("/empcardgift/generateEmpCardGift") |
// .excludePathPatterns("/empcardgift/generateEmpCardGift")
|
||||
.excludePathPatterns("/empcardgift/generateEmpCard") |
// .excludePathPatterns("/empcardgift/generateEmpCard")
|
||||
.excludePathPatterns("/lpkcustomer/wxSilentLogin") |
// .excludePathPatterns("/lpkcustomer/wxSilentLogin")
|
||||
.excludePathPatterns("/lpkgiftcard/gifCardsByCustomerSid") |
// .excludePathPatterns("/lpkgiftcard/gifCardsByCustomerSid")
|
||||
.excludePathPatterns("/lpkgiftcard/bindAllCard"); |
// .excludePathPatterns("/lpkgiftcard/bindAllCard");
|
||||
|
// }
|
||||
|
//}
|
||||
} |
|
||||
} |
|
||||
|
Loading…
Reference in new issue