@EnableAuthorizationServer是增加HTTP安全配置端点喜欢
/oauth/token,
/oauth/token_key在为了0等所以,你应该做的是定义一个http安全规则
/oauth/token端点只为OPTIONS HTTP方法,它是在一个更高阶。
像这样:
@Order(-1)@Configurationpublic class MyWebSecurity extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http) throws Exception { http .authorizeRequests() .antMatchers(HttpMethod.OPTIONS, "/oauth/token").permitAll() }}


