설정 수정
parent
e73780b13b
commit
b74b5b154a
@ -1,49 +1,33 @@
|
||||
package cokr.xit.fims;
|
||||
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.Enumeration;
|
||||
import java.util.jar.Attributes;
|
||||
import java.util.jar.Manifest;
|
||||
import java.io.InputStreamReader;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.ImportResource;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
|
||||
import cokr.xit.base.ServletCustomizer;
|
||||
import cokr.xit.base.boot.XitBaseApplication;
|
||||
import cokr.xit.fims.task.TaskMvcConfig;
|
||||
import cork.xit.fims.SpringBootApplicationBridge;
|
||||
|
||||
@ImportAutoConfiguration({ServletCustomizer.class, TaskMvcConfig.class})
|
||||
@ImportResource("classpath:spring/context-*.xml")
|
||||
@ImportAutoConfiguration({ServletCustomizer.class,TaskMvcConfig.class})
|
||||
@ComponentScan(basePackageClasses = cokr.xit.applib.HttpStatusCodeExceptionControllerAdvice.class)
|
||||
public class FimsApplication extends XitBaseApplication {
|
||||
public class FimsApplication extends SpringBootApplicationBridge {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
try {
|
||||
Enumeration<URL> resources = FimsApplication.class.getClassLoader()
|
||||
.getResources("META-INF/MANIFEST.MF");
|
||||
|
||||
while (resources.hasMoreElements()) {
|
||||
URL e = resources.nextElement();
|
||||
String path = e.getPath();
|
||||
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;
|
||||
}
|
||||
}
|
||||
BufferedReader in = new BufferedReader(new InputStreamReader(new ClassPathResource("sgg.txt").getInputStream()));
|
||||
String sgg = in.readLine();
|
||||
System.setProperty("sgg", sgg);
|
||||
in.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
SpringApplication.run(FimsApplication.class, args);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue