Browse Source

解决POM打包过大的问题

lijie 3 years ago
parent
commit
3fc506a229

+ 2 - 2
adm-business/adm-server/src/main/java/com/persagy/adm/server/backstage/service/AdmAnalyseService.java

@@ -31,7 +31,7 @@ public interface AdmAnalyseService {
      * @author : lijie
      * Update By 2022/1/21 10:59
      */
-    void init(AdmAnalysisModel model) throws BusinessException;
+    void init() throws BusinessException;
 
     /**
      * 解析模型文件方法
@@ -48,6 +48,6 @@ public interface AdmAnalyseService {
      * @author : lijie
      * Update By 2022/1/21 10:50
      */
-    void destroy(AdmAnalysisModel model) throws BusinessException;
+    void destroy() throws BusinessException;
 
 }

+ 6 - 6
adm-business/adm-server/src/main/java/com/persagy/adm/server/backstage/service/impl/AdmAnalysisServiceBase.java

@@ -27,13 +27,13 @@ public abstract class AdmAnalysisServiceBase implements AdmAnalyseService {
      */
     @PostConstruct
     @Override
-    public final synchronized void init(AdmAnalysisModel model) throws BusinessException {
+    public final synchronized void init() throws BusinessException {
         // 1.是否需要打印日志
         if (log.isDebugEnabled()) {
             log.debug("AdmAnalysisModelBase.init方法开始:{}", this);
         }
         // 调具体实现类的方法,完成自身的初始化
-        initInternal(model);
+        initInternal();
     }
 
     /**
@@ -44,13 +44,13 @@ public abstract class AdmAnalysisServiceBase implements AdmAnalyseService {
      */
     @PreDestroy
     @Override
-    public final synchronized void destroy(AdmAnalysisModel model) throws BusinessException {
+    public final synchronized void destroy() throws BusinessException {
         // 1.是否需要打印日志
         if (log.isDebugEnabled()) {
             log.debug("AdmAnalysisModelBase.destroy() :{}", this);
         }
         // 调具体实现类的方法,完成自身的销毁逻辑
-        destroyInternal(model);
+        destroyInternal();
         if (log.isDebugEnabled()) {
             log.debug("AdmAnalysisModelBase.destroy() end:{}", this);
         }
@@ -128,7 +128,7 @@ public abstract class AdmAnalysisServiceBase implements AdmAnalyseService {
      * @author : lijie
      * Update By 2022/1/21 12:03
      */
-    protected void initInternal(AdmAnalysisModel model){};
+    protected void initInternal(){};
 
     /**
      * 内部销毁方法,子类覆写即可
@@ -136,5 +136,5 @@ public abstract class AdmAnalysisServiceBase implements AdmAnalyseService {
      * @author : lijie
      * Update By 2022/1/21 12:03
      */
-    protected void destroyInternal(AdmAnalysisModel model){};
+    protected void destroyInternal(){};
 }

+ 10 - 14
adm-comp/adm-steward-starter/pom.xml

@@ -12,28 +12,24 @@
     <artifactId>adm-steward-starter</artifactId>
 
     <dependencies>
-        <!-- 配置中心(包含注册中心) -->
+        <!-- fm 工具包 -->
         <dependency>
             <groupId>com.persagy</groupId>
-            <artifactId>integrated-config-client</artifactId>
+            <artifactId>dmp-common</artifactId>
         </dependency>
-        <!-- 项目启动 -->
         <dependency>
-            <groupId>com.persagy</groupId>
-            <artifactId>dmp-server</artifactId>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
         </dependency>
         <dependency>
-            <groupId>com.persagy</groupId>
-            <artifactId>dmp-mybatis</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.persagy</groupId>
-            <artifactId>dmp-digital-starter</artifactId>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-annotation</artifactId>
+            <scope>compile</scope>
         </dependency>
         <dependency>
-            <groupId>org.locationtech.jts</groupId>
-            <artifactId>jts-core</artifactId>
-            <version>1.16.1</version>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-extension</artifactId>
+            <scope>compile</scope>
         </dependency>
     </dependencies>
 

+ 2 - 4
adm-comp/adm-steward-starter/src/main/java/com/persagy/adm/steward/basic/config/StewardEncodeInterceptor.java

@@ -2,6 +2,7 @@ package com.persagy.adm.steward.basic.config;
 
 import com.alibaba.fastjson.JSONObject;
 import com.persagy.adm.steward.basic.utils.RSAUtils;
+import com.persagy.dmp.common.helper.SpringHelper;
 import feign.Request;
 import feign.RequestInterceptor;
 import feign.RequestTemplate;
@@ -17,14 +18,11 @@ import org.springframework.context.annotation.Configuration;
 @Slf4j
 public class StewardEncodeInterceptor implements RequestInterceptor {
 
-    @Value("${adm.rsa.privateKey}")
-    private String privateKey;
-
     @Override
     public void apply(RequestTemplate template) {
         // 更改请求体中的content的值
         Request.Body body = template.requestBody();
         JSONObject temp = JSONObject.parseObject(body.asString());
-        template.body(RSAUtils.decode(body.asString(),privateKey));
+        template.body(RSAUtils.decode(body.asString(), SpringHelper.getString("adm.rsa.privateKey")));
     }
 }

+ 11 - 0
adm-comp/pom.xml

@@ -15,5 +15,16 @@
         <module>adm-steward-starter</module>
     </modules>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
 </project>