sporingboot2.4之后已经不支持

addAllowedOrigin("*")

配置跨域了,需要改成

addAllowedOriginPattern("*")