package cn.cloudowr.attach; import com.jfinal.aop.Interceptor; import com.jfinal.aop.Invocation; /** * Created by lyf66 on 2017/2/16. */ public class IdInterceptor implements Interceptor { @Override public void intercept(Invocation inv) { String id = inv.getController().getPara("id"); if (id != null && !id.isEmpty()) { inv.invoke(); } else { inv.getController().renderError(400); } } }