Forráskód Böngészése

测试环境发布,修改配置文件和打包文件配置

xucaiqin 2 éve
szülő
commit
f0228d49bb
21 módosított fájl, 188 hozzáadás és 15 törlés
  1. 19 0
      iot-gateway/pom.xml
  2. 16 0
      iot-gateway/src/main/resources/bootstrap-test.yaml
  3. 2 2
      iot-gateway/src/main/resources/logback-spring.xml
  4. 19 0
      iot-module/iot-module-auth/iot-module-auth-biz/pom.xml
  5. 1 1
      iot-module/iot-module-auth/iot-module-auth-biz/src/main/java/com/middle/platform/auth/biz/service/AuthService.java
  6. 16 0
      iot-module/iot-module-auth/iot-module-auth-biz/src/main/resources/bootstrap-test.yaml
  7. 1 1
      iot-module/iot-module-auth/iot-module-auth-biz/src/main/resources/bootstrap.yaml
  8. 2 2
      iot-module/iot-module-auth/iot-module-auth-biz/src/main/resources/logback-spring.xml
  9. 18 0
      iot-module/iot-module-data/iot-module-data-biz/pom.xml
  10. 16 0
      iot-module/iot-module-data/iot-module-data-biz/src/main/resources/bootstrap-test.yaml
  11. 1 1
      iot-module/iot-module-data/iot-module-data-biz/src/main/resources/bootstrap.yaml
  12. 2 2
      iot-module/iot-module-data/iot-module-data-biz/src/main/resources/logback-spring.xml
  13. 18 0
      iot-module/iot-module-manage/iot-module-manage-biz/pom.xml
  14. 16 0
      iot-module/iot-module-manage/iot-module-manage-biz/src/main/resources/bootstrap-test.yaml
  15. 1 1
      iot-module/iot-module-manage/iot-module-manage-biz/src/main/resources/bootstrap.yaml
  16. 2 2
      iot-module/iot-module-manage/iot-module-manage-biz/src/main/resources/logback-spring.xml
  17. 18 0
      iot-module/iot-module-system/iot-module-system-biz/pom.xml
  18. 16 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/resources/bootstrap-test.yaml
  19. 1 1
      iot-module/iot-module-system/iot-module-system-biz/src/main/resources/bootstrap.yaml
  20. 2 2
      iot-module/iot-module-system/iot-module-system-biz/src/main/resources/logback-spring.xml
  21. 1 0
      pom.xml

+ 19 - 0
iot-gateway/pom.xml

@@ -60,4 +60,23 @@
             <artifactId>spring-webmvc</artifactId>
         </dependency>
     </dependencies>
+
+    <build>
+        <!-- 设置构建的 jar 包名 -->
+        <plugins>
+            <!-- 打包 -->
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>${spring.boot.version}</version> <!-- 如果 spring.boot.version 版本修改,则这里也要跟着修改 -->
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
 </project>

+ 16 - 0
iot-gateway/src/main/resources/bootstrap-test.yaml

@@ -0,0 +1,16 @@
+spring:
+  cloud:
+    nacos:
+      server-addr: 10.10.10.224:8848
+      discovery:
+        namespace: iot
+      config:
+        server-addr: 10.10.10.224:8848 # Nacos 服务器地址
+        namespace: iot
+        group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+        name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
+        file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
+        shared-configs:
+          - data-id: common.yaml
+            group: common
+            refresh: true

+ 2 - 2
iot-gateway/src/main/resources/logback-spring.xml

@@ -157,7 +157,7 @@
 
     <!-- 4.1 开发环境:打印控制台-->
     <springProfile name="dev">
-        <root level="debug">
+        <root level="info">
             <appender-ref ref="CONSOLE"/>
             <appender-ref ref="DEBUG_FILE"/>
             <appender-ref ref="INFO_FILE"/>
@@ -167,7 +167,7 @@
     </springProfile>
     <!--  4.2 测试环境:输出到文档-->
     <springProfile name="test">
-        <root level="debug">
+        <root level="info">
             <appender-ref ref="CONSOLE"/>
             <appender-ref ref="DEBUG_FILE"/>
             <appender-ref ref="INFO_FILE"/>

+ 19 - 0
iot-module/iot-module-auth/iot-module-auth-biz/pom.xml

@@ -80,4 +80,23 @@
         </dependency>
 
     </dependencies>
+
+    <build>
+        <!-- 设置构建的 jar 包名 -->
+        <plugins>
+            <!-- 打包 -->
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>${spring.boot.version}</version> <!-- 如果 spring.boot.version 版本修改,则这里也要跟着修改 -->
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
 </project>

+ 1 - 1
iot-module/iot-module-auth/iot-module-auth-biz/src/main/java/com/middle/platform/auth/biz/service/AuthService.java

@@ -61,5 +61,5 @@ public class AuthService {
      */
     public void changeUse(SysUserFlag sysUserFlag) {
         userApi.changeUse(sysUserFlag);
-    }
+     }
 }

+ 16 - 0
iot-module/iot-module-auth/iot-module-auth-biz/src/main/resources/bootstrap-test.yaml

@@ -0,0 +1,16 @@
+spring:
+  cloud:
+    nacos:
+      server-addr: 10.10.10.224:8848
+      discovery:
+        namespace: iot
+      config:
+        server-addr: 10.10.10.224:8848 # Nacos 服务器地址
+        namespace: iot
+        group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+        name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
+        file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
+        shared-configs:
+          - data-id: common.yaml
+            group: common
+            refresh: true

+ 1 - 1
iot-module/iot-module-auth/iot-module-auth-biz/src/main/resources/bootstrap.yaml

@@ -1,5 +1,5 @@
 server:
-  port: 10000
+  port: 9001
 spring:
   application:
     name: iot-auth

+ 2 - 2
iot-module/iot-module-auth/iot-module-auth-biz/src/main/resources/logback-spring.xml

@@ -158,7 +158,7 @@
 
     <!-- 4.1 开发环境:打印控制台-->
     <springProfile name="dev">
-        <root level="debug">
+        <root level="info">
             <appender-ref ref="CONSOLE"/>
             <appender-ref ref="DEBUG_FILE"/>
             <appender-ref ref="INFO_FILE"/>
@@ -168,7 +168,7 @@
     </springProfile>
     <!--  4.2 测试环境:输出到文档-->
     <springProfile name="test">
-        <root level="debug">
+        <root level="info">
             <appender-ref ref="CONSOLE"/>
             <appender-ref ref="DEBUG_FILE"/>
             <appender-ref ref="INFO_FILE"/>

+ 18 - 0
iot-module/iot-module-data/iot-module-data-biz/pom.xml

@@ -74,4 +74,22 @@
         </dependency>
 
     </dependencies>
+    <build>
+        <!-- 设置构建的 jar 包名 -->
+        <plugins>
+            <!-- 打包 -->
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>${spring.boot.version}</version> <!-- 如果 spring.boot.version 版本修改,则这里也要跟着修改 -->
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
 </project>

+ 16 - 0
iot-module/iot-module-data/iot-module-data-biz/src/main/resources/bootstrap-test.yaml

@@ -0,0 +1,16 @@
+spring:
+  cloud:
+    nacos:
+      server-addr: 10.10.10.224:8848
+      discovery:
+        namespace: iot
+      config:
+        server-addr: 10.10.10.224:8848 # Nacos 服务器地址
+        namespace: iot
+        group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+        name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
+        file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
+        shared-configs:
+          - data-id: common.yaml
+            group: common
+            refresh: true

+ 1 - 1
iot-module/iot-module-data/iot-module-data-biz/src/main/resources/bootstrap.yaml

@@ -1,5 +1,5 @@
 server:
-  port: 10010
+  port: 9004
 spring:
   application:
     name: iot-data

+ 2 - 2
iot-module/iot-module-data/iot-module-data-biz/src/main/resources/logback-spring.xml

@@ -158,7 +158,7 @@
 
     <!-- 4.1 开发环境:打印控制台-->
     <springProfile name="dev">
-        <root level="debug">
+        <root level="info">
             <appender-ref ref="CONSOLE"/>
             <appender-ref ref="DEBUG_FILE"/>
             <appender-ref ref="INFO_FILE"/>
@@ -168,7 +168,7 @@
     </springProfile>
     <!--  4.2 测试环境:输出到文档-->
     <springProfile name="test">
-        <root level="debug">
+        <root level="info">
             <appender-ref ref="CONSOLE"/>
             <appender-ref ref="DEBUG_FILE"/>
             <appender-ref ref="INFO_FILE"/>

+ 18 - 0
iot-module/iot-module-manage/iot-module-manage-biz/pom.xml

@@ -75,4 +75,22 @@
             <artifactId>iot-module-manage-api</artifactId>
         </dependency>
     </dependencies>
+    <build>
+        <!-- 设置构建的 jar 包名 -->
+        <plugins>
+            <!-- 打包 -->
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>${spring.boot.version}</version> <!-- 如果 spring.boot.version 版本修改,则这里也要跟着修改 -->
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
 </project>

+ 16 - 0
iot-module/iot-module-manage/iot-module-manage-biz/src/main/resources/bootstrap-test.yaml

@@ -0,0 +1,16 @@
+spring:
+  cloud:
+    nacos:
+      server-addr: 10.10.10.224:8848
+      discovery:
+        namespace: iot
+      config:
+        server-addr: 10.10.10.224:8848 # Nacos 服务器地址
+        namespace: iot
+        group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+        name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
+        file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
+        shared-configs:
+          - data-id: common.yaml
+            group: common
+            refresh: true

+ 1 - 1
iot-module/iot-module-manage/iot-module-manage-biz/src/main/resources/bootstrap.yaml

@@ -1,5 +1,5 @@
 server:
-  port: 10020
+  port: 9003
 spring:
   application:
     name: iot-manage

+ 2 - 2
iot-module/iot-module-manage/iot-module-manage-biz/src/main/resources/logback-spring.xml

@@ -157,7 +157,7 @@
 
     <!-- 4.1 开发环境:打印控制台-->
     <springProfile name="dev">
-        <root level="debug">
+        <root level="info">
             <appender-ref ref="CONSOLE"/>
             <appender-ref ref="DEBUG_FILE"/>
             <appender-ref ref="INFO_FILE"/>
@@ -167,7 +167,7 @@
     </springProfile>
     <!--  4.2 测试环境:输出到文档-->
     <springProfile name="test">
-        <root level="debug">
+        <root level="info">
             <appender-ref ref="CONSOLE"/>
             <appender-ref ref="DEBUG_FILE"/>
             <appender-ref ref="INFO_FILE"/>

+ 18 - 0
iot-module/iot-module-system/iot-module-system-biz/pom.xml

@@ -63,4 +63,22 @@
             <artifactId>iot-module-system-api</artifactId>
         </dependency>
     </dependencies>
+    <build>
+        <!-- 设置构建的 jar 包名 -->
+        <plugins>
+            <!-- 打包 -->
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>${spring.boot.version}</version> <!-- 如果 spring.boot.version 版本修改,则这里也要跟着修改 -->
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
 </project>

+ 16 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/resources/bootstrap-test.yaml

@@ -0,0 +1,16 @@
+spring:
+  cloud:
+    nacos:
+      server-addr: 10.10.10.224:8848
+      discovery:
+        namespace: iot
+      config:
+        server-addr: 10.10.10.224:8848 # Nacos 服务器地址
+        namespace: iot
+        group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+        name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
+        file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
+        shared-configs:
+          - data-id: common.yaml
+            group: common
+            refresh: true

+ 1 - 1
iot-module/iot-module-system/iot-module-system-biz/src/main/resources/bootstrap.yaml

@@ -1,5 +1,5 @@
 server:
-  port: 10030
+  port: 9002
 spring:
   application:
     name: iot-system

+ 2 - 2
iot-module/iot-module-system/iot-module-system-biz/src/main/resources/logback-spring.xml

@@ -155,7 +155,7 @@
 
     <!-- 4.1 开发环境:打印控制台-->
     <springProfile name="dev">
-        <root level="debug">
+        <root level="info">
             <appender-ref ref="CONSOLE"/>
             <appender-ref ref="DEBUG_FILE"/>
             <appender-ref ref="INFO_FILE"/>
@@ -165,7 +165,7 @@
     </springProfile>
     <!--  4.2 测试环境:输出到文档-->
     <springProfile name="test">
-        <root level="debug">
+        <root level="info">
             <appender-ref ref="CONSOLE"/>
             <appender-ref ref="DEBUG_FILE"/>
             <appender-ref ref="INFO_FILE"/>

+ 1 - 0
pom.xml

@@ -17,6 +17,7 @@
         <maven.compiler.target>17</maven.compiler.target>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>
+        <spring.boot.version>3.1.4</spring.boot.version>
     </properties>
 
     <modules>