Ver Fonte

添加profile设置

syh há 5 anos atrás
pai
commit
2ee9f718d0

+ 26 - 0
xxl-job-executor/pom.xml

@@ -62,4 +62,30 @@
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>dev</id>
+            <properties>
+                <!-- 环境标识,需要与配置文件的名称相对应 -->
+                <activatedProperties>dev</activatedProperties>
+            </properties>
+            <activation>
+                <!-- 默认环境 -->
+                <activeByDefault>true</activeByDefault>
+            </activation>
+        </profile>
+        <profile>
+            <id>test</id>
+            <properties>
+                <activatedProperties>test</activatedProperties>
+            </properties>
+        </profile>
+        <profile>
+            <id>prod</id>
+            <properties>
+                <activatedProperties>prod</activatedProperties>
+            </properties>
+        </profile>
+    </profiles>
+
 </project>

+ 1 - 0
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedanceAdvertiserDailyReportLoadJob.java

@@ -33,6 +33,7 @@ public class BytedanceAdvertiserDailyReportLoadJob {
 
     @XxlJob("bytedanceAdvertiserDailyReport")
     public ReturnT<String> execute(String params) throws Exception {
+        log.info("头条广告主日报获取任务执行开始");
         Date getDate = DateUtils.addDay(new Date(), -1);
         //1:查询当日数据
         List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE);

+ 3 - 4
xxl-job-executor/src/main/resources/application.yml

@@ -2,8 +2,7 @@ server:
   port: 8091
 spring:
   profiles:
-    #    active: @activatedProperties@
-    active: prod
+    active: @activatedProperties@
 # log config
 logging:
   config: classpath:logback.xml
@@ -12,10 +11,10 @@ xxl:
   job:
     accessToken:
     executor:
-      appname: xxl-job-executor-sample
+      appname: xxl-job-executor
       port: 9998
       ip:
       logpath: /data/applogs/xxl-job/jobhandler
       logretentiondays: 30
     admin:
-      addresses: http://127.0.0.1:8090/xxl-job-admin
+      addresses: http://39.106.184.70:8090/xxl-job-admin