hikariConfig 설정
<bean id="hikariConfig" class="com.zaxxer.hikari.HikariConfig"> <property name="poolName" value="mercatus_connection_pool" /> <property name="maximumPoolSize" value="50" /> <property name="maxLifetime" value="60000" /> <property name="idleTimeout" value="30000" /> <property name="driverClassName" value="${jdbc.driverClassName}"></property> <property name="jdbcUrl" value="${jdbc.url}"></property> <property name="username" value="${jdbc.username}"></property> <property name="password" value="${jdbc.password}"></property> </bean> <!-- 2. HikariCP 를 통해 커넥션을 관리하는 DataSource 객체(HikariDataSource) 설정 --> <!-- 생성자 파라미터로 1번에서 생성한 HikariConfig 객체 전달 --> <bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource"> <constructor-arg ref="hikariConfig"></constructor-arg> </bean>
댓글 ( 4)
댓글 남기기