You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.0 KiB
33 lines
1.0 KiB
package com.example.sbcamel;
|
|
|
|
import java.io.File;
|
|
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.springframework.boot.SpringApplication;
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
|
|
|
|
@SpringBootApplication
|
|
@EnableEurekaServer
|
|
public class Boot {
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(Boot.class);
|
|
|
|
public static void main(String[] args) {
|
|
String configDirectory = "conf";
|
|
if (args.length > 0) {
|
|
configDirectory = args[0];
|
|
}
|
|
logger.info("config directory: {}", configDirectory);
|
|
|
|
if (new File(configDirectory).exists() && new File(configDirectory).isDirectory()) {
|
|
System.setProperty("spring.config.location", configDirectory + "/springboot.yml");
|
|
System.setProperty("logging.config", configDirectory + "/logback.xml");
|
|
}
|
|
System.setProperty("org.apache.activemq.SERIALIZABLE_PACKAGES", "*");
|
|
SpringApplication.run(Boot.class, args);
|
|
}
|
|
|
|
}
|