Sfoglia il codice sorgente

接入zheng-upms-client

shuzheng 9 anni fa
parent
commit
32d6a0a275

+ 1 - 1
zheng-api/zheng-api-rpc-service/src/main/java/com/zheng/api/rpc/service/ZhengApiRpcServiceApplication.java → zheng-api/zheng-api-rpc-service/src/main/java/com/zheng/api/rpc/ZhengApiRpcServiceApplication.java

@@ -1,4 +1,4 @@
-package com.zheng.api.rpc.service;
+package com.zheng.api.rpc;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

+ 0 - 38
zheng-api/zheng-api-rpc-service/src/test/java/com/zheng/AppTest.java

@@ -1,38 +0,0 @@
-package com.zheng;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Unit test for simple App.
- */
-public class AppTest 
-    extends TestCase
-{
-    /**
-     * Create the test case
-     *
-     * @param testName name of the test case
-     */
-    public AppTest( String testName )
-    {
-        super( testName );
-    }
-
-    /**
-     * @return the suite of tests being tested
-     */
-    public static Test suite()
-    {
-        return new TestSuite( AppTest.class );
-    }
-
-    /**
-     * Rigourous Test :-)
-     */
-    public void testApp()
-    {
-        assertTrue( true );
-    }
-}

+ 17 - 0
zheng-api/zheng-api-server/src/main/resources/zheng-upms-client.properties

@@ -0,0 +1,17 @@
+# \u7EC8\u7AEF\u7C7B\u578B
+upms.type=client
+# \u7EC8\u7AEFsession\u540D\u79F0
+upms.session.id=zheng-upms-client-session-id
+# \u5355\u70B9\u767B\u5F55\u8BA4\u8BC1\u4E2D\u5FC3\u5730\u5740
+sso.server.url=http://upms.zhangshuzheng.cn:1111
+# \u767B\u5F55\u6210\u529F\u56DE\u8C03\u5730\u5740
+upms.successUrl=/manage/index
+# \u672A\u6388\u6743\u5730\u5740
+upms.unauthorizedUrl=/403
+# \u4F1A\u8BDD\u65F6\u957F,\u534A\u5C0F\u65F6\uFF08\u5355\u4F4D\u6BEB\u79D2\uFF09
+upms.session.timeout=1800000
+# \u8BB0\u4F4F\u5BC6\u7801\u65F6\u957F30\u5929
+upms.rememberMe.timeout=2592000
+# \u5B50\u7CFB\u7EDF
+appID=zheng-api-server
+appSecret=

+ 7 - 18
zheng-api/zheng-api-server/src/main/webapp/WEB-INF/web.xml

@@ -52,29 +52,18 @@
         <url-pattern>/</url-pattern>
     </servlet-mapping>
 
-    <!-- zhang-upms-client -->
+    <!-- shiroFilter -->
     <filter>
-        <filter-name>zheng-upms-client</filter-name>
-        <filter-class>com.zheng.upms.client.filter.SSOFilter</filter-class>
-        <!-- 系统名称 -->
+        <filter-name>shiroFilter</filter-name>
+        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
         <init-param>
-            <param-name>system_name</param-name>
-            <param-value>zheng-cms-admin</param-value>
-        </init-param>
-        <!-- SSO认证中心 -->
-        <init-param>
-            <param-name>sso_server_url</param-name>
-            <param-value>http://upms.zhangshuzheng.cn:1111</param-value>
-        </init-param>
-        <!-- 开发模式 -->
-        <init-param>
-            <param-name>sso_debug</param-name>
-            <param-value>false</param-value>
+            <param-name>targetFilterLifecycle</param-name>
+            <param-value>true</param-value>
         </init-param>
     </filter>
     <filter-mapping>
-        <filter-name>zheng-upms-client</filter-name>
-        <url-pattern>/manage/*</url-pattern>
+        <filter-name>shiroFilter</filter-name>
+        <url-pattern>/*</url-pattern>
     </filter-mapping>
 
     <!-- session配置 -->