From 4253ac50935312673e467d7dbe3e389e8723e34d Mon Sep 17 00:00:00 2001 From: Fancy <Fancy.fx@outlook.com> Date: 星期五, 18 十月 2024 15:24:46 +0800 Subject: [PATCH] command --- pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/tstCommand/TstCommandSv.java | 4 +- /dev/null | 50 ------------------------- pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/tstCommand/QueryVo.java | 2 pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/tstCommand/TstCommandCtrl.java | 8 ++-- 4 files changed, 7 insertions(+), 57 deletions(-) diff --git a/pms-parent/pms-test/src/main/java/com/dy/pmsTest/config/WebFilterConfiguration.java b/pms-parent/pms-test/src/main/java/com/dy/pmsTest/config/WebFilterConfiguration.java deleted file mode 100644 index f955616..0000000 --- a/pms-parent/pms-test/src/main/java/com/dy/pmsTest/config/WebFilterConfiguration.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.dy.pmsTest.config; - -import com.dy.common.webFilter.DevStageFilter; -import com.dy.common.webFilter.UserTokenFilter; -import jakarta.servlet.Filter; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.web.servlet.FilterRegistrationBean; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -@Configuration -public class WebFilterConfiguration { - - @Value("${pms.global.dev}") - public String isDevStage ;//鏄惁涓哄紑鍙戦樁娈� - - /** - * 鍚姩椤哄簭 - */ - private static final int order_UserTokenFilter = 1 ; - private static final int order_DevStageFilter = 100 ; - - - @Bean - public FilterRegistrationBean<? extends Filter> regFilter() { - FilterRegistrationBean<Filter> filterRegistrationBean = new FilterRegistrationBean<>(); - if(this.isDevStage != null && !this.isDevStage.trim().equals("") && this.isDevStage.trim().equalsIgnoreCase("true")){ - filterRegistrationBean.setFilter(new DevStageFilter()); - filterRegistrationBean.addUrlPatterns("/*");//閰嶇疆杩囨护瑙勫垯 - filterRegistrationBean.setName("devStageFilter");//璁剧疆杩囨护鍣ㄥ悕绉� - filterRegistrationBean.setOrder(order_DevStageFilter);//鎵ц娆″簭 - }else{ - filterRegistrationBean.setFilter(new UserTokenFilter()); - filterRegistrationBean.addUrlPatterns("/*");//閰嶇疆杩囨护瑙勫垯 - filterRegistrationBean.setName("UserTokenFilter");//璁剧疆杩囨护鍣ㄥ悕绉� - filterRegistrationBean.setOrder(order_UserTokenFilter);//鎵ц娆″簭 - } - return filterRegistrationBean; - } - -} diff --git a/pms-parent/pms-test/src/main/java/com/dy/pmsTest/config/WebListenerConfiguration.java b/pms-parent/pms-test/src/main/java/com/dy/pmsTest/config/WebListenerConfiguration.java deleted file mode 100644 index b063b2a..0000000 --- a/pms-parent/pms-test/src/main/java/com/dy/pmsTest/config/WebListenerConfiguration.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.dy.pmsTest.config; - -import com.dy.common.webListener.GenerateIdSetSuffixListener; -import jakarta.servlet.ServletContextListener; -import org.springframework.boot.web.servlet.ServletListenerRegistrationBean; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -@Configuration -public class WebListenerConfiguration { - - /** - * 鍚姩椤哄簭 - */ - //private static final int order_config = 0 ; - private static final int order_idSetSuffix = 1 ; - - /* - * 瑙f瀽鍚勭***config.xml閰嶇疆鐨凜onfigListener锛屽綋鍓峴pringboot宸ョ▼鏆傛椂涓嶉噰鐢ㄦ绉嶉厤缃柟寮� - * - @Bean - public ConfigListener getGlConfigListener(){ - return new ConfigListener() ; - } - /** - * 澶栭儴鎻愪緵Listener - * @param listener 澶栭儴鎻愪緵Listener - * @return 娉ㄥ唽Bean - @Bean - public ServletListenerRegistrationBean<? extends ServletContextListener> regConfigListener(ConfigListener listener) { - ServletListenerRegistrationBean<ConfigListener> listenerRegistrationBean = new ServletListenerRegistrationBean<>(); - listenerRegistrationBean.setListener(listener); - listenerRegistrationBean.setOrder(order_config); - return listenerRegistrationBean; - } - */ - - /** - * 鍐呴儴鎻愪緵listener锛岃listener鍦ㄧ郴缁熷惎鍔ㄦ椂锛屾牴鎹厤缃� 璁剧疆ID浜х敓鍣ㄧ殑鍚庣紑 - * @return 娉ㄥ唽Bean - */ - @Bean - public ServletListenerRegistrationBean<? extends ServletContextListener> regIdSuffixListener() { - ServletListenerRegistrationBean<GenerateIdSetSuffixListener> listenerRegistrationBean = new ServletListenerRegistrationBean<>(); - listenerRegistrationBean.setListener(new GenerateIdSetSuffixListener()); - listenerRegistrationBean.setOrder(order_idSetSuffix); - return listenerRegistrationBean; - } - -} diff --git a/pms-parent/pms-test/src/main/java/com/dy/pmsTest/command/QueryVo.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/tstCommand/QueryVo.java similarity index 89% rename from pms-parent/pms-test/src/main/java/com/dy/pmsTest/command/QueryVo.java rename to pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/tstCommand/QueryVo.java index 18b91d2..d741066 100644 --- a/pms-parent/pms-test/src/main/java/com/dy/pmsTest/command/QueryVo.java +++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/tstCommand/QueryVo.java @@ -1,4 +1,4 @@ -package com.dy.pmsTest.command; +package com.dy.pmsPlatform.tstCommand; import com.dy.common.webUtil.QueryConditionVo; import lombok.*; diff --git a/pms-parent/pms-test/src/main/java/com/dy/pmsTest/command/CommandCtrl.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/tstCommand/TstCommandCtrl.java similarity index 95% rename from pms-parent/pms-test/src/main/java/com/dy/pmsTest/command/CommandCtrl.java rename to pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/tstCommand/TstCommandCtrl.java index 6dc2aad..89cf6b5 100644 --- a/pms-parent/pms-test/src/main/java/com/dy/pmsTest/command/CommandCtrl.java +++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/tstCommand/TstCommandCtrl.java @@ -1,4 +1,4 @@ -package com.dy.pmsTest.command; +package com.dy.pmsPlatform.tstCommand; import com.alibaba.fastjson2.JSON; import com.dy.common.aop.SsoPowerAop; @@ -21,10 +21,10 @@ @Slf4j @RestController @RequestMapping(path="command") -public class CommandCtrl { - private CommandSv sv; +public class TstCommandCtrl { + private TstCommandSv sv; @Autowired - public void setSv(CommandSv sv){ + public void setSv(TstCommandSv sv){ this.sv = sv; } diff --git a/pms-parent/pms-test/src/main/java/com/dy/pmsTest/command/CommandSv.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/tstCommand/TstCommandSv.java similarity index 97% rename from pms-parent/pms-test/src/main/java/com/dy/pmsTest/command/CommandSv.java rename to pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/tstCommand/TstCommandSv.java index 3c076e2..e1ae498 100644 --- a/pms-parent/pms-test/src/main/java/com/dy/pmsTest/command/CommandSv.java +++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/tstCommand/TstCommandSv.java @@ -1,4 +1,4 @@ -package com.dy.pmsTest.command; +package com.dy.pmsPlatform.tstCommand; import com.dy.common.webUtil.QueryResultVo; import com.dy.pmsGlobal.daoTst.TstCommandMapper; @@ -16,7 +16,7 @@ @Slf4j @Service -public class CommandSv { +public class TstCommandSv { private TstCommandMapper dao; private UserUtil userUtil; -- Gitblit v1.8.0