Notice
Recent Posts
Recent Comments
Link
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Tags more
Archives
Today
Total
관리 메뉴

Formoat's Open Blog

hikari CP 본문

Java/Spring

hikari CP

snd-snd 2019. 10. 4. 16:48

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>

 

https://github.com/brettwooldridge/HikariCP

'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