-
MySQL, MariaDB
pom.xml
123456<dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId><version>5.1.31</version></dependency>cs context-datasource.xml
1234567<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"><property name="driverClassName" value="com.mysql.jdbc.Driver"/><property name="url" value="jdbc:mysql://127.0.0.1:3306/데이터베이스명"/><property name="username" value="디비계정아이디"/><property name="password" value="비민번호"/></bean>cs Oracle
pom.xml
12345<dependency><groupId>com.oracle</groupId><artifactId>ojdbc14</artifactId><version>10.2.0.4.0</version></dependency>cs context-datasource.xml
123456789101112<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"><property name="driverClassName" value="core.log.jdbc.driver.OracleDriver"/><property name="url" value="jdbc:oracle:thin:@127.0.0.1:1521:xe"/><property name="username" value="계정아이디" /><property name="password" value="비밀번호" /><property name="maxActive" value="100" /><property name="maxIdle" value="20" /><property name="maxWait" value="-1" /><property name="minIdle" value="2" /></bean>cs 'Spring' 카테고리의 다른 글
RequestMapping produces (0) 2018.09.27 Swagger란? (0) 2018.09.17 Spring Security 중복로그인 막기 (0) 2018.09.04 Spring Security 태그 (0) 2018.09.04 Mybatis - mapUnderscoreToCamelCase (1) 2018.07.30