首页 > 编程语言 > 详细

springboot easypoi 报错The bean 'beanNameViewResolver', defined in class path resource [cn/afterturn/e

时间:2019-10-07 15:44:47      阅读:635      评论:0      收藏:0      [点我收藏+]

事故现场:

The bean ‘beanNameViewResolver‘, defined in class path resource [cn/afterturn/easypoi/configuration/EasyPoiAutoConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration.class] and overriding is disabled.

Action:

Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true


Process finished with exit code 1

 

解决办法:

在yml文件添加main配置即可解决

spring:
  application:
    name: SpringBoot_easyPOI
  main:
    allow-bean-definition-overriding: true

  

springboot easypoi 报错The bean 'beanNameViewResolver', defined in class path resource [cn/afterturn/e

原文:https://www.cnblogs.com/lxcy/p/11630593.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!