解决SpringMVC+Spring Security Oauth2返回access_token报No converter found for DefaultOAuth2AccessToken

来源:互联网 发布:linux 查看硬件命令 编辑:程序博客网 时间:2024/06/06 14:10
No converter found for return value of type: class org.springframework.security.oauth2.common.DefaultOAuth2AccessToken

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

<dependency>          <groupId>com.fasterxml.jackson.core</groupId>          <artifactId>jackson-core</artifactId>          <version>2.8.6</version>      </dependency>      <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->      <dependency>          <groupId>com.fasterxml.jackson.core</groupId>          <artifactId>jackson-databind</artifactId>          <version>2.8.6</version>      </dependency>


0 0