@Before(TestGlobalInterceptor.class) public void test() { String jsonString = HttpKit.readData(getRequest()); String str = getParaJson(jsonString,"gaid")//报错位置 }
public void intercept(Invocation inv) { Controller controller= inv.getController(); String postData=HttpKit.readData(controller.getRequest()); System.out.println("拦截器1"+postData); inv.invoke(); System.out.println("拦截器2"); }
九月 13, 2018 10:24:26 上午 com.jfinal.core.ActionHandler error
严重: /api2/test
java.lang.NullPointerException
at com.controller.BaseController.getParaJson(BaseController.java:28)
at com.api.ApiController.test(ApiController.java:1373)
项目:JFinal