이지우 - jndi, mybatis 작업 중
This commit is contained in:
parent
8521949bba
commit
4a9e7b0c00
@ -5,7 +5,7 @@
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">
|
||||
|
||||
<!-- component-scan 설정-->
|
||||
<context:component-scan base-package="egovframework, kcc">
|
||||
<context:component-scan base-package="egovframework, kcc, seed">
|
||||
<!-- <context:component-scan base-package="kcc"> -->
|
||||
<!-- <context:include-filter type="annotation" expression="org.springframework.stereotype.Service"/>
|
||||
<context:include-filter type="annotation" expression="org.springframework.stereotype.Repository"/> -->
|
||||
|
||||
@ -65,4 +65,9 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="mybatisDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
|
||||
<property name="jndiName" value="jndi/XE"/>
|
||||
<property name="resourceRef" value="true" />
|
||||
</bean>
|
||||
</beans>
|
||||
|
||||
15
src/main/resources/egovframework/spring/com/context-jndi.xml
Normal file
15
src/main/resources/egovframework/spring/com/context-jndi.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans" xsi:schemaLocation=" http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<Context path="/">
|
||||
<Resource
|
||||
name="jndi/XE"
|
||||
auth="Container"
|
||||
driverClassName="oracle.jdbc.driver.OracleDriver"
|
||||
username="FAIRNETUR"
|
||||
password="FAIRNETUR!@#$"
|
||||
type="javax.sql.DataSource"
|
||||
url="jdbc:oracle:thin:@192.168.0.30:1523/XE"
|
||||
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
|
||||
/>
|
||||
</Context>
|
||||
</beans>
|
||||
@ -55,7 +55,7 @@
|
||||
|
||||
|
||||
<!-- Mybatis 설정 -->
|
||||
<!-- <bean id="sqlSession" class="org.mybatis.spring.SqlSessionFactoryBean">
|
||||
<bean id="sqlSession" class="org.mybatis.spring.SqlSessionFactoryBean">
|
||||
<property name="dataSource" ref="dataSource-${Globals.DbType}" />
|
||||
<property name="configLocation" value="classpath:/egovframework/spring/com/mybatis-config.xml" />
|
||||
<property name="mapperLocations">
|
||||
@ -67,8 +67,12 @@
|
||||
|
||||
<bean class="egovframework.rte.psl.dataaccess.mapper.MapperConfigurer">
|
||||
<property name="basePackage" value="kcc.kccadr.adjPgrMgr" />
|
||||
</bean> -->
|
||||
</bean>
|
||||
|
||||
<bean id="mybatisDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
|
||||
<property name="jndiName" value="jndi/XE"/>
|
||||
<property name="resourceRef" value="true" />
|
||||
</bean>
|
||||
|
||||
|
||||
</beans>
|
||||
|
||||
@ -1,15 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||
<configuration>
|
||||
|
||||
<settings>
|
||||
<setting name="mapUnderscoreToCamelCase" value="true" />
|
||||
<setting name="callSettersOnNulls" value="true" />
|
||||
<setting name="cacheEnabled" value="false" />
|
||||
<setting name="useGeneratedKeys" value="true" />
|
||||
<setting name="defaultExecutorType" value="REUSE" />
|
||||
<!-- oracle, ora-17004에러 처리 20190729 -->
|
||||
<setting name="jdbcTypeForNull" value="NULL" />
|
||||
</settings>
|
||||
|
||||
<!-- <plugins>
|
||||
<plugin interceptor="kcc.com.cmm.spring.interceptor.MybatisLoggingInterceptor" />
|
||||
</plugins>-->
|
||||
<typeAliases>
|
||||
<typeAlias alias="egovMap" type="egovframework.rte.psl.dataaccess.util.EgovMap" />
|
||||
<typeAlias alias="hashMap" type="java.util.HashMap" />
|
||||
<typeAlias alias="map" type="java.util.Map" />
|
||||
<typeAlias alias="list" type="java.util.List" />
|
||||
<typeAlias alias="int" type="java.lang.Integer" />
|
||||
</typeAliases>
|
||||
|
||||
<!-- <mappers>
|
||||
<mapper resource="mapperName.xml" />
|
||||
</mappers> -->
|
||||
</configuration>
|
||||
Loading…
Reference in New Issue
Block a user