增加参数自动校验位置
This commit is contained in:
parent
16adee1c52
commit
e9d8315ef0
@ -46,6 +46,14 @@ public class ApiParamsAspect {
|
||||
public void oauthCutPoint() {
|
||||
}
|
||||
|
||||
@Pointcut("execution(public * com.cm.common.article.controller..*.*(..))")
|
||||
public void articleCutPoint() {
|
||||
}
|
||||
|
||||
@Pointcut("execution(public * com.cm.common.wechat.controller..*.*(..))")
|
||||
public void wechatCutPoint() {
|
||||
}
|
||||
|
||||
@Before("apiCutPoint()")
|
||||
public void beforeApiCutPoint(JoinPoint joinPoint) throws ParamsException {
|
||||
beforeCutPoint(joinPoint);
|
||||
@ -61,6 +69,16 @@ public class ApiParamsAspect {
|
||||
beforeCutPoint(joinPoint);
|
||||
}
|
||||
|
||||
@Before("articleCutPoint()")
|
||||
public void beforeArticleCutPoint(JoinPoint joinPoint) throws ParamsException {
|
||||
beforeCutPoint(joinPoint);
|
||||
}
|
||||
|
||||
@Before("wechatCutPoint()")
|
||||
public void beforeWechatCutPoint(JoinPoint joinPoint) throws ParamsException {
|
||||
beforeCutPoint(joinPoint);
|
||||
}
|
||||
|
||||
private void beforeCutPoint(JoinPoint joinPoint) throws ParamsException {
|
||||
Signature signature = joinPoint.getSignature();
|
||||
Object[] args = joinPoint.getArgs();
|
||||
|
Loading…
Reference in New Issue
Block a user