hikaricp

How do I configure HikariCP in my Spring Boot app in my application.properties files?

大憨熊 提交于 2019-11-26 14:13:09
I'm trying to set up HikariCP in my Spring Boot (1.2.0.M1) app so I can test using it in place of Tomcat DBCP. I'd like to configure the connection pool in my application.properties file like I was doing with Tomcat, but I can't figure out how I should be doing it. All examples I've found show either JavaConfig style, or using a separate HikariCP properties file. Can someone help me figure out the property names to configure it in application.properties? I'd like to also switch from using the driverClassName approach to the DataSourceClassName approach since it looks cleaner and is recommended

How to set up datasource with Spring for HikariCP?

故事扮演 提交于 2019-11-26 08:06:06
问题 Hi I\'m trying to use HikariCP with Spring for connection pool. I\'m using jdbcTempLate and JdbcdaoSupport. This is my spring configuration file for datasource: <bean id=\"dataSource\" class=\"com.zaxxer.hikari.HikariDataSource\"> <property name=\"dataSourceClassName\" value=\"oracle.jdbc.driver.OracleDriver\"/> <property name=\"dataSource.url\" value=\"jdbc:oracle:thin:@localhost:1521:XE\"/> <property name=\"dataSource.user\" value=\"username\"/> <property name=\"dataSource.password\" value=