https://blog.csdn.net/zhaokejin521/article/details/81007884
note:
If you are using Spring Security, make sure you have enabled CORS in Spring Security
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.cors().and()...
}
}