commit b5fb13aabb5340704f20d0838400e5174e8b6381 Author: yaoh.wu Date: Tue Aug 20 17:10:26 2019 +0800 init commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f610933 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.idea/ +*.iml +target/ +lib/report/*.jar \ No newline at end of file diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..e87d26b --- /dev/null +++ b/build.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/plugin.xml b/plugin.xml new file mode 100644 index 0000000..d1ea646 --- /dev/null +++ b/plugin.xml @@ -0,0 +1,14 @@ + + com.fr.plugin.demo.web.controller + + yes + 1.0 + 10.0 + 2019-06-01 + Maksim + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..4c6e5ef --- /dev/null +++ b/pom.xml @@ -0,0 +1,18 @@ + + + 4.0.0 + + + com.fr.plugin + starter + 10.0 + + jar + demo-web-request + + + ${project.basedir}/../webroot/WEB-INF/plugins/plugin-com.fr.plugin.demo.web.request-1.0/classes + + \ No newline at end of file diff --git a/src/main/java/.gitkeep b/src/main/java/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/main/java/com/fr/plugin/demo/web/request/DemoControllerBridge.java b/src/main/java/com/fr/plugin/demo/web/request/DemoControllerBridge.java new file mode 100644 index 0000000..85efa29 --- /dev/null +++ b/src/main/java/com/fr/plugin/demo/web/request/DemoControllerBridge.java @@ -0,0 +1,16 @@ +package com.fr.plugin.demo.web.request; + +import com.fr.decision.fun.impl.AbstractControllerRegisterProvider; +import com.fr.plugin.demo.web.request.controller.DynamicController1; +import com.fr.plugin.demo.web.request.controller.DynamicController2; + +public class DemoControllerBridge extends AbstractControllerRegisterProvider { + + public Class[] getController() { + return new Class[]{ + DynamicController1.class, + DynamicController2.class + }; + } + +} diff --git a/src/main/java/com/fr/plugin/demo/web/request/controller/DynamicController1.java b/src/main/java/com/fr/plugin/demo/web/request/controller/DynamicController1.java new file mode 100644 index 0000000..a18af44 --- /dev/null +++ b/src/main/java/com/fr/plugin/demo/web/request/controller/DynamicController1.java @@ -0,0 +1,35 @@ +package com.fr.plugin.demo.web.request.controller; + +import com.fr.decision.webservice.annotation.LoginStatusChecker; +import com.fr.decision.webservice.annotation.TemplateAuth; +import com.fr.decision.webservice.bean.template.TemplateProductType; +import com.fr.decision.webservice.v10.login.TokenResource; +import com.fr.intelli.record.Focus; +import com.fr.intelli.record.Original; +import com.fr.record.analyzer.EnableMetrics; +import com.fr.third.springframework.stereotype.Controller; +import com.fr.third.springframework.web.bind.annotation.RequestMapping; +import com.fr.third.springframework.web.bind.annotation.ResponseBody; + +@EnableMetrics +@Controller +@RequestMapping("dynamic") +public class DynamicController1 { + @Focus(id = "com.fr.plugin.demo.web.controller", text = "", source = Original.PLUGIN) + @RequestMapping("mapping11") + @ResponseBody + @TemplateAuth(product = TemplateProductType.FINE_REPORT) + @LoginStatusChecker(tokenResource = TokenResource.COOKIE) + public String dynamicMapping1(){ + return "This is dynamicMapping11"; + } + + @RequestMapping("mapping12") + @ResponseBody + @TemplateAuth(product = TemplateProductType.FINE_REPORT) + @LoginStatusChecker(tokenResource = TokenResource.COOKIE) + public String dynamicMapping2(){ + return "This is dynamicMapping12"; + } + +} diff --git a/src/main/java/com/fr/plugin/demo/web/request/controller/DynamicController2.java b/src/main/java/com/fr/plugin/demo/web/request/controller/DynamicController2.java new file mode 100644 index 0000000..b839141 --- /dev/null +++ b/src/main/java/com/fr/plugin/demo/web/request/controller/DynamicController2.java @@ -0,0 +1,31 @@ +package com.fr.plugin.demo.web.request.controller; + +import com.fr.decision.webservice.annotation.LoginStatusChecker; +import com.fr.decision.webservice.annotation.TemplateAuth; +import com.fr.decision.webservice.bean.template.TemplateProductType; +import com.fr.decision.webservice.v10.login.TokenResource; +import com.fr.third.springframework.stereotype.Controller; +import com.fr.third.springframework.web.bind.annotation.RequestMapping; +import com.fr.third.springframework.web.bind.annotation.ResponseBody; + +@Controller +@RequestMapping("dynamic") +public class DynamicController2 { + + @RequestMapping("mapping21") + @ResponseBody + @TemplateAuth(product = TemplateProductType.FINE_REPORT) + @LoginStatusChecker(tokenResource = TokenResource.COOKIE) + public String dynamicMapping1(){ + return "This is dynamicMapping21"; + } + + @RequestMapping("mapping22") + @ResponseBody + @TemplateAuth(product = TemplateProductType.FINE_REPORT) + @LoginStatusChecker(tokenResource = TokenResource.COOKIE) + public String dynamicMapping2(){ + return "This is dynamicMapping22"; + } + +} diff --git a/src/main/resources/.gitkeep b/src/main/resources/.gitkeep new file mode 100644 index 0000000..e69de29