JEJE165
70
2021-09-24 17:04:00
3
142

전자정부프레임워크 오류 질문이요..


전자정부프레임워크와 db를 연동하려는데 계속 오류가 나네요..ㅜㅜ 오늘 하루종일 찾아봤는데도 도무지 답이 안나오네요.. 답답해 미칠것 같습니다.. 도대체 뭐때문에 서버조차 띄우는게 안되는지 모르겠습니다..

고수님들의 답변을 간절히 기다립니다..ㅜㅜ 도와주세요..

아래는 에러 로그입니다.

2021-09-24 16:04:41,921 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cmmUseDAO': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'egov.sqlMapClient' defined in file [C:\DLCC_TEST\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\powerservice\WEB-INF\classes\egovframework\spring\com\context-sqlMap.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: file [C:\DLCC_TEST\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\powerservice\WEB-INF\classes\egovframework\sqlmap\config\DMLIFE\DMLIFE.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: java.io.IOException: Could not find resource egovframework/mapper/com/DMLIFE/ctiMap.xml
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:307) ~[spring-context-3.2.9.RELEASE.jar:3.2.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1146) ~[spring-beans-3.2.9.RELEASE.jar:3.2.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) ~[spring-beans-3.2.9.RELEASE.jar:3.2.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) ~[spring-beans-3.2.9.RELEASE.jar:3.2.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296) ~[spring-beans-3.2.9.RELEASE.jar:3.2.9.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) ~[spring-beans-3.2.9.RELEASE.jar:3.2.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293) ~[spring-beans-3.2.9.RELEASE.jar:3.2.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) ~[spring-beans-3.2.9.RELEASE.jar:3.2.9.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:633) ~[spring-beans-3.2.9.RELEASE.jar:3.2.9.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) ~[spring-context-3.2.9.RELEASE.jar:3.2.9.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) ~[spring-context-3.2.9.RELEASE.jar:3.2.9.RELEASE]
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410) ~[spring-web-3.2.9.RELEASE.jar:3.2.9.RELEASE]
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) [spring-web-3.2.9.RELEASE.jar:3.2.9.RELEASE]
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) [spring-web-3.2.9.RELEASE.jar:3.2.9.RELEASE]
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016) [catalina.jar:7.0.59]
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524) [catalina.jar:7.0.59]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.59]
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575) [catalina.jar:7.0.59]
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565) [catalina.jar:7.0.59]
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [?:1.7.0_21]
	at java.util.concurrent.FutureTask.run(FutureTask.java:166) [?:1.7.0_21]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_21]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_21]
	at java.lang.Thread.run(Thread.java:722) [?:1.7.0_21]


C:\DLCC_TEST\powerservice\src\main\resources\egovframework\mapper\com\DMLIFE
ctiMap.xml 입니다.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="ctiMap">
    
    <update id="ctiMap.insertinfoData" parameterType="java.util.List">
        MERGE INTO TB_CTI_MAIN_INFO
		USING DUAL
		ON (AGDT = #{AGDT} AND AGGR = #{AGGR} AND 
		    AGPA = #{AGPA} AND AGEN = #{AGEN} AND 
		    AGNA = #{AGNA})
		WHEN MATCHED  THEN
		UPDATE SET TOCA = #{TOCA}
				   , NOIC = #{NOIC}
				   , NOOC = #{NOOC}
				   , TOTT = #{TOTT}
				   , TTIC = #{TTIC}
				   , TTOC = #{TTOC}
				   , RGCT = #{RGCT}
				   , RGDT = #{RGDT}
				   , NOBU = #{NOBU}
				   , BUST = #{BUST}
				   , NOAC = #{NOAC}
				   , ACWT = #{ACWT}
				   , NONR = #{NONR}
				   , NRDT = #{NRDT}
				   , NORE = #{NORE}
				   , REDT = #{REDT}
				   , RSAA = #{RSAA}
				   , RSAB = #{RSAB}
				   , RSBA = #{RSBA}
				   , RSBB = #{RSBB}
				   , RSCA = #{RSCA}
				   , RSCB = #{RSCB}
				   , LOGIN_DT = TO_DATE(#{LOGIN_DT}, 'YYYY-MM-DD HH24:MI:SS')
				   , LOGOUT_DT = TO_DATE(#{LOGOUT_DT}, 'YYYY-MM-DD HH24:MI:SS') 
		WHEN NOT MATCHED THEN 
		INSERT (
			AGDT, AGGR, AGPA, AGEN, AGNA, 
			TOCA, NOIC, NOOC, TOTT, TTIC, 
			TTOC, RGCT, RGDT, NOBU, BUST, 
			NOAC, ACWT, NONR, NRDT, NORE, 
			REDT, RSAA, RSAB, RSBA, RSBB, 
			RSCA, RSCB, 
			LOGIN_DT, 
			LOGOUT_DT
		) VALUES (
			#{AGDT}, #{AGGR}, #{AGPA}, #{AGEN}, #{AGNA}
			, #{TOCA}, #{NOIC}, #{NOOC}, #{TOTT}, #{TTIC}
			, #{TTOC}, #{RGCT}, #{RGDT}, #{NOBU}, #{BUST}
			, #{NOAC}, #{ACWT}, #{NONR}, #{NRDT}, #{NORE}
			, #{REDT}, #{RSAA}, #{RSAB}, #{RSBA}, #{RSBB}
			, #{RSCA}, #{RSCB}
			, TO_DATE(#{LOGIN_DT}, 'YYYY-MM-DD HH24:MI:SS')
			, TO_DATE(#{LOGOUT_DT}, 'YYYY-MM-DD HH24:MI:SS')
		)
    </update>
    
    <update id="ctiMap.insertQueData" parameterType="java.util.List">
        MERGE INTO TB_CTI_QUE_INFO
		USING DUAL
		ON (AGDT = #{AGDT} AND SERV = #{SERV})
		WHEN MATCHED  THEN
		UPDATE SET ROPO = #{ROPO}
				   , TQIC = #{TQIC}
				   , QOIC = #{QOIC}
				   , QOIT = #{QOIT}
				   , QOAB = #{QOAB}
				   , QOAT = #{QOAT}
				   , QOAC = #{QOAC}
		WHEN NOT MATCHED THEN 
		INSERT (
			AGDT, SERV, ROPO, TQIC, QOIC
			, QOIT, QOAB, QOAT, QOAC 
		) VALUES (
			#{AGDT}, #{SERV}, #{ROPO}, #{TQIC}, #{QOIC}
			, #{QOIT}, #{QOAB}, #{QOAT}, #{QOAC}
		)
    </update>
    
    
</mapper>


C:\DLCC_TEST\powerservice\src\main\resources\egovframework\sqlmap\config\DMLIFE 에 있는DMLIFE.xml 입니다.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
    "http://www.ibatis.com/dtd/sql-map-config-2.dtd">

<sqlMapConfig>						
	<sqlMap resource="egovframework/mapper/com/DMLIFE/ctiMap.xml"/>
</sqlMapConfig>


C:\DLCC_TEST\powerservice\src\main\resources\egovframework\spring\com 에 있는
context-sqlMap.xml 입니다.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd">
	
	<bean id="egov.propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <list>
                <value>classpath:/egovframework/egovProps/globals.properties</value>
            </list>
        </property>
    </bean>
    
    <!-- 실행환경에서 빈이름 참조(EgovAbstractDAO) -->
	<bean id="egov.lobHandler" class="org.springframework.jdbc.support.lob.DefaultLobHandler" lazy-init="true" />

	<!-- SqlMap setup for iBATIS Database Layer -->
	<bean id="egov.sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
		<property name="configLocations">
			<list>
				<value>classpath:/egovframework/sqlmap/config/${Globals.DbType}/*.xml</value>
				<!-- <value>classpath:/egovframework/sqlmap/config/PostgreSQL/*/*.xml</value> -->
				<value>classpath:/egovframework/sqlmap/config/PostgreSQL/gim/*.xml</value>
				<value>classpath:/egovframework/sqlmap/config/PostgreSQL/gocs/*.xml</value>
				<value>classpath:/egovframework/sqlmap/config/DMLIFE/*.xml</value>
			</list>
		</property>
		<property name="dataSource" ref="egov.dataSource"/>
		<property name="lobHandler" ref="egov.lobHandler"/>
	</bean>

</beans>	


cmmUseDAO 얘는 도대체 왜 에러로그에 뜨는 파일인지 모르겠습니다..
이 파일은 전혀 건드린게 없고 새로운 연결을 추가하려고 했을 분인데 왜..ㅜㅜㅜㅜㅜ

C:\DLCC_TEST\powerservice\src\main\java\egovframework\com\cmm\service\impl 에 있는
cmmUseDAO.java 입니다.

package egovframework.com.cmm.service.impl;

import java.util.List;

import egovframework.com.cmm.ComDefaultCodeVO;
import egovframework.com.cmm.service.CmmnDetailCode;

import org.springframework.stereotype.Repository;

/**
 * @Class Name : CmmUseDAO.java
 * @Description : 공통코드등 전체 업무에서 공용해서 사용해야 하는 서비스를 정의하기위한 데이터 접근 클래스
 * @Modification Information
 *
 *    수정일       수정자         수정내용
 *    -------        -------     -------------------
 *    2009. 3. 11.     이삼섭
 *
 * @author 공통 서비스 개발팀 이삼섭
 * @since 2009. 3. 11.
 * @version
 * @see
 *
 */
@Repository("cmmUseDAO")
public class CmmUseDAO extends EgovComAbstractDAO {

    /**
     * 주어진 조건에 따른 공통코드를 불러온다.
     * 
     * @param vo
     * @return
     * @throws Exception
     */
    @SuppressWarnings("unchecked")
    public List<CmmnDetailCode> selectCmmCodeDetail(ComDefaultCodeVO vo) throws Exception {
	return (List<CmmnDetailCode>) list("CmmUseDAO.selectCmmCodeDetail", vo);
    }

    /**
     * 공통코드로 사용할 조직정보를 를 불러온다.
     * 
     * @param vo
     * @return
     * @throws Exception
     */
    @SuppressWarnings("unchecked")
    public List<CmmnDetailCode> selectOgrnztIdDetail(ComDefaultCodeVO vo) throws Exception {
	return (List<CmmnDetailCode>) list("CmmUseDAO.selectOgrnztIdDetail", vo);
    }

    /**
     * 공통코드로 사용할그룹정보를 를 불러온다.
     * @param vo
     * @return
     * @throws Exception
     */
    @SuppressWarnings("unchecked")
    public List<CmmnDetailCode> selectGroupIdDetail(ComDefaultCodeVO vo) throws Exception {
	return (List<CmmnDetailCode>) list("CmmUseDAO.selectGroupIdDetail", vo);
    }
}


에러 로그에 언급된 파일들 하나하나 자세히 보고 검색도 해봤는데도 도무지 방법을 모르겠네요..ㅜㅜ

아래는 혹시나 연관있을까 싶어서 첨부하는 파일들입니다.

C:\DLCC_TEST\powerservice\src\main\resources\egovframework\spring\com 에 있는
context-datasource.xml 입니다.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd">

    <bean id="egov.propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <list>
                <value>classpath:/egovframework/egovProps/globals.properties</value>
                <!-- value>file:/product/jeus/egovProps/globals.properties</value-->
            </list>
        </property>
    </bean>

    <!-- DataSource Alias -->
    <alias name="dataSource-oracle" alias="dataSource"/>
    <alias name="dataSource-oracle" alias="egov.dataSource"/>
    <alias name="dataSource-online" alias="egov.dataSource-online"/>
    <alias name="dataSource-dmlifeway" alias="egov.dataSource-dmlifeway"/>
    <alias name="dataSource-gim" alias="egov.dataSource-gim"/>
    <alias name="dataSource-DMLIFE" alias="egov.dataSource-DMLIFE"/>
    <alias name="dataSource-gocs" alias="egov.dataSource-gocs"/>

    <!-- //DataSource Alias -->
    <!--
        # DataSource 추가
        1. globals.properties : 접속 정보 속성 추가 - EX) Globals.대상시스템.속성명
        2. context-datasource.xml : BasicDataSource 추가
        3. context-mybatis.xml : SqlSession 추가
        4. *DAO.java : SqlSession Resource 추가 - EX) EmplDAO.java
    -->


    <!-- PSE -->
    <bean id="dataSource-oracle" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="${Globals.DriverClassName}"/>
        <property name="url" value="${Globals.Url}" />
        <property name="username" value="${Globals.UserName}"/>
        <property name="password" value="${Globals.Password}"/>
        <property name="validationQuery" value="select 1 from dual"/>
        <property name="testOnBorrow" value="true"/>
        <property name="timeBetweenEvictionRunsMillis" value="60000"/>
        <property name="connectionProperties" value="oracle.net.CONNECT_TIMEOUT=5000;"></property>
    </bean>

    <!-- //PSE -->
    <bean id="dataSource-online" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="${Globals.online.DriverClassName}"/>
        <property name="url" value="${Globals.online.Url}" />
        <property name="username" value="${Globals.online.UserName}"/>
        <property name="password" value="${Globals.online.Password}"/>
        <property name="validationQuery" value="select 1 from dual"/>
        <property name="testOnBorrow" value="true"/>
        <property name="timeBetweenEvictionRunsMillis" value="60000"/>
        <property name="connectionProperties" value="oracle.net.CONNECT_TIMEOUT=5000;"></property>
    </bean>

    <!-- //Online-->
    <bean id="dataSource-dmlifeway" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="${Globals.dmlifeway.DriverClassName}"/>
        <property name="url" value="${Globals.dmlifeway.Url}" />
        <property name="username" value="${Globals.dmlifeway.UserName}"/>
        <property name="password" value="${Globals.dmlifeway.Password}"/>
        <property name="validationQuery" value="select 1 from dual"/>
        <property name="testOnBorrow" value="true"/>
        <property name="timeBetweenEvictionRunsMillis" value="60000"/>
        <property name="connectionProperties" value="oracle.net.CONNECT_TIMEOUT=5000;"></property>
    </bean>

    <!-- //DMLifeWay -->
    
    <!-- MALL -->
    <bean id="dataSource-mall" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="${Globals.mall.DriverClassName}"/>
        <property name="url" value="${Globals.mall.Url}" />
        <property name="username" value="${Globals.mall.UserName}"/>
        <property name="password" value="${Globals.mall.Password}"/>
        <property name="validationQuery" value="select 1 from dual"/>
        <property name="testOnBorrow" value="true"/>
        <property name="timeBetweenEvictionRunsMillis" value="60000"/>
        <property name="connectionProperties" value="oracle.net.CONNECT_TIMEOUT=5000;"></property>
    </bean>
    
    <!-- gim -->
    <bean id="dataSource-gim" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="${Globals.gim.DriverClassName}"/>
        <property name="url" value="${Globals.gim.Url}" />
        <property name="username" value="${Globals.gim.UserName}"/>
        <property name="password" value="${Globals.gim.Password}"/>
    </bean>
    
    <!-- oracle DMLIFE -->
    <bean id="dataSource-DMLIFE" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="${Globals.dmlifeway.DriverClassName}"/>
        <property name="url" value="${Globals.dmlifeway.Url}" />
        <property name="username" value="${Globals.dmlifeway.UserName}"/>
        <property name="password" value="${Globals.dmlifeway.Password}"/>
    </bean>
    
    <!-- gocs -->
    <bean id="dataSource-gocs" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="${Globals.gocs.DriverClassName}"/>
        <property name="url" value="${Globals.gocs.Url}" />
        <property name="username" value="${Globals.gocs.UserName}"/>
        <property name="password" value="${Globals.gocs.Password}"/>
    </bean>
</beans>


C:\DLCC_TEST\powerservice\src\main\resources\egovframework\spring\com 에 있는
context-mybatis.xml 입니다.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd">

    <!-- MyBatis와 Spring 연동 설정 -->
    <bean id="sqlSession" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource-oracle" />
        <!-- PowerService : 공통 MyBatis 설정 -->
        <property name="configLocation" value="classpath:/egovframework/mapper/config/mybatis-config.xml" />
        <!-- PowerService : 모든 SqlMap XML 파일 로드 -->
        <property name="mapperLocations" value="classpath:/egovframework/mapper/com/**/*Map.xml" />
    </bean>

    <!-- MyBatis의 Mapper Interface 자동스캔 설정 -->
    <!--
    <bean class="egovframework.rte.psl.dataaccess.mapper.MapperConfigurer">
        <property name="basePackage" value="powerservice.business.*.service.impl" />
    </bean>
    -->

    <!-- 온라인 -->
    <bean id="onlnSqlSession" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource-online" />
        <property name="configLocation" value="classpath:/egovframework/mapper/config/mybatis-config.xml" />
        <property name="mapperLocations" value="classpath:/egovframework/mapper/com/onln/*Map.xml" />
    </bean>

    <!-- //온라인 -->

    <!-- DmLifeWay -->
    <bean id="dlwSqlSession" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource-dmlifeway" />
        <property name="configLocation" value="classpath:/egovframework/mapper/config/mybatis-config.xml" />
        <property name="mapperLocations" value="classpath:/egovframework/mapper/com/dlw/*Map.xml" />
    </bean>
    <!-- //DmLifeWay -->
    <!-- DmLifeWay -->
    <bean id="gongSqlSession" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource-dmlifeway" />
        <property name="configLocation" value="classpath:/egovframework/mapper/config/mybatis-config.xml" />
        <property name="mapperLocations" value="classpath:/egovframework/mapper/com/gongje/*Map.xml" />
    </bean>
    <!-- //DmLifeWay -->
	
	<!-- 쇼핑몰 -->
    <bean id="mallSqlSession" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource-mall" />
        <property name="configLocation" value="classpath:/egovframework/mapper/config/mybatis-config.xml" />
        <property name="mapperLocations" value="classpath:/egovframework/mapper/com/mall/*Map.xml" />
    </bean>
    <!-- //쇼핑몰 -->
    
    <bean id="wdrwSqlSession" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource-dmlifeway" />
        <property name="configLocation" value="classpath:/egovframework/mapper/config/mybatis-config.xml" />
        <property name="mapperLocations" value="classpath:/egovframework/mapper/com/wdrw/*Map.xml" />
    </bean>
    
    <bean id="reqSqlSession" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource-dmlifeway" />
        <property name="configLocation" value="classpath:/egovframework/mapper/config/mybatis-config.xml" />
        <property name="mapperLocations" value="classpath:/egovframework/mapper/com/req/*Map.xml" />
    </bean>
    
    <!-- PostgreSQL gim 연결 -->
    <bean id="gimSqlSession" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource-gim" />
        <property name="configLocation" value="classpath:/egovframework/mapper/config/mybatis-config.xml" />
        <property name="mapperLocations" value="classpath:/egovframework/mapper/com/gim/*.xml" />
    </bean>
    
    <!-- PostgreSQL gocs 연결 -->
    <bean id="gocsSqlSession" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource-gocs" />
        <property name="configLocation" value="classpath:/egovframework/mapper/config/mybatis-config.xml" />
        <property name="mapperLocations" value="classpath:/egovframework/mapper/com/gocs/*.xml" />
    </bean>
    
    <!-- oracle DMLIFE 연결 -->
    <bean id="DMLIFESqlSession" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource-DMLIFE" />
        <property name="configLocation" value="classpath:/egovframework/mapper/config/mybatis-config.xml" />
        <property name="mapperLocations" value="classpath:/egovframework/mapper/com/DMLIFE/*.xml" />
    </bean>
    
    
</beans>


0
  • 답변 3

  • a785312468
    326
    2021-09-24 17:56:57

    안녕하세요.

    유심히 찾아보던중에 아래에서 

     <!-- oracle DMLIFE -->

        <bean id="dataSource-DMLIFE" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">

            <property name="driverClassName" value="${Globals.dmlifeway.DriverClassName}"/>

            <property name="url" value="${Globals.dmlifeway.Url}" />

            <property name="username" value="${Globals.dmlifeway.UserName}"/>

            <property name="password" value="${Globals.dmlifeway.Password}"/>

        </bean>


    여기에서 dataSource-DMLIFE 랑 dataSource-dmlifeway 랑 같은 db를 바라보는건가요??

  • JEJE165
    70
    2021-09-24 18:01:39

    넵! 같은 db를 바라봅니다.

    처음에 만들어져 있는지도 모르고 추가했던 거에요..

  • a785312468
    326
    2021-09-24 18:25:13

    그러면 그냥 기존에 있던 DB설정에 현재 새로 만드신 파일을 물리면 되지 않을까요?

  • 로그인을 하시면 답변을 등록할 수 있습니다.