springboot引入security,测试接口报Unauthorized

1、报错截图

2、当前项目pom文件引入security

复制代码
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-security</artifactId>
    <version>2.2.2.RELEASE</version>
</dependency>

3、解决办法

复制代码
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class,
        ManagementWebSecurityAutoConfiguration.class})
相关推荐
在未来等你1 天前
互联网大厂Java求职面试:云原生架构与微服务设计中的复杂挑战
java·微服务·ai·云原生·秒杀系统·rag·分布式系统
zfj3211 天前
什么时候使用微服务,什么时候不用
微服务·架构
程序猿DD1 天前
告别微服务,迎接SCS(Self-Contained Systems)?新概念还是炒冷饭?
后端·微服务·架构
腾讯云中间件1 天前
限流系列之一:微服务常见限流方案及TSF限流原理
微服务·腾讯
一眼万年041 天前
Redis单机模式
redis·微服务
掘金-我是哪吒2 天前
分布式微服务系统架构第145集:Jeskson文档-微服务分布式系统架构
分布式·微服务·云原生·架构·系统架构
bing_1582 天前
采用微服务的预期收益是什么?我们如何衡量成功?
微服务
炎码工坊2 天前
DevSecOps实践:CI/CD流水线集成动态安全测试(DAST)工具
安全·网络安全·微服务·云原生·安全架构
保持学习ing2 天前
微服务--消息队列mq
java·微服务·消息队列·rabbitmq·消息转换器
沛沛老爹2 天前
深入剖析 Celery:分布式异步任务处理的利器
分布式·python·微服务·celery·架构设计·worker节点