spring oauth error Full authentication is required to access this resource

Our application is using spring security to secure the application,i just added one rest controller which supporting spring oauth security, for oauth token validation, will be called by some other application following are my controller code

public class Controller extends BaseRestController{

    @RequestMapping(value="/api/v1/public/insertData", method=RequestMethod.POST)
    ResponseEntity<?> insertTPQueueData(TitleProcurementQueue queue,Authentication authentication) {
        return null;


after adding spring oauth security i am getting following error for my other controller using spring security

Full authentication is required to access this resource

Please help

When you put security in your project spring implement some filters, like Cors, basic auth etc..
So you need to tell spring how apply security in your resources.
enter link description here

need to create a class with @EnableWebSecurity
and configure like this:

    protected void configure(HttpSecurity http) throws Exception {
        .antMatchers(HttpMethod.OPTIONS, "/**").permitAll()