Can someone tell me how to solve this issue?
I have narrowed down the problem to the pom.xml file. My project works but when I add the following dependency I get an
If anyone is still facing this error and is refering the getting started guide from spring.io, not using the defaut package and placing your class files under a new package did the trick for me.
You most likely have conflicting Spring dependencies on your classpath. It's probably an old spring-asm
JAR.
Run mvn dependency:tree -Dincludes=:spring*::
and check for conflicts. The best way to avoid these is to put a dependency on the spring-framework-bom
in your project's dependencyManagement
section, as follows
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>4.0.3.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
These versions are supported.