Syntax error on token "public", interface expected after this token?
Syntaxerrorontoken"public",interfaceexpectedafterthistoken在WebService中自定义拦截器时提示如上异常信息...
Syntax error on token "public", interface expected after this token 在WebService中自定义拦截器时提示如上异常信息,如何解决?
注意是自定义拦截器,不是类。
3Q!!!
package com.company.lib.controllers;
public AutoLogInterceptor extends ControllerInterceptorAdapter {
@Override
public void afterCompletion(Invocation inv, Throwable ex) throws Exception {
String uid = inv.getResourceId(); // e.g. /lib/book/{bookId}
String uri = inv.getRequestPath().getUri(); // e.g. /lib/book/123456
boolean success = (ex == null);
String remarks = success ? null : ex.getMessage();
}
} 展开
注意是自定义拦截器,不是类。
3Q!!!
package com.company.lib.controllers;
public AutoLogInterceptor extends ControllerInterceptorAdapter {
@Override
public void afterCompletion(Invocation inv, Throwable ex) throws Exception {
String uid = inv.getResourceId(); // e.g. /lib/book/{bookId}
String uri = inv.getRequestPath().getUri(); // e.g. /lib/book/123456
boolean success = (ex == null);
String remarks = success ? null : ex.getMessage();
}
} 展开
1个回答
展开全部
代码上来看看。。。。。
更多追问追答
追问
public AutoLogInterceptor extends ControllerInterceptorAdapter {
@Override
public void afterCompletion(Invocation inv, Throwable ex) throws Exception {
}
}
代码以上,请详观,求教。
追答
你的public 后面还缺少class吧。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询