|
|
@ -1,5 +1,12 @@
|
|
|
|
package cokr.xit.fims;
|
|
|
|
package cokr.xit.fims;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
|
|
|
import java.net.URL;
|
|
|
|
|
|
|
|
import java.util.Enumeration;
|
|
|
|
|
|
|
|
import java.util.jar.Attributes;
|
|
|
|
|
|
|
|
import java.util.jar.Manifest;
|
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
|
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
|
|
|
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
|
|
|
import org.springframework.context.annotation.ComponentScan;
|
|
|
|
import org.springframework.context.annotation.ComponentScan;
|
|
|
@ -15,12 +22,29 @@ import cokr.xit.fims.task.TaskMvcConfig;
|
|
|
|
public class FimsApplication extends XitBaseApplication {
|
|
|
|
public class FimsApplication extends XitBaseApplication {
|
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
public static void main(String[] args) {
|
|
|
|
String sysSgg = System.getProperty("sgg.active");
|
|
|
|
|
|
|
|
if(sysSgg == null || sysSgg.equals("")) {
|
|
|
|
try {
|
|
|
|
System.out.println("시군구 설정 없음");
|
|
|
|
Enumeration<URL> resources = FimsApplication.class.getClassLoader()
|
|
|
|
return;
|
|
|
|
.getResources("META-INF/MANIFEST.MF");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while (resources.hasMoreElements()) {
|
|
|
|
|
|
|
|
URL e = resources.nextElement();
|
|
|
|
|
|
|
|
String path = e.getPath();
|
|
|
|
|
|
|
|
System.out.println(path);
|
|
|
|
|
|
|
|
if(path.indexOf("sgg-setting") != -1) {
|
|
|
|
|
|
|
|
Manifest m = new Manifest(e.openStream());
|
|
|
|
|
|
|
|
Attributes as = m.getMainAttributes();
|
|
|
|
|
|
|
|
String sgg = as.getValue("sgg");
|
|
|
|
|
|
|
|
System.setProperty("sgg", sgg);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
SpringApplication.run(FimsApplication.class, args);
|
|
|
|
SpringApplication.run(FimsApplication.class, args);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|