Browse Source

修复BUG

10.0
hugh 4 years ago
parent
commit
b69dd01176
  1. 1
      plugin.xml
  2. 10
      src/main/java/com/tptj/demo/hg/request/interceptor/ReplaceDemo.java

1
plugin.xml

@ -11,6 +11,7 @@
<main-package>com.tptj.demo.hg.request.interceptor</main-package> <main-package>com.tptj.demo.hg.request.interceptor</main-package>
<function-recorder class="com.tptj.demo.hg.request.interceptor.ReplaceDemo"/> <function-recorder class="com.tptj.demo.hg.request.interceptor.ReplaceDemo"/>
<extra-core> <extra-core>
<RequestInterceptor class="com.tptj.demo.hg.request.interceptor.ReplaceDemo" op="fr_base" cmd="evaluate_formula"/>
<RequestInterceptor class="com.tptj.demo.hg.request.interceptor.ReplaceDemo" op="fr_write_plus" cmd="evaluate_formula"/> <RequestInterceptor class="com.tptj.demo.hg.request.interceptor.ReplaceDemo" op="fr_write_plus" cmd="evaluate_formula"/>
<RequestInterceptor class="com.tptj.demo.hg.request.interceptor.NewDemo" op="fr_attach" cmd="ah_info"/> <RequestInterceptor class="com.tptj.demo.hg.request.interceptor.NewDemo" op="fr_attach" cmd="ah_info"/>
</extra-core> </extra-core>

10
src/main/java/com/tptj/demo/hg/request/interceptor/ReplaceDemo.java

@ -5,6 +5,7 @@ import com.fanruan.api.net.NetworkKit;
import com.fr.intelli.record.Focus; import com.fr.intelli.record.Focus;
import com.fr.record.analyzer.EnableMetrics; import com.fr.record.analyzer.EnableMetrics;
import com.fr.report.enhancement.engine.write.service.action.EvaluateFormulaAction; import com.fr.report.enhancement.engine.write.service.action.EvaluateFormulaAction;
import com.fr.web.utils.WebUtils;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -22,11 +23,16 @@ public class ReplaceDemo extends EvaluateFormulaAction {
} }
@Override @Override
@Focus(id="com.tptj.demo.hg.request.interceptor.v10",text = "cmd接口拦截")
public void actionCMD(HttpServletRequest req, HttpServletResponse res) throws Exception { public void actionCMD(HttpServletRequest req, HttpServletResponse res) throws Exception {
actionCMD(req,res, WebUtils.getHTTPRequestParameter(req,"sessionID"));
}
@Override
@Focus(id="com.tptj.demo.hg.request.interceptor.v10",text = "cmd接口拦截")
public void actionCMD(HttpServletRequest req, HttpServletResponse res, String sessionID)throws Exception{
String expression = NetworkKit.getHTTPRequestParameter(req,"expression"); String expression = NetworkKit.getHTTPRequestParameter(req,"expression");
LogKit.info("Evaluate Formula Starting: {}",expression); LogKit.info("Evaluate Formula Starting: {}",expression);
super.actionCMD(req,res); super.actionCMD(req,res,sessionID);
LogKit.info("Evaluate Formula Ended: {}",expression); LogKit.info("Evaluate Formula Ended: {}",expression);
} }
} }

Loading…
Cancel
Save