feat:2.5.0
1. 支持服务端jar包作为子服务启动
This commit is contained in:
parent
5acd511187
commit
51b82286ea
@ -1,7 +1,10 @@
|
|||||||
package com.aizuda.easy.retry.server.common.config;
|
package com.aizuda.easy.retry.server.common.config;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.scheduling.TaskScheduler;
|
||||||
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* web访问模块
|
* web访问模块
|
||||||
@ -14,4 +17,11 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
@ComponentScan("com.aizuda.easy.retry.server.common.*")
|
@ComponentScan("com.aizuda.easy.retry.server.common.*")
|
||||||
public class EasyRetryServerCommonAutoConfiguration {
|
public class EasyRetryServerCommonAutoConfiguration {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public TaskScheduler scheduledExecutorService() {
|
||||||
|
ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
|
||||||
|
scheduler.setPoolSize(4);
|
||||||
|
scheduler.setThreadNamePrefix("easy-retry-scheduled-thread-");
|
||||||
|
return scheduler;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ import org.springframework.boot.autoconfigure.web.ServerProperties;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.ScheduledExecutorService;
|
import java.util.concurrent.ScheduledExecutorService;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@ -67,7 +68,7 @@ public class ServerRegister extends AbstractRegister {
|
|||||||
context.setHostId(CURRENT_CID);
|
context.setHostId(CURRENT_CID);
|
||||||
context.setHostIp(HostUtils.getIp());
|
context.setHostIp(HostUtils.getIp());
|
||||||
context.setHostPort(systemProperties.getNettyPort());
|
context.setHostPort(systemProperties.getNettyPort());
|
||||||
context.setContextPath(serverProperties.getServlet().getContextPath());
|
context.setContextPath(Optional.ofNullable(serverProperties.getServlet().getContextPath()).orElse(StrUtil.EMPTY));
|
||||||
context.setNamespaceId(NAMESPACE_ID);
|
context.setNamespaceId(NAMESPACE_ID);
|
||||||
context.setExtAttrs(JsonUtil.toJsonString(serverNodeExtAttrs));
|
context.setExtAttrs(JsonUtil.toJsonString(serverNodeExtAttrs));
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,25 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<finalName>easy-retry-server-starter</finalName>
|
<finalName>easy-retry-server</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<mainClass>com.aizuda.easy.retry.server.EasyRetryServerApplication</mainClass>
|
||||||
|
<classifier>exec</classifier>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>build-info</goal>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
@ -7,8 +7,6 @@ import org.springframework.boot.SpringApplication;
|
|||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
|
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.scheduling.TaskScheduler;
|
|
||||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
|
||||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||||
|
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
@ -19,14 +17,6 @@ import java.util.concurrent.TimeUnit;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class EasyRetryServerApplication {
|
public class EasyRetryServerApplication {
|
||||||
|
|
||||||
@Bean
|
|
||||||
public TaskScheduler scheduledExecutorService() {
|
|
||||||
ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
|
|
||||||
scheduler.setPoolSize(2);
|
|
||||||
scheduler.setThreadNamePrefix("easy-retry-scheduled-thread-");
|
|
||||||
return scheduler;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
|
TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
|
||||||
SpringApplication.run(EasyRetryServerApplication.class, args);
|
SpringApplication.run(EasyRetryServerApplication.class, args);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.aizuda.easy.retry.server.common.listener;
|
package com.aizuda.easy.retry.server.starter.listener;
|
||||||
|
|
||||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||||
import com.aizuda.easy.retry.server.common.Lifecycle;
|
import com.aizuda.easy.retry.server.common.Lifecycle;
|
@ -1,4 +1,4 @@
|
|||||||
package com.aizuda.easy.retry.server.common.listener;
|
package com.aizuda.easy.retry.server.starter.listener;
|
||||||
|
|
||||||
import com.aizuda.easy.retry.common.core.constant.SystemConstants;
|
import com.aizuda.easy.retry.common.core.constant.SystemConstants;
|
||||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
|||||||
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0aa660"],{"119c":function(t,a,e){"use strict";e.r(a);e("ac1f"),e("5319"),e("b0c0");var o=function(){var t=this,a=this,e=a._self._c;return e("div",[a.showHeader?e("page-header-wrapper",{staticStyle:{margin:"-24px -1px 0"},on:{back:function(){return a.$router.replace("/job/batch/list")}}},[e("div")]):a._e(),null!==a.jobBatchInfo?e("a-card",{attrs:{bordered:!1}},[e("a-descriptions",{attrs:{title:"",column:a.column,bordered:""}},[e("a-descriptions-item",{attrs:{label:"组名称"}},[a._v(" "+a._s(a.jobBatchInfo.groupName)+" ")]),e("a-descriptions-item",{attrs:{label:"任务名称"}},[a._v(" "+a._s(a.jobBatchInfo.jobName)+" ")]),e("a-descriptions-item",{attrs:{label:"状态"}},[e("a-tag",{attrs:{color:a.taskBatchStatus[a.jobBatchInfo.taskBatchStatus].color}},[a._v(" "+a._s(a.taskBatchStatus[a.jobBatchInfo.taskBatchStatus].name)+" ")])],1),e("a-descriptions-item",{attrs:{label:"执行器类型"}},[e("a-tag",{attrs:{color:a.executorType[a.jobBatchInfo.executorType].color}},[a._v(" "+a._s(a.executorType[a.jobBatchInfo.executorType].name)+" ")])],1),e("a-descriptions-item",{attrs:{label:"操作原因"}},[e("a-tag",{attrs:{color:a.operationReason[a.jobBatchInfo.operationReason].color}},[a._v(" "+a._s(a.operationReason[a.jobBatchInfo.operationReason].name)+" ")])],1),e("a-descriptions-item",{attrs:{label:"开始执行时间"}},[a._v(" "+a._s(a.jobBatchInfo.executionAt)+" ")]),e("a-descriptions-item",{attrs:{label:"执行器名称",span:"4"}},[a._v(" "+a._s(a.jobBatchInfo.executorInfo)+" ")]),e("a-descriptions-item",{attrs:{label:"创建时间"}},[a._v(" "+a._s(a.jobBatchInfo.createDt)+" ")])],1)],1):a._e(),e("div",{staticStyle:{margin:"20px 0","border-left":"#f5222d 5px solid","font-size":"medium","font-weight":"bold"}},[e("span",{staticStyle:{"padding-left":"18px"}},[a._v("任务项列表")]),e("span",{staticStyle:{"padding-left":"18px"}},[e("a-icon",{attrs:{type:"sync"},on:{click:function(){return t.$refs.JobTaskListRef.refreshTable(t.queryParam)}}})],1)]),e("JobTaskList",{ref:"JobTaskListRef"})],1)},r=[],s=(e("a9e3"),e("3b7a")),n=e("c1df"),c=e.n(n),i=e("38b7"),p=e.n(i),u=e("36e8"),l={name:"JobInfo",components:{JobTaskList:u["default"]},props:{showHeader:{type:Boolean,default:!0},column:{type:Number,default:3}},data:function(){return{jobBatchInfo:null,taskBatchStatus:p.a.taskBatchStatus,operationReason:p.a.operationReason,taskType:p.a.taskType,triggerType:p.a.triggerType,blockStrategy:p.a.blockStrategy,executorType:p.a.executorType,queryParam:{}}},created:function(){var t=this.$route.query.id,a=this.$route.query.groupName;t&&a?this.jobBatchDetail(t):this.showHeader&&this.$router.push({path:"/404"})},methods:{parseDate:function(t){return c()(t).format("YYYY-MM-DD HH:mm:ss")},jobBatchDetail:function(t){var a=this;Object(s["d"])(t).then((function(e){a.jobBatchInfo=e.data,a.queryParam={groupName:a.jobBatchInfo.groupName,taskBatchId:t},a.$refs.JobTaskListRef.refreshTable(a.queryParam)}))}}},b=l,f=e("2877"),d=Object(f["a"])(b,o,r,!1,null,"aa07bd40",null);a["default"]=d.exports}}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
|||||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-40597980"],{"00d8":function(e,r){(function(){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(e,r){return e<<r|e>>>32-r},rotr:function(e,r){return e<<32-r|e>>>r},endian:function(e){if(e.constructor==Number)return 16711935&t.rotl(e,8)|4278255360&t.rotl(e,24);for(var r=0;r<e.length;r++)e[r]=t.endian(e[r]);return e},randomBytes:function(e){for(var r=[];e>0;e--)r.push(Math.floor(256*Math.random()));return r},bytesToWords:function(e){for(var r=[],t=0,n=0;t<e.length;t++,n+=8)r[n>>>5]|=e[t]<<24-n%32;return r},wordsToBytes:function(e){for(var r=[],t=0;t<32*e.length;t+=8)r.push(e[t>>>5]>>>24-t%32&255);return r},bytesToHex:function(e){for(var r=[],t=0;t<e.length;t++)r.push((e[t]>>>4).toString(16)),r.push((15&e[t]).toString(16));return r.join("")},hexToBytes:function(e){for(var r=[],t=0;t<e.length;t+=2)r.push(parseInt(e.substr(t,2),16));return r},bytesToBase64:function(e){for(var t=[],n=0;n<e.length;n+=3)for(var a=e[n]<<16|e[n+1]<<8|e[n+2],o=0;o<4;o++)8*n+6*o<=8*e.length?t.push(r.charAt(a>>>6*(3-o)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,a=0;n<e.length;a=++n%4)0!=a&&t.push((r.indexOf(e.charAt(n-1))&Math.pow(2,-2*a+8)-1)<<2*a|r.indexOf(e.charAt(n))>>>6-2*a);return t}};e.exports=t})()},"044b":function(e,r){function t(e){return!!e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function n(e){return"function"===typeof e.readFloatLE&&"function"===typeof e.slice&&t(e.slice(0,0))}
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d8216538"],{"00d8":function(e,r){(function(){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(e,r){return e<<r|e>>>32-r},rotr:function(e,r){return e<<32-r|e>>>r},endian:function(e){if(e.constructor==Number)return 16711935&t.rotl(e,8)|4278255360&t.rotl(e,24);for(var r=0;r<e.length;r++)e[r]=t.endian(e[r]);return e},randomBytes:function(e){for(var r=[];e>0;e--)r.push(Math.floor(256*Math.random()));return r},bytesToWords:function(e){for(var r=[],t=0,n=0;t<e.length;t++,n+=8)r[n>>>5]|=e[t]<<24-n%32;return r},wordsToBytes:function(e){for(var r=[],t=0;t<32*e.length;t+=8)r.push(e[t>>>5]>>>24-t%32&255);return r},bytesToHex:function(e){for(var r=[],t=0;t<e.length;t++)r.push((e[t]>>>4).toString(16)),r.push((15&e[t]).toString(16));return r.join("")},hexToBytes:function(e){for(var r=[],t=0;t<e.length;t+=2)r.push(parseInt(e.substr(t,2),16));return r},bytesToBase64:function(e){for(var t=[],n=0;n<e.length;n+=3)for(var a=e[n]<<16|e[n+1]<<8|e[n+2],o=0;o<4;o++)8*n+6*o<=8*e.length?t.push(r.charAt(a>>>6*(3-o)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,a=0;n<e.length;a=++n%4)0!=a&&t.push((r.indexOf(e.charAt(n-1))&Math.pow(2,-2*a+8)-1)<<2*a|r.indexOf(e.charAt(n))>>>6-2*a);return t}};e.exports=t})()},"044b":function(e,r){function t(e){return!!e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function n(e){return"function"===typeof e.readFloatLE&&"function"===typeof e.slice&&t(e.slice(0,0))}
|
||||||
/*!
|
/*!
|
||||||
* Determine if an object is a Buffer
|
* Determine if an object is a Buffer
|
||||||
*
|
*
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user