您的位置:首页 > 产品设计 > UI/UE

屏蔽Full authentication is required to access this resource

2018-03-05 14:49 1351 查看
springboot环境下,用postman调试接口,一直正常,今天突然出现以下错误:
{
  "timestamp": "2018-03-05 14:43:45",
  "status": 401,
  "error": "Unauthorized",
  "message": "Full authentication is required to access this resource",
  "path": "/apptplatform/login"

}
上网搜一下解决方法,有人提出在配置中添加以下配置:
#忽略权限拦截
management:
security:
enabled: false并导入以下maven依赖(项目此前并没有此依赖)
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>很可惜,问题依然存在。
由于项目的参与人员不多,问了下大家,有人添加了springboot的cloud依赖:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-oauth2</artifactId>
</dependency>最后解决方法,如下图配置security:
basic:
enabled: false可以关闭springboot的安全验证。
此功能只是在配置上关闭安全验证,项目以后还是要打开此验证的。

查了下maven,oauth2这个包,本身依赖了security的包

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  springboot
相关文章推荐