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
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.
<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.
For eclipse users: solution is simple just change the nature of project Spring Tools->add spring project nature
done.