Redeem 18 timmar sedan
förälder
incheckning
38681a4b2f

+ 21 - 0
pom.xml

@@ -22,6 +22,14 @@
     <build>
         <!--自运行 -->
         <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <excludes>
+                    <!-- 排除这两个配置文件 -->
+                    <exclude>application.properties</exclude>
+                    <exclude>application-prod.properties</exclude>
+                </excludes>
+            </resource>
             <resource>
                 <directory>src/main/java</directory>
                 <includes>
@@ -113,6 +121,19 @@
                     <encoding>${project.build.sourceEncoding}</encoding>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <excludes>
+                        <!-- 排除 classes 目录下的这两个配置文件 -->
+                        <exclude>**/application.properties</exclude>
+                        <exclude>**/application-prod.properties</exclude>
+                        <exclude>**/application-dev.properties</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+
         </plugins>
         <pluginManagement>
             <plugins>

+ 1 - 1
src/main/java/com/steerinfo/SysManageApplication.java

@@ -57,7 +57,7 @@ public class SysManageApplication implements WebMvcConfigurer {
 
             long endTime = System.currentTimeMillis();
             float excTime = (float) (endTime - startTime) / 1000;
-            //system.out.println("====================================>执行时间:" + excTime + "s");
+            System.out.println("====================================>执行时间:" + excTime + "s");
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 6 - 0
src/main/java/com/steerinfo/abnormalHandler/controller/StatusSyncController.java

@@ -3,6 +3,7 @@ package com.steerinfo.abnormalHandler.controller;
 import com.steerinfo.abnormalHandler.service.StatusSyncService;
 import com.steerinfo.framework.controller.BaseRESTfulController;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
@@ -18,4 +19,9 @@ public class StatusSyncController extends BaseRESTfulController {
     public void syncStatus() {
         statusSyncService.doSync();
     }
+
+    @GetMapping("testStatus")
+    public int testStatus() {
+        return 1;
+    }
 }

+ 1 - 1
src/main/resources/application-dev.properties

@@ -1,4 +1,4 @@
-server.port=9004
+server.port=9005
 #\u5FAE\u670D\u52A1\u7AEF\u53E3
 spring.jmx.default-domain=project1
 #\u6307\u5B9A\u7248\u672C

+ 3 - 3
src/main/resources/application-prod.properties

@@ -1,4 +1,4 @@
-server.port=9004
+server.port=9005
 #\u5FAE\u670D\u52A1\u7AEF\u53E3
 spring.jmx.default-domain=project1
 #\u6307\u5B9A\u7248\u672C
@@ -86,8 +86,8 @@ multiple.datasource.master.password=lims_2021
 #multiple.datasource.master.username=lims
 #multiple.datasource.master.password=lims_2021
 
-multiple.datasource.master.initial-size=50
-multiple.datasource.master.min-idle=50
+multiple.datasource.master.initial-size=20
+multiple.datasource.master.min-idle=20
 multiple.datasource.master.maxActive=75
 multiple.datasource.master.maxWait=30000
 multiple.datasource.master.timeBetweenEvictionRunsMillis=60000

+ 2 - 2
src/main/resources/application.properties

@@ -81,8 +81,8 @@ multiple.datasource.master.password=lims_2021
 #multiple.datasource.master.username=lims
 #multiple.datasource.master.password=lims_2021
 
-multiple.datasource.master.initial-size=50
-multiple.datasource.master.min-idle=50
+multiple.datasource.master.initial-size=20
+multiple.datasource.master.min-idle=20
 multiple.datasource.master.maxActive=75
 multiple.datasource.master.maxWait=30000
 multiple.datasource.master.timeBetweenEvictionRunsMillis=60000

+ 13 - 19
src/main/resources/bootstrap.yml

@@ -1,20 +1,18 @@
 spring:
   application:
-    name: system-pass
+    name: jg_wzjl_scheduled_job
   profiles:
     active: ${SPRING_PROFILES:prod}
-#  zipkin:
-#    base-url: http://${ZIPKIN_HOST:localhost}:9411 #2021年10月20日注释
   sleuth:
     sampler:
       #默认值为0.1f,现在为了测试设置100%采集
-      percentage: 1.0      
-#  cloud:
-#    config:
-#      fail-fast: true
-#      discovery:
-#        enabled: true
-#        service-id: config-server
+      percentage: 1.0
+  cloud:
+    config:
+      #      fail-fast: true
+      discovery:
+        enabled: true
+        service-id: config-server
     bus:
       trace:
         enabled: false # 2021年9月10日取消springcloud中bus总线服务
@@ -23,27 +21,23 @@ server:
   port: ${SERVER_PORT:9005}
 eureka:
   client:
-    fetch-registry: false # 取消从注册中心获取服务信息
-    register-with-eureka: false # 取消注册服务到注册中心
     serviceUrl:
       defaultZone: http://root:root@${EUREKA_HOST:localhost}:${EUREKA_PORT:8061}/eureka/
     metadata-map:
       cluster: ribbon
   instance:
-    hostname: system-base-pass
+    hostname: jg_wzjl_scheduled_job
     status-page-url: http://${SWAGGER_INDEX:localhost:9002}/swagger-ui.html
     prefer-ip-address: true
     instance-id: ${spring.cloud.client.ip-address}:${server.port}
 #禁止调用eureka client获取注册列表信息
 ribbon:
   eureka:
-    enabled: false # 2021年9月10日取消注册服务到注册中心
+    enabled: true # 2021年9月10日取消注册服务到注册中心
 #新版配置,否则后面dashboard无法找到hystrix.stream
 management:
-  endpoints:
-    web:
-      exposure:
-        include: '*'
+  server:
+    port: -1
 meter:
   sync:
-    enabled: true
+    enabled: false