0
我們的應用程序使用spring安全來保護應用程序,我剛添加了一個支持spring oauth安全性的rest控制器,用於oauth令牌驗證,將由其他一些應用程序調用是春天加入OAuth安全我使用彈簧安全得到下面的錯誤我的其他控制器後,我的控制器代碼spring oauth error訪問此資源需要完整身份驗證
@RestController
@EnableResourceServer
public class Controller extends BaseRestController{
@RequestMapping(value="/api/v1/public/insertData", method=RequestMethod.POST)
ResponseEntity<?> insertTPQueueData(TitleProcurementQueue queue,Authentication authentication) {
return null;
}
}
<oauth>
<error_description>
Full authentication is required to access this resource
</error_description>
<error>unauthorized</error>
</oauth>
請幫助
假設你參考這個[文章](https://stackoverflow.com/questions/26881296/spring-security- oauth2-full-authentication-is-required-to-access-this-resource)在同一個問題上。瞭解您在配置中錯過了什麼可能會有幫助。 –