This commit is contained in:
water 2019-11-21 19:41:46 +08:00
parent 88166bf3cf
commit e834f55e22
5 changed files with 26 additions and 7 deletions

View File

@ -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);
}

View File

@ -24,7 +24,7 @@ public class DataXAdminConfig implements InitializingBean {
}
@Override
public void afterPropertiesSet() throws Exception {
public void afterPropertiesSet() {
dataXAdminConfig =this;
}

View File

@ -26,7 +26,7 @@ public class BaseForm<T> {
/**
* 查询参数对象
*/
protected Map<String, Object> values = new LinkedHashMap<String, Object>();
protected Map<String, Object> values = new LinkedHashMap<>();
/**
* 当前页码

View File

@ -26,7 +26,7 @@ public class XxlJobAdminConfig implements InitializingBean {
}
@Override
public void afterPropertiesSet() throws Exception {
public void afterPropertiesSet() {
adminConfig = this;
}

View File

@ -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;