commit 72157bda03cb96ce37d93d970a731756490f3895 Author: Elijah Date: Thu Mar 28 10:55:37 2019 +0800 平台初始化前事件接口示例 diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..fb86c62 --- /dev/null +++ b/build.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/report/.gitkeep b/lib/report/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/plugin.xml b/plugin.xml new file mode 100644 index 0000000..74bb90f --- /dev/null +++ b/plugin.xml @@ -0,0 +1,18 @@ + + com.fr.plugin.demo.before.init.event + + yes + 1.0 + 10.0 + 2018-10-10 + Elijah + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..f7822b7 --- /dev/null +++ b/pom.xml @@ -0,0 +1,15 @@ + + + + starter + com.fr.plugin + 10.0 + + 4.0.0 + + demo-beforeInit-event + + + \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/demo/before/init/event/CustomBeforeInitEventProvider.java b/src/main/java/com/fr/plugin/demo/before/init/event/CustomBeforeInitEventProvider.java new file mode 100644 index 0000000..3954eda --- /dev/null +++ b/src/main/java/com/fr/plugin/demo/before/init/event/CustomBeforeInitEventProvider.java @@ -0,0 +1,21 @@ +package com.fr.plugin.demo.before.init.event; + +import com.fr.decision.fun.impl.AbstractBeforeInitEventProvider; +import com.fr.decision.webservice.utils.WebServiceUtils; +import com.fr.log.FineLoggerFactory; +import com.fr.plugin.transform.FunctionRecorder; + +import javax.servlet.http.HttpServletRequest; + +/** + * @Author: Elijah + * @Create: 2019-03-28 + * @Desciption: + */ +@FunctionRecorder +public class CustomBeforeInitEventProvider extends AbstractBeforeInitEventProvider { + @Override + public void action(HttpServletRequest httpServletRequest) { + FineLoggerFactory.getLogger().error(WebServiceUtils.getIpInfoFromRequest(httpServletRequest) + " init decision"); + } +} \ No newline at end of file