<context:property-placeholder location="classpath:oracle_jdbc.properties" />
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="$" />
<property name="url" value="$" />
<property name="username" value="$" />
<property name="password" value="$" />
</bean>
<!-- <bean id="dataSource" class="net.sf.log4jdbc.sql.jdbcapi.DataSourceSpy">
<constructor-arg ref="dataSourceSpied" />
</bean> -->
<bean id="SqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="configLocation" value="classpath:/mybatis/mybatis-config.xml" />
<property name="mapperLocations" value="classpath:/mybatis/mapper/**/*.xml" />
</bean>
<bean id="sqlSession" class="org.mybatis.spring.SqlSessionTemplate" destroy-method="clearCache">
<constructor-arg name="sqlSessionFactory" ref="SqlSessionFactory" />
</bean>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager" />
logback은 따로 구할것...
'Study > Spring' 카테고리의 다른 글
Spring legacy 설치 중에 에러 발생 org.eclipse.mylyn.commons.ui 3.7.0 4.0.0)' but it could not be found (1) | 2022.07.12 |
---|---|
[Spring] Spring + Jquery + Html 다중 파일 업로드 (0) | 2021.03.14 |
[Spring Framework] 어노테이션을 이용한 DI (0) | 2019.08.06 |
[Spring Framework] 스프링 DI란? (0) | 2019.08.06 |
[Spring Framework] 스프링 부트 (0) | 2019.08.04 |