Spring MVC WEB项目之Maven管理
程序员文章站
2022-04-08 08:20:21
...
配置pom.xml文件
<!-- 设置一些属性值 -->
<properties>
<spring.version>4.3.8.RELEASE</spring.version>
<jackson.mapper.version>1.9.13</jackson.mapper.version>
</properties>
<!-- 设置jar包依赖信息 -->
<dependencies>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-core -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-web -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.codehaus.jackson/jackson-mapper-asl -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>${jackson.mapper.version}</version>
</dependency>
</dependencies>
<!-- 设置maven编译器信息 -->
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source><!--指定jdk版本1.7-->
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<!-- 设置一些属性值 -->
<properties>
<spring.version>4.3.8.RELEASE</spring.version>
<jackson.mapper.version>1.9.13</jackson.mapper.version>
</properties>
<!-- 设置jar包依赖信息 -->
<dependencies>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-core -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-web -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.codehaus.jackson/jackson-mapper-asl -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>${jackson.mapper.version}</version>
</dependency>
</dependencies>
<!-- 设置maven编译器信息 -->
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source><!--指定jdk版本1.7-->
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
推荐阅读
-
ssm整合总结(一)--第一步之使用maven搭建一个web项目
-
Java全栈程序员之07:IDEA中使用MAVEN构架生产级的Web项目
-
从零开始搭建spring mvc + mybatis + memcached+ dubbo\zookper的maven项目
-
Spring3MVC+MyBatis+ExtJs3整合开发系列之四:角色管理模块
-
Maven:maven简介、安装与整合web项目、maven常用命令、依赖管理
-
Java Web项目中Maven管理jar包,如何用命令添加ja包!
-
Spring web MVC 框架学习笔记 之 ViewResolver技术
-
spring boot + maven + jsp 快速搭建web项目 1
-
关于使用maven + Tomcat7-maven-plugin管理并运行web项目抛出cannot be cast to javax.servlet.Servlet的问题和解决
-
JAVA WEB快速入门之通过一个简单的Spring项目了解Spring的核心(AOP、IOC)