开发者

Springbootadmin与security冲突问题及解决

开发者 https://www.devze.com 2024-08-15 10:22 出处:网络 作者: wang18057
目录Springbootadmin与security冲突一直报错解决总结Springbootadmin与security冲突 最近在研究springbootadmin监控服务,springboot版本使用3.2.5,security使用6.4.0-SNAPSHOT,集成了springbootadmin后,
目录
  • Springbootadmin与security冲突
  • 一直报错
  • 解决
  • 总结

Springbootadmin与security冲突

最近在研究springbootadmin监控服务,springboot版本使用3.2.5,security使用6.4.0-SNAPSHOT,集成了springbootadmin后,

一直报错

Parameter 0 of method setFilterChains in org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration required a single bean, but 2 were found:

    - requestMappingHandlerMapping: defined by method 'rwww.devze.comequestMappingHandlerMapping' in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfsGCmJTZGlUiguration.class]

&nbs编程客栈p;   - controllerEndpointHandlerMapping: defined by method 'controllerEndpointHandlerMapping' in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/servlet/WebMvcEndpointManagementContextConfiguration.class]

This may be due to missing paramete编程r name information

我用的springbootadmin

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>

        <!-- spring-boot-admin-client -->
        <dependency>
            <groupId>de.codecentric</groupId>
            <artifactId>spring-boot-admin-starter-client</artifactId>
      javascript      <version>3.2.3</version>
        </dependency>

网上到处找了资料,说是actuator 中自带security,与另一个security冲突

使用了各种方法都不能解决,最后请教大神,在bean上指定名称即可。

解决

Springbootadmin与security冲突问题及解决

Springbootadmin与security冲突问题及解决

总结

以上为个人经验,希望能给大家一个参考,也希望大家多多支持编程客栈(www.devze.com)。

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号