0
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.samples.service.service</groupId>
<artifactId>OnlineExam</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
\t \t <!-- Generic properties -->
\t \t <java.version>1.8</java.version>
\t \t <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
\t \t <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
\t \t
\t \t <!-- Web -->
\t \t <jsp.version>2.2</jsp.version>
\t \t <jstl.version>1.2</jstl.version>
\t \t <servlet.version>2.5</servlet.version>
\t \t
\t \t <!-- Spring -->
\t \t <spring-framework.version>4.2.0.RELEASE</spring-framework.version>
\t \t <!-- Hibernate/JPA -->
\t \t <hibernate.version>4.2.1.Final</hibernate.version>
\t \t <!-- Logging -->
\t \t <logback.version>1.0.13</logback.version>
\t \t <slf4j.version>1.7.5</slf4j.version>
\t \t <!-- Test -->
\t \t <junit.version>4.11</junit.version>
\t </properties>
\t
\t <dependencies>
\t
\t \t <!-- Spring MVC -->
\t \t <dependency>
\t \t \t <groupId>org.springframework</groupId>
\t \t \t <artifactId>spring-webmvc</artifactId>
\t \t \t <version>${spring-framework.version}</version>
\t \t </dependency>
\t \t
\t \t <!-- Other Web dependencies -->
\t \t <dependency>
\t \t \t <groupId>javax.servlet</groupId>
\t \t \t <artifactId>jstl</artifactId>
\t \t \t <version>${jstl.version}</version>
\t \t </dependency>
\t \t <dependency>
\t \t \t <groupId>javax.servlet</groupId>
\t \t \t <artifactId>servlet-api</artifactId>
\t \t \t <version>${servlet.version}</version>
\t \t \t <scope>provided</scope>
\t \t </dependency>
\t \t <dependency>
\t \t \t <groupId>javax.servlet.jsp</groupId>
\t \t \t <artifactId>jsp-api</artifactId>
\t \t \t <version>${jsp.version}</version>
\t \t \t <scope>provided</scope>
\t \t </dependency>
\t
\t \t <!-- Spring and Transactions -->
\t \t <dependency>
\t \t \t <groupId>org.springframework</groupId>
\t \t \t <artifactId>spring-tx</artifactId>
\t \t \t <version>${spring-framework.version}</version>
\t \t </dependency>
\t \t <!-- Logging with SLF4J & LogBack -->
\t \t <dependency>
\t \t \t <groupId>org.slf4j</groupId>
\t \t \t <artifactId>slf4j-api</artifactId>
\t \t \t <version>${slf4j.version}</version>
\t \t \t <scope>compile</scope>
\t \t </dependency>
\t \t <dependency>
\t \t \t <groupId>ch.qos.logback</groupId>
\t \t \t <artifactId>logback-classic</artifactId>
\t \t \t <version>${logback.version}</version>
\t \t \t <scope>runtime</scope>
\t \t </dependency>
\t \t <!-- Hibernate -->
\t \t <dependency>
\t \t \t <groupId>org.hibernate</groupId>
\t \t \t <artifactId>hibernate-entitymanager</artifactId>
\t \t \t <version>${hibernate.version}</version>
\t \t </dependency>
\t \t
\t \t <!-- Test Artifacts -->
\t \t <dependency>
\t \t \t <groupId>org.springframework</groupId>
\t \t \t <artifactId>spring-test</artifactId>
\t \t \t <version>${spring-framework.version}</version>
\t \t \t <scope>test</scope>
\t \t </dependency>
\t \t <dependency>
\t \t \t <groupId>junit</groupId>
\t \t \t <artifactId>junit</artifactId>
\t \t \t <version>${junit.version}</version>
\t \t \t <scope>test</scope>
\t \t </dependency>
\t </dependencies> \t
</project>
喜的朋友我试图在春天工具套件,但每次smiple网站Maven项目当我尝试在服务器上运行的项目有是没有选择来运行在服务器上.. 然后我将java版本1.5更改为1.8,但它又不工作..
然后我去项目方面,并选择动态网页模块3.0,然后它显示运行服务器,但它也显示错误在pom.xml文件,它没有web.xml文件..
,但文件是存在的。我浪费我大量的时间,但仍然没有解决
如果您正在编写Spring应用程序,只需使用Spring Boot。您不需要外部服务器,而是像普通的Java应用程序一样启动它。 – chrylis
@chrylis我也使用,但它不工作.. –