无法使用maven导入org.springframework.jdbc.core

SJS*_*SJS 6 java spring jdbc maven

我不知道为什么在我的项目中找不到跟随导入:代码:

import org.springframework.jdbc.core.SqlInOutParameter;
import org.springframework.jdbc.core.SqlParameter;
import org.springframework.jdbc.object.StoredProcedure;
Run Code Online (Sandbox Code Playgroud)

我的pom.xml文件中有以下内容

码:

<dependency>
 <groupId>org.springframework</groupId>
 <artifactId>spring-context</artifactId>
 <version>3.2.1.RELEASE</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)

但我发现,如果我添加以下内容可行,但我不知道为什么我需要:

<dependency>
      <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
        <version>${springframework-version}</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)

Ger*_*bas 7

如果您想使用Spring Jdbc包,则必须导入正确的库:

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-jdbc</artifactId>
    <version>3.2.1.RELEASE</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)