Spring Security OAuth2 找不到类型

图片说明

错误提示
2019-08-26 19:45:19.912 WARN 2836 --- [nio-8099-exec-4] o.s.s.o.provider.endpoint.TokenEndpoint : Handling error: InvalidRequestException, Missing grant type

个人考虑 还是配置出现问题,就是你的请求参数和后台调用不匹配。把登录接口的配置修改下试试,不行吧配置和关键代码贴下

secret参数传递不正确,参考
https://www.javaear.com/question/47392372.html

作为form data post过去,而不是作为url参数。
curl -u aClient:aSecret --data "grant_type=password&username=mauricio.coder&password=123" -X POST -H "Content-Type:application/x-www-form-urlencoded" http://localhost:9000/oauth/token

源码中抛出的异常,debug看看哪儿出的问题
参考:https://segmentfault.com/a/1190000012367876