INFO: No Spring WebApplicationInitializer types detected on classpath

前端 未结 9 1718
借酒劲吻你
借酒劲吻你 2020-11-28 12:32

I have a spring project that runs fine on my tomcat7 server when I deploy from eclipse: Run As >> Run on server. In the eclipse tab \"Servers\" I see:

Server         


        
相关标签:
9条回答
  • 2020-11-28 13:11

    I had similar problem with Tomcat 8 embedded in java7 application.

    When I launched Tomcat in my application, it worked. But when I launched it through Maven for integration test purpose, I got this error : "No Spring WebApplicationInitializer types detected on classpath".

    I fixed it by upgrading org.apache.tomcat.embed:tomcat-embed-* dependencies from version 8.0.29 to 8.0.47.

    0 讨论(0)
  • 2020-11-28 13:20
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>          
        <configuration>
            <source>1.8</source>
            <target>1.8</target>
        </configuration>
     </plugin>
    

    This is the important plugin that should be in pom.xml. I spent my two days debugging and researching. This was the solution. This is Apache plugin to tell maven to use the the given Compiler.

    0 讨论(0)
  • 2020-11-28 13:21

    For eclipse users: solution is simple just change the nature of project Spring Tools->add spring project nature

    done.

    0 讨论(0)
提交回复
热议问题