no message

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

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

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

Loading…
Cancel
Save