admin管理员组文章数量:1334226
在整合springsecurity时候
package com.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration;
@Configuration
public class SpringSecurity extends WebSecurityConfiguration{
}
继承 WebSecurityConfiguration之后点击项目启动报错
Description:
- The bean 'delegatingApplicationListener', defined in org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration, could not be registered. A bean with that name has already been defined in class path resource [com/config/SpringSecurity.class] and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
原因:
在启动项目时,createRestApi这个Bean已经存在,不能被注册。导致启动失败。
解决方法:
添加
spring: main: allow-bean-definition-overriding: true
本文标签: enablingoverridingrenamingbeansmain
版权声明:本文标题:解决:Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/biancheng/1738334098a2076589.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论