404错误-原始服务器未找到目标资源的当前表示,或不愿意透露存在该资源

时间:2018-07-19 01:20:34

标签: java maven tomcat8

真的需要帮助! 我正在尝试将应用程序部署到Tomcat。我在stackoverflow上尝试了几乎所有解决方案,但是没有运气。

Maven clean install [Success]
Run on server - 404 error
INFO: No Spring WebApplicationInitializer types detected on classpath
Jul 18, 2018 8:12:22 PM org.apache.catalina.core.StandardContext 
listenerStart
SEVERE: Error configuring application listener of class 
org.springframework.security.web.session.HttpSessionEventPublisher
java.lang.ClassNotFoundException: org.springframework.security.web.session.HttpSessionEventPublisher
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1352)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1180)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:544)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:525)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4822)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5363)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1410)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1400)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

与Springframework安全性相对应的依赖项

 <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-config</artifactId>
            <version>5.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-core</artifactId>
            <version>5.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-openid</artifactId>
            <version>5.0.1.RELEASE</version>
        </dependency>

[编辑] 尝试将范围添加为可编译,但日志中没有看到任何更改。 尝试的解决方案: 将Maven依赖项添加到Deployment Assembly 尝试过Tomcat 8和Tomcat 8.5 尝试将spring-security-web添加到pom.xml却无法正常工作

0 个答案:

没有答案