no message

main
이범준 4 months ago
parent 298d59213b
commit 3647c9907f

@ -20,6 +20,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>17</java.version>
<sgg>10000</sgg>
</properties>
<repositories>
@ -75,8 +76,15 @@
<artifactId>fims-java</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
<dependency>
<groupId>cokr.xit.app</groupId>
<artifactId>sgg-setting</artifactId>
<version>${sgg}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>

@ -1,5 +1,12 @@
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.autoconfigure.ImportAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
@ -15,12 +22,29 @@ import cokr.xit.fims.task.TaskMvcConfig;
public class FimsApplication extends XitBaseApplication {
public static void main(String[] args) {
String sysSgg = System.getProperty("sgg.active");
if(sysSgg == null || sysSgg.equals("")) {
System.out.println("시군구 설정 없음");
return;
try {
Enumeration<URL> resources = FimsApplication.class.getClassLoader()
.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);
}
}

Loading…
Cancel
Save