WAS서버 기관코드 테스트

main
이범준 11 months ago
parent ac4c5a9571
commit 8574c000eb

@ -1,13 +1,30 @@
package cokr.xit.fims; package cokr.xit.fims;
import java.io.InputStream;
import java.util.Properties;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.context.annotation.ImportResource; import org.springframework.context.annotation.ImportResource;
import org.springframework.core.io.ClassPathResource;
import cokr.xit.base.boot.XitBaseApplication; import cokr.xit.base.boot.XitBaseApplication;
@ImportResource("classpath:spring/context-*.xml") @ImportResource("classpath:spring/context-*.xml")
public class FimsApplication extends XitBaseApplication { public class FimsApplication extends XitBaseApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(FimsApplication.class, 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("서버정보 로드 오류");
}
} }
} }

@ -0,0 +1,4 @@
#서버시군구코드
serverSggCd=41480
#서버기관코드
serverInstCd=4060000

@ -1,5 +1,6 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> <%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<% String systemInst = System.getProperty("instCd") != null ? System.getProperty("instCd") : ""; %>
<!DOCTYPE html> <!DOCTYPE html>
<html <html
lang="kr" lang="kr"
@ -190,7 +191,8 @@ $(function(){
options += "<option value='"+INST_LIST[i].INST_CD+"'>"+INST_LIST[i].INST_NM+"</option>"; options += "<option value='"+INST_LIST[i].INST_CD+"'>"+INST_LIST[i].INST_NM+"</option>";
} }
$("#institute").append(options); $("#institute").append(options);
$("#institute").val("4060000");
$("#institute").val(<%= systemInst %>);
} }
}); });
}); });

Loading…
Cancel
Save