Formoat's Open Blog
hikari CP 본문
1. Maven Dependency
<!-- https://mvnrepository.com/artifact/com.zaxxer/HikariCP -->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>3.4.1</version>
</dependency>
2. Spring Bean
<?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:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="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/aop
http://www.springframework.org/schema/aop/spring-aop-4.3.xsd">
<!-- HikariCP Configuration -->
<bean id="hikariConfig" class="com.zaxxer.hikari.HikariConfig">
<property name="driverClassName" value="oracle.jdbc.OracleDriver"/>
<property name="username" value="java" />
<property name="password" value="12345" />
<property name="jdbcUrl" value="jdbc:oracle:thin:@localhost:1521:orcl" />
</bean>
<!-- HikariCP DataSource Setting -->
<bean id="ds" class="com.zaxxer.hikari.HikariDataSource">
<constructor-arg ref="hikariConfig"/>
</bean>
</beans>
'Java > Spring' 카테고리의 다른 글
Transaction - 트랜잭션 (0) | 2019.10.08 |
---|---|
MyBatis - 마이바티스 (0) | 2019.10.07 |
AOP(Aspect Oriented Programming) - 관점 지향 프로그래밍 (0) | 2019.10.04 |
DI (Dependency Injection) - 의존성 주입 (0) | 2019.10.01 |
5 (0) | 2019.10.01 |
Comments