From 8574c000eb83e496e6503a27b7614daf0937dcb4 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Wed, 27 Dec 2023 17:19:26 +0900 Subject: [PATCH] =?UTF-8?q?WAS=EC=84=9C=EB=B2=84=20=EA=B8=B0=EA=B4=80?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cokr/xit/fims/FimsApplication.java | 17 +++++++++++++++++ .../resources/intf-conf/server-info.properties | 4 ++++ src/main/webapp/WEB-INF/jsp/login.jsp | 4 +++- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/intf-conf/server-info.properties 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 %>); } }); });