diff --git a/src/main/java/cokr/xit/fims/FimsApplication.java b/src/main/java/cokr/xit/fims/FimsApplication.java index ebcff3ae..ea094904 100644 --- a/src/main/java/cokr/xit/fims/FimsApplication.java +++ b/src/main/java/cokr/xit/fims/FimsApplication.java @@ -1,13 +1,30 @@ package cokr.xit.fims; +import java.io.InputStream; +import java.util.Properties; + import org.springframework.boot.SpringApplication; import org.springframework.context.annotation.ImportResource; +import org.springframework.core.io.ClassPathResource; import cokr.xit.base.boot.XitBaseApplication; @ImportResource("classpath:spring/context-*.xml") public class FimsApplication extends XitBaseApplication { + public static void main(String[] args) { + SpringApplication.run(FimsApplication.class, args); + + Properties properties = new Properties(); + try { + InputStream In = new ClassPathResource("intf-conf/server-info.properties").getInputStream(); + properties.load(In); + System.setProperty("sggCd", properties.getProperty("serverSggCd")); + System.setProperty("instCd", properties.getProperty("serverInstCd")); + + } catch (Exception e) { + throw new RuntimeException("서버정보 로드 오류"); + } } } diff --git a/src/main/resources/intf-conf/server-info.properties b/src/main/resources/intf-conf/server-info.properties new file mode 100644 index 00000000..0f768a90 --- /dev/null +++ b/src/main/resources/intf-conf/server-info.properties @@ -0,0 +1,4 @@ +#서버시군구코드 +serverSggCd=41480 +#서버기관코드 +serverInstCd=4060000 \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/login.jsp b/src/main/webapp/WEB-INF/jsp/login.jsp index b6c07dda..93e77023 100644 --- a/src/main/webapp/WEB-INF/jsp/login.jsp +++ b/src/main/webapp/WEB-INF/jsp/login.jsp @@ -1,5 +1,6 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> <%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> +<% String systemInst = System.getProperty("instCd") != null ? System.getProperty("instCd") : ""; %> "+INST_LIST[i].INST_NM+""; } $("#institute").append(options); - $("#institute").val("4060000"); + + $("#institute").val(<%= systemInst %>); } }); });