当前位置:   article > 正文

解决SpringMVC+Spring Security Oauth2返回access_token报No converter found for DefaultOAuth2AccessToken_springmvc转springboot an authentication object was

springmvc转springboot an authentication object was not found
No converter found for return value of type: class org.springframework.security.oauth2.common.DefaultOAuth2AccessToken

出现以上错误的原因是因为没有为SpringMVC引用所需的message converter包,引入如下两个包即可:

  1. <dependency>
  2. <groupId>com.fasterxml.jackson.core</groupId>
  3. <artifactId>jackson-core</artifactId>
  4. <version>2.8.6</version>
  5. </dependency>
  6. <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
  7. <dependency>
  8. <groupId>com.fasterxml.jackson.core</groupId>
  9. <artifactId>jackson-databind</artifactId>
  10. <version>2.8.6</version>
  11. </dependency>


声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/68862
推荐阅读
相关标签
  

闽ICP备14008679号