SSM错误解决:Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource


经常我们在IDEA中运行JAVA项目后就会出现这个错误:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defines in class path resource [org/springframework

/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvConfiguration.class]:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]:

那么如果是这种问题在运行了项目之后报错了怎么解决呢,出现这种的错误代码,我们首先应该根据23体验网上面提到的,检查一下pom.xml文件中有没有这个maven包被引入:

<dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-cache</artifactId>
          <version>1.5.4.RELEASE</version>
</dependency>
然后再看下是错误在哪个路径哪个文件下面,一层一层的找到问题所在并将它纠正过来,以正法纲。

猜你喜欢

转载自blog.csdn.net/du_23tiyanwang/article/details/80801873