Consider renaming one of the beans or enabling overriding by setting spring.xxx 解决方法

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

Disconnected from the target VM, address: '127.0.0.1:55832', transport: 'socket'

Process finished with exit code 1

出现如上代码错误提示时,可以在配置文件中添加如下配置

#当出现相同名字的类进行注册时,准许覆盖注册
spring:
  main:
    allow-bean-definition-overriding: true

 

你可能感兴趣的:(开发遇到的问题,java,ioc)