信息:在类路径上未检测到 Spring WebApplicationInitializer 类型 (jre 1.8)

INFO: No Spring WebApplicationInitializer types detected on classpath (jre 1.8)

我从 putty 收到此错误消息:

Error: No Spring WebApplicationInitializer types detected on classpath.

当我使用 eclipse 和 maven 部署 WAR 文件时。现在我正在使用 jre 1.8 和 tomcat 版本 7。我检查了编译器,它的版本是 1.8。这个问题有什么解决办法吗?我还启用了自动构建选项。

这些是我从 putty 得到的错误信息

17-Jan-2017 17:50:03.587 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-9485"]

17-Jan-2017 17:50:11.982 INFO [ruthhere.cafe24.com-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

17-Jan-2017 17:50:11.989 INFO [ruthhere.cafe24.com-startStop-1] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath

我刚刚解决了这个问题。我一直收到这个错误的原因是因为我的 java 版本和 eclipse 项目 属性 中的 java 版本不匹配。 首先,我检查了我拥有的 java 版本。而不是打开 pom.xml 并更改 java 版本,以便它可以与 java 版本匹配。

<java-version>1.7</java-version>

另外,我检查了 window >properties > project facets 并更改了 java 版本。