mirror of
https://github.com/WeiYe-Jing/datax-web.git
synced 2026-07-12 21:03:33 +08:00
commit
8b712ca847
@ -1,15 +1,34 @@
|
||||
package com.wugui.datax.admin;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.core.env.Environment;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
@EnableSwagger2
|
||||
@SpringBootApplication
|
||||
public class DataXAdminApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(DataXAdminApplication.class, args);
|
||||
private static Logger logger = LoggerFactory.getLogger(DataXAdminApplication.class);
|
||||
|
||||
public static void main(String[] args) throws UnknownHostException {
|
||||
Environment env = new SpringApplication(DataXAdminApplication.class).run(args).getEnvironment();
|
||||
String envPort = env.getProperty("server.port");
|
||||
String envContext = env.getProperty("server.contextPath");
|
||||
String port = envPort == null ? "8080" : envPort;
|
||||
String context = envContext == null ? "" : envContext;
|
||||
String path = port + "" + context + "/swagger-ui.html";
|
||||
logger.info(
|
||||
"Access URLs:\n----------------------------------------------------------\n\t"
|
||||
+ "Local: \t\thttp://127.0.0.1:{}\n\t"
|
||||
+ "External: \thttp://{}:{}\n----------------------------------------------------------",
|
||||
path,
|
||||
InetAddress.getLocalHost().getHostAddress(), path);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ public class DataXAdminConfig implements InitializingBean {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
public void afterPropertiesSet() {
|
||||
dataXAdminConfig =this;
|
||||
}
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ public class BaseForm<T> {
|
||||
/**
|
||||
* 查询参数对象
|
||||
*/
|
||||
protected Map<String, Object> values = new LinkedHashMap<String, Object>();
|
||||
protected Map<String, Object> values = new LinkedHashMap<>();
|
||||
|
||||
/**
|
||||
* 当前页码
|
||||
|
||||
@ -26,7 +26,7 @@ public class XxlJobAdminConfig implements InitializingBean {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
public void afterPropertiesSet() {
|
||||
adminConfig = this;
|
||||
}
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ public class XxlJobScheduler implements InitializingBean, DisposableBean {
|
||||
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
public void afterPropertiesSet() {
|
||||
// init i18n
|
||||
initI18n();
|
||||
|
||||
@ -116,7 +116,7 @@ public class XxlJobScheduler implements InitializingBean, DisposableBean {
|
||||
|
||||
// ---------------------- executor-client ----------------------
|
||||
private static ConcurrentMap<String, ExecutorBiz> executorBizRepository = new ConcurrentHashMap<String, ExecutorBiz>();
|
||||
public static ExecutorBiz getExecutorBiz(String address) throws Exception {
|
||||
public static ExecutorBiz getExecutorBiz(String address) {
|
||||
// valid
|
||||
if (address==null || address.trim().length()==0) {
|
||||
return null;
|
||||
|
||||
@ -4,7 +4,7 @@ spring:
|
||||
#数据源
|
||||
datasource:
|
||||
username: root
|
||||
password: root
|
||||
password: mysql
|
||||
url: jdbc:mysql://localhost:3306/datax_web?serverTimezone=Asia/Shanghai&useLegacyDatetimeCode=false&useSSL=false&nullNamePatternMatchesAll=true&useUnicode=true&characterEncoding=UTF-8
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
|
||||
|
||||
@ -166,6 +166,7 @@ CREATE TABLE `xxl_job_info` (
|
||||
`trigger_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '调度状态:0-停止,1-运行',
|
||||
`trigger_last_time` bigint(13) NOT NULL DEFAULT '0' COMMENT '上次调度时间',
|
||||
`trigger_next_time` bigint(13) NOT NULL DEFAULT '0' COMMENT '下次调度时间',
|
||||
`job_json` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT 'job任务的json结构'
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user