The following OAuth2ResourceServerConfigurer will configure all the necessary filters required to run a Resource Server:
@Configuration
@EnableResourceServer
public class OAuth2ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
}
The preceding configuration class extends from ResourceServerConfigurerAdapter and is annotated with @EnableResourceServer to set up all the necessary filters.