提交 b6f640cd authored 作者: zgy's avatar zgy

完成shopify商品详情(不需要token就能访问)

上级 84d9d245
......@@ -11,6 +11,7 @@ import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
......@@ -24,7 +25,7 @@ import javax.servlet.http.HttpServletRequest;
public class TokenVerification {
@Autowired
private HttpServletRequest request;
@Resource(name="redisTokenManager")
@Resource(name = "redisTokenManager")
private TokenManager tokenManager;
@Autowired
private JwtTokenProvider jwtTokenProvider;
......@@ -42,12 +43,13 @@ public class TokenVerification {
"&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfHomePageController.*(..))" +
"&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfUserInfoController.resetPassWord(..))" +
"&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfFeedbackController.getFeedbackList(..))" +
"&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfUserInfoController.getUserIdentifyCode(..))"+
"&&!execution(* com.diaoyun.zion.chinafrica.controller.GoodsTypeController.*(..))"+
"&&!execution(* com.diaoyun.zion.chinafrica.controller.VersionController.*(..))"+
"&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfFeeController.*(..))"+
"&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfOrderController.*(..))"+
"&&!execution(* com.diaoyun.zion.chinafrica.controller.PayPalController.*(..))"
"&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfUserInfoController.getUserIdentifyCode(..))" +
"&&!execution(* com.diaoyun.zion.chinafrica.controller.GoodsTypeController.*(..))" +
"&&!execution(* com.diaoyun.zion.chinafrica.controller.VersionController.*(..))" +
"&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfFeeController.*(..))" +
"&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfOrderController.*(..))" +
"&&!execution(* com.diaoyun.zion.chinafrica.controller.PayPalController.*(..))" +
"&&!execution(* com.diaoyun.zion.chinafrica.controller.ShopifyController.*(..))"
)
public void controllerAspect() {
......@@ -62,9 +64,8 @@ public class TokenVerification {
//不需要登录
if (StringUtils.isNotBlank(token) && tokenManager.validate(token) != null) {
return pjp.proceed();
}
else {
result=new Result().setCode(ResultCodeEnum.NEED_LOGIN.getCode()).setMessage(ResultCodeEnum.NEED_LOGIN.getDesc());
} else {
result = new Result().setCode(ResultCodeEnum.NEED_LOGIN.getCode()).setMessage(ResultCodeEnum.NEED_LOGIN.getDesc());
}
return result;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论