Wie richte ich eine Datenquelle mit Spring für HikariCP ein?

Hallo, ich versuche, HikariCP mit Spring für den Verbindungspool zu verwenden. Ich verwende JdbcTempLate und JdbcdaoSupport.
Dies ist meine Frühlingskonfigurationsdatei für d, atasource:

<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="password"/>
</bean>

Aber leider wird folgende Fehlermeldung generiert:

Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.zaxxer.hikari.HikariDataSource]: No default constructor found; nested exception is java.lang.NoSuchMethodException: com.zaxxer.hikari.HikariDataSource.<init>()

Kann jemand mir bitte sagen, wie man dieses Problem löst?

Antworten auf die Frage(8)

Ihre Antwort auf die Frage