无法使用Maven导入org.springframework.jdbc.core [英] Can't import org.springframework.jdbc.core with maven
本文介绍了无法使用Maven导入org.springframework.jdbc.core的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不知道为什么在我的项目中找不到以下导入: 代码:
I dont know why the follow imports are not getting found in my project: Code:
import org.springframework.jdbc.core.SqlInOutParameter;
import org.springframework.jdbc.core.SqlParameter;
import org.springframework.jdbc.object.StoredProcedure;
我的pom.xml文件中有以下内容
I have the folllowing in my pom.xml file
代码:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.2.1.RELEASE</version>
</dependency>
但是我发现,如果添加以下内容,它可以工作,但我不明白为什么需要这样做:
But I have found that if I add the following it works but I dont see why I need to:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${springframework-version}</version>
</dependency>
推荐答案
如果要使用Spring Jdbc软件包,则必须导入正确的库:
If you want to work with Spring Jdbc packages you have to import the correct library:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>3.2.1.RELEASE</version>
</dependency>
这篇关于无法使用Maven导入org.springframework.jdbc.core的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文