com.gitee.easyopen.interceptor.ApiInterceptorAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of easyopen-mini Show documentation
Show all versions of easyopen-mini Show documentation
easyopen mini版,保留基本签名校验,文档功能。https://gitee.com/durcframework/easyopen
package com.gitee.easyopen.interceptor;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.gitee.easyopen.ApiMeta;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author tanghc
*/
public abstract class ApiInterceptorAdapter implements ApiInterceptor {
protected Logger logger = LoggerFactory.getLogger(getClass());
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, ApiMeta apiMeta, Object argu)
throws Throwable {
return true;
}
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, ApiMeta apiMeta, Object argu, Object result) throws Throwable {
}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, ApiMeta apiMeta, Object argu, Object result, Throwable e) throws Throwable {
}
@Override
public boolean match(ApiMeta apiMeta) {
return true;
}
}