1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.cj.jdbc.Driver" />
<property name="url"
value="jdbc:mysql://localhost:3306/mysql?characterEncoding=UTF-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC"/>
<property name="username" value="root"/>
<property name="password" value="1234" />
</bean>
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="configLocation" value="classpath:config/mybatis-config.xml"/>
<property name="mapperLocations" value="classpath:mapper/**/*Mapper.xml" />
</bean>
<bean id="sqlSession" class="org.mybatis.spring.SqlSessionTemplate" destroy-method="clearCache">
<constructor-arg name="sqlSessionFactory" ref="sqlSessionFactory"/>
</bean>
|
cs |
'기존 > 🏀Pom.xml' 카테고리의 다른 글
[JPA] Hibernate,H2database 의존성 추가 및 db 설정 pom.xml (0) | 2022.10.30 |
---|---|
어노테이션 사용 ㅇ (0) | 2022.06.24 |
xml (0) | 2022.06.21 |
[SPRING] My sql 연결 (0) | 2022.06.21 |
pom.xml 파일업로드 (0) | 2022.06.03 |