Created
February 21, 2017 13:33
-
-
Save ppeeou/9c2dc2611b2b7084e5ad825350fa083a to your computer and use it in GitHub Desktop.
spring jdbc 설정
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- tomcat context.xml 소스 수정 후 사용하세요 --> | |
<Resource auth="Container" | |
description="Global Address Database" | |
driverClassName="com.mysql.jdbc.Driver" | |
maxActive="8" | |
maxIdle="10" | |
maxWait="10" | |
name="jdbc/mysql" | |
password="" | |
type="javax.sql.DataSource" | |
url="jdbc:mysql://localhost:3306/tests?characterEncoding=UTF-8" | |
username="root"/> | |
<ResourceLink global="jdbc/mysql" name="jdbc/mysql" type="com.mysql.jdbc.Driver"/> | |
<!-- servlet-context.xml 소스 수정 후 사용하세요 --> | |
<beans:bean | |
class="org.springframework.jdbc.datasource.DriverManagerDataSource" | |
name="dataSource"> | |
<beans:property name="driverClassName" value="com.mysql.jdbc.Driver"/> | |
<beans:property name="url" value="jdbc:mysql://localhost:3306/tests"/> | |
<beans:property name="username" value="root"/> | |
<beans:property name="password" value=""/> | |
</beans:bean> | |
<beans:bean class="org.springframework.jdbc.core.JdbcTemplate" | |
name="template"> | |
<beans:property name="dataSource" ref="dataSource"> | |
</beans:property> | |
</beans:bean> | |
<!--메이븐 spring-jdbc 설정--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment