首先我查到的是:
https://stackoverflow.com/questions/33331042/how-to-handle-http-options-requests-in-spring-boot
但是發現按照上面幾個方法都沒用
我就考慮是不是Spring Security把請求攔截了:
https://stackoverflow.com/questions/21696592/disable-spring-security-for-options-http-method
果然,忘記給權限了
果斷加上
.antMatchers(HttpMethod.OPTIONS, "/**").permitAll()
OK問題解決