What am I doing wrong that I’m not able to import org.springframework.jdbc and MANY other packages when I put this artifact in my pom.xml file?
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.1.2.RELEASE</version>
</dependency>
When I put private JdbcTemplate jdbcTemplate; in my class, I’m not able to import the above package and I noticed that I missing many other packages.
The JDBC package is part of spring-jdbc. Not spring-context.
The Spring framework looks like a giant set of clases, but it’s actually split into various libraries: spring-context, spring-jdbc, spring-orm, etc. You need to declare the dependencies to the ones you want.