我添加的pom.xml文件内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns=""
xmlns:xsi=""
xsi:schemaLocation=" ">
<modelVersion>4.0.0</modelVersion>
<groupId>SpringMvcDemo</groupId>
<artifactId>SpringMvcDemo</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency> <!-- junit 4.7 -->
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<type>jar</type>
<scope>test</scope>
</dependency>
<dependency> <!-- spring 3.2 -->
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.2.1.RELEASE</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
<type>jar</type>
</dependency>
<dependency> <!--Jackson核心包-->
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.1.3</version>
</dependency>
<dependency> <!--Jackson数据绑定包-->
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.1.3</version>
</dependency>
<dependency> <!--Jackson注解包-->
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.1.2</version>
</dependency>
</dependencies>
</project>
然后在index.jsp文件中随便加点内容。
下面配置Tomcat服务器,本例使用Tomcat6。
如下图,选择Local,然后点击Configure,在弹出的对话框中选择Tomcat安装目录。
选择Tomcat Server,然后点击绿色的“+”号。
点击“+”后选择Local,刚刚已经配置好了Local的Tomcat服务器。