creating bean with name ‘requestMappingHandlerMapping‘ defined in class path resource(已解决)

报错原因:
Activiti6.0和SpringBoot2.x的兼容性问题

报错内容

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'webMvcRequestHandlerProvider' defined in URL [jar:file:/D:/JAVA/apache-maven-3.6.2/repository/io/springfox/springfox-spring-web/2.9.2/springfox-spring-web-2.9.2.jar!/springfox/documentation/spring/web/plugins/WebMvcRequestHandlerProvider.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy

  1. url路径问题,查看你的@RequestMapping是否相同,指定具体方式GET/POST,路径是否多/

  2. 插件和SpringBoot版本不兼容问题,我的SpringBoot2.x 引用了Activiti 6.0的版本在启动类排除冲突,@SpringBootApplication( exclude = SecurityAutoConfiguration.class)
    如果你并没有将流程控制文件xx.bpmn加入项目也会报错,所以我们在配置文件里面暂时不检查它,后续可能会更新通过配置文件如何管理控制activiti

spring.activiti.database-schema-update=true
#自动部署验证设计,生成表
spring.activiti.check-process-definitions=false
#解决activiti一直调用sql查询问题
spring.activiti.async-executor-activate=false

我这里是引用的公告类,由于用不到acitiviti我就直接把相关依赖删除了
文章参考了https://www.jianshu.com/p/9b1dbb2c85e7
感谢大佬的文章

正在学习中,如有不足之处,感谢大家评论指正

你可能感兴趣的:(SpringBoot,spring,boot,activiti)