springboot easypoi 报错The bean 'beanNameViewResolver', defined in class path resource [cn/afterturn/e
事故现场:
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
作 者:
Jony.K.Chen
出 处:http://www.cnblogs.com/lxcy/
版权声明:本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文链接。
特此声明:所有评论和私信都会在第一时间回复。也欢迎园子的大大们指正错误,共同进步。
声援博主:如果您觉得文章对您有帮助,可以点击文章右下角【推荐】一下。您的鼓励是作者坚持原创和持续写作的最大动力!