wuheng пре 1 година
родитељ
комит
ec6bc44fe8

+ 10 - 0
common/pom.xml

@@ -13,5 +13,15 @@
         <version>0.0.1-SNAPSHOT</version>
     </parent>
 
+    <dependencies>
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>name.remal.tools.test</groupId>
+            <artifactId>junit4</artifactId>
+        </dependency>
+    </dependencies>
 
 </project>

+ 0 - 1
controller/src/main/java/com/koobietech/eas/controller/EasUserController.java

@@ -2,7 +2,6 @@ package com.koobietech.eas.controller;
 
 import com.koobietech.eas.mbg.mapper.EasSysPermissionMapper;
 import com.koobietech.eas.mbg.model.EasSysPermission;
-import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RestController;
 

+ 4 - 1
controller/src/main/resources/application.yaml

@@ -12,4 +12,7 @@ security:
   url:
     ignored:
       - /login
-      - /test
+      - /test
+
+eas:
+  password-sign-key: eas-key-password

+ 10 - 1
controller/src/test/java/com/koobietech/eas/controller/ControllerApplicationTests.java

@@ -1,17 +1,26 @@
 package com.koobietech.eas.controller;
 
+import com.koobietech.eas.common.utils.PasswordManager;
 import org.junit.jupiter.api.Test;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.test.context.SpringBootTest;
 
 
 @SpringBootTest
 class ControllerApplicationTests {
 
-
+    @Value("${eas.password-sign-key}")
+    String easKey;
 
     @Test
     void contextLoads() {
 
+        String data = "nImYEyKu38ClXCpm886JNNyk9PzQ2SN6IrCaWFqrASo=";
+
+        String s = new PasswordManager()
+                .decryptPassword(data, easKey);
+
+        System.out.println( s );
     }
 
 }

+ 21 - 6
pom.xml

@@ -25,14 +25,29 @@
         <slf4j-api.version>1.7.32</slf4j-api.version>
         <logback-classic.version>1.2.10</logback-classic.version>
         <fastjson2.version>2.0.31</fastjson2.version>
+        <hutool-all.version>5.8.18</hutool-all.version>
+        <junit4.version>1.26.147</junit4.version>
     </properties>
-
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>name.remal.tools.test</groupId>
+                <artifactId>junit4</artifactId>
+                <version>${junit4.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>cn.hutool</groupId>
+                <artifactId>hutool-all</artifactId>
+                <version>${hutool-all.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.alibaba.fastjson2</groupId>
+                <artifactId>fastjson2</artifactId>
+                <version>${fastjson2.version}</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
     <dependencies>
-        <dependency>
-            <groupId>com.alibaba.fastjson2</groupId>
-            <artifactId>fastjson2</artifactId>
-            <version>${fastjson2.version}</version>
-        </dependency>
         <dependency>
             <groupId>org.projectlombok</groupId>
             <artifactId>lombok</artifactId>