<bean id="hikariConfig" class="com.zaxxer.hikari.HikariConfig"> <property name="poolName" value="springHikariCP" /> <property name="connectionTestQuery" value="SELECT 1" /> <property name="dataSourceClassName" value="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" /> <property name="dataSourceProperties"> <props> <prop key="url">${jdbc.url}</prop> <prop key="user">${jdbc.username}</prop> <prop key="password">${jdbc.password}</prop> </props> </property> </bean> <bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close"> <constructor-arg ref="hikariConfig" /> </bean>
'TIP > SPRING' 카테고리의 다른 글
log4jdbc-log4j2 설정 (0) | 2018.10.11 |
---|---|
controller (0) | 2018.10.10 |
web.xml(3.0)한글 처리 포함 (0) | 2018.10.10 |
mybatis test 코드 (0) | 2018.10.10 |
mysql db연결 테스트 (0) | 2018.10.10 |