Browse Source

初始化

master
richie 6 years ago
parent
commit
9d4888d8dc
  1. 7
      plugin.xml
  2. 22
      src/main/java/com/fr/conf/demo/simple/DemoInitializeMonitor.java
  3. 3
      src/main/java/com/fr/conf/demo/simple/PluginInitializeFilterBridge.java

7
plugin.xml

@ -3,19 +3,18 @@
<main-package>com.fr.conf.demo.simple</main-package>
<name><![CDATA[配置界面可视化示例]]></name>
<active>yes</active>
<version>1.0</version>
<version>1.1</version>
<env-version>10.0~</env-version>
<jartime>2018-10-20</jartime>
<vendor>author</vendor>
<description><![CDATA[可视化配置插件的参数。]]></description>
<change-notes><![CDATA[
[2018-12-04]使用lifecycle-monitor标签初始化配置类。<br/>
[2018-11-22]增加了插件功能说明。<br/>
]]></change-notes>
<extra-core>
<LocaleFinder class="com.fr.conf.demo.simple.PluginLocaleFinderBridge"/>
</extra-core>
<extra-decision>
<EmbedRequestFilterProvider class="com.fr.conf.demo.simple.PluginInitializeFilterBridge"/>
</extra-decision>
<lifecycle-monitor class="com.fr.conf.demo.simple.DemoInitializeMonitor"/>
<function-recorder class="com.fr.conf.demo.simple.account.PluginSimpleConfig"/>
</plugin>

22
src/main/java/com/fr/conf/demo/simple/DemoInitializeMonitor.java

@ -0,0 +1,22 @@
package com.fr.conf.demo.simple;
import com.fr.conf.demo.simple.account.PluginSimpleConfig;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.observer.inner.AbstractPluginLifecycleMonitor;
/**
* @author richie
* @version 10.0
* Created by richie on 2018-12-04
*/
public class DemoInitializeMonitor extends AbstractPluginLifecycleMonitor {
@Override
public void afterRun(PluginContext pluginContext) {
PluginSimpleConfig.getInstance();
}
@Override
public void beforeStop(PluginContext pluginContext) {
}
}

3
src/main/java/com/fr/conf/demo/simple/PluginInitializeFilterBridge.java

@ -3,7 +3,6 @@ package com.fr.conf.demo.simple;
import com.fr.conf.demo.simple.account.PluginSimpleConfig;
import com.fr.decision.fun.impl.AbstractEmbedRequestFilterProvider;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
@ -18,7 +17,7 @@ public class PluginInitializeFilterBridge extends AbstractEmbedRequestFilterProv
}
@Override
public void doFilter(HttpServletRequest req, HttpServletResponse res, FilterChain filterChain) throws IOException, ServletException {
public void filter(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException {
}
}

Loading…
Cancel
Save