이준호 문자온 커밋 - globals_local.properties db 접속 정보 수정 - mainPage.jsp httpredirect 함수 조건 변경
- globals_local.properties db 접속 정보 수정 - mainPage.jsp httpredirect 함수 조건 변경
@6193b8dab55aa34676ec386cbf2d0defbb67b8a1
--- src/main/resources/egovframework/egovProps/globals_local.properties
+++ src/main/resources/egovframework/egovProps/globals_local.properties
... | ... | @@ -28,7 +28,8 @@ |
| 28 | 28 |
|
| 29 | 29 |
# mysql |
| 30 | 30 |
Globals.DriverClassName=com.mysql.jdbc.Driver |
| 31 |
-Globals.Url=jdbc:mysql://192.168.0.125:3306/mjon |
|
| 31 |
+#Globals.Url=jdbc:mysql://192.168.0.125:3306/mjon |
|
| 32 |
+Globals.Url=jdbc:mysql://119.193.215.98:3306/mjon |
|
| 32 | 33 |
Globals.UserName= mjonUr |
| 33 | 34 |
#Globals.Url=jdbc:mysql://192.168.0.125:3306/mjon_20230221 |
| 34 | 35 |
#Globals.UserName= mjonUr_20230221 |
--- src/main/resources/egovframework/spring/com/context-datasource.xml
+++ src/main/resources/egovframework/spring/com/context-datasource.xml
... | ... | @@ -1,6 +1,9 @@ |
| 1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 | 2 |
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 3 |
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd"> |
|
| 3 |
+ xmlns:util="http://www.springframework.org/schema/util" |
|
| 4 |
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd |
|
| 5 |
+ http://www.springframework.org/schema/util |
|
| 6 |
+ http://www.springframework.org/schema/util/spring-util-4.0.xsd"> |
|
| 4 | 7 |
|
| 5 | 8 |
<!-- 환경설정 기본정보를 globals.properties 에서 참조하도록 propertyConfigurer 설정 --> |
| 6 | 9 |
<bean id="propertyConfigurer" |
... | ... | @@ -11,6 +14,7 @@ |
| 11 | 14 |
</list> |
| 12 | 15 |
</property> |
| 13 | 16 |
</bean> |
| 17 |
+ <util:properties id="property" location="classpath:/egovframework/egovProps/globals_#{systemProperties['spring.profiles.active']}.properties" />
|
|
| 14 | 18 |
|
| 15 | 19 |
<!-- datasource 설정(propertyConfigurer 활용) --> |
| 16 | 20 |
<alias name="dataSource-${Globals.DbType}" alias="dataSource" />
|
--- src/main/webapp/WEB-INF/jsp/web/main/mainPage.jsp
+++ src/main/webapp/WEB-INF/jsp/web/main/mainPage.jsp
... | ... | @@ -1,6 +1,8 @@ |
| 1 | 1 |
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> |
| 2 | 2 |
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> |
| 3 | 3 |
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> |
| 4 |
+<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> |
|
| 5 |
+<spring:eval expression="@property['Globals.Env']" var="Env"/> |
|
| 4 | 6 |
<head> |
| 5 | 7 |
|
| 6 | 8 |
<link rel="stylesheet" href="/publish/css/main.css"> |
... | ... | @@ -15,8 +17,10 @@ |
| 15 | 17 |
|
| 16 | 18 |
$(document).ready(function() {
|
| 17 | 19 |
// http => https 로 이동 |
| 18 |
- httpsRedirect(); |
|
| 19 |
- |
|
| 20 |
+ if(${Env eq 'prod'}){
|
|
| 21 |
+ httpsRedirect(); |
|
| 22 |
+ } |
|
| 23 |
+ |
|
| 20 | 24 |
// 슬라이드 이미지 변경 |
| 21 | 25 |
//setMainSlideImgChange(); |
| 22 | 26 |
|
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?