我在 spring 中配置了 netezza 数据库。我已经在类路径中添加了依赖的nzjdbc.jar
弹簧配置:
<bean id="QA_CAM_BASE_jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<!-- Initialization for data source -->
<bean id="QA_CAM_BASE_dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="${com.ec.database.driver}"/>
<property name="url" value="${com.ec.database.url}"/>
<property name="username" value="${com.ec.database.user}"/>
<property name="password" value="${com.ec.database.pass}"/>
pom xml config
<dependency>
<groupId>org.netezza</groupId>
<artifactId>netezza</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/resources/lib/nzjdbc.jar</systemPath>
</dependency>
<resource>
<directory>${basedir}/src/main/resources/lib</directory>
<targetPath>WEB-INF/lib</targetPath>
</resource>
</webResources>
Put the nzjdbc.jar
在本地 Maven 存储库中
mvn install:install-file -Dfile=netezza.jar -DgroupId=org.netezza -DartifactId=netezza -Dversion=1.0 -Dpackaging=jar
(在所在目录执行此命令netezza.jar
位于
然后像普通依赖项一样使用它:
<dependency>
<groupId>org.netezza</groupId>
<artifactId>netezza</artifactId>
<version>1.0</version>
</dependency>
@See 安装第 3 方 JAR 的指南
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)