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