Full authentication is required to access this resource解决办法

一、springboot环境下,调试接口,返回如下错误信息:

{
  "timestamp": "2018-03-05 14:43:45",
  "status": 401,
  "error": "Unauthorized",
  "message": "Full authentication is required to access this resource",
  "path": "/apptplatform/login"

}

二、问题可能原因


    org.springframework.cloud
    spring-cloud-starter-oauth2

oauth2这个包,本身依赖了security的包,请求被这里拦截了。

三、解决方法,如下图配置

security:
  basic:
    enabled: false

可以在配置文件中关闭springboot的安全验证。

你可能感兴趣的:(Full authentication is required to access this resource解决办法)