From 72157bda03cb96ce37d93d970a731756490f3895 Mon Sep 17 00:00:00 2001 From: Elijah Date: Thu, 28 Mar 2019 10:55:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E5=89=8D=E4=BA=8B=E4=BB=B6=E6=8E=A5=E5=8F=A3=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.xml | 126 ++++++++++++++++++ lib/report/.gitkeep | 0 plugin.xml | 18 +++ pom.xml | 15 +++ .../event/CustomBeforeInitEventProvider.java | 21 +++ 5 files changed, 180 insertions(+) create mode 100644 build.xml create mode 100644 lib/report/.gitkeep create mode 100644 plugin.xml create mode 100644 pom.xml create mode 100644 src/main/java/com/fr/plugin/demo/before/init/event/CustomBeforeInitEventProvider.java 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