◆ root-context.xml ( base-package : service 추가 )
페이지 정보
본문
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:mybatis-spring="http://mybatis.org/schema/mybatis-spring"
xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-4.3.xsd
http://mybatis.org/schema/mybatis-spring http://mybatis.org/schema/mybatis-spring-1.2.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd">
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<!-- <property name="driverClassName" value="com.mysql.jdbc.Driver"></property> -->
<!-- <property name="url" value="jdbc:mysql://localhost:3306/spring"></property> -->
<property name="driverClassName" value="org.mariadb.jdbc.Driver"></property>
<property name="url" value="jdbc:mariadb://localhost:3307/spring"></property>
<property name="username" value="root"></property>
<property name="password" value="1111"></property>
</bean>
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource"></property>
</bean>
<mybatis-spring:scan base-package="com.pkt.mapper"/>
<context:component-scan base-package="com.pkt.model"></context:component-scan>
<context:component-scan base-package="com.pkt.service"></context:component-scan>
</beans>
- 이전글● ④ 비지니스 계층의 설정 24.07.30
- 다음글BoardService.java ( interface ) 24.07.30
댓글목록
등록된 댓글이 없습니다.