Spring Boot 2.0 解决跨域问题:WebMvcConfiguration implements WebMvcConfigurer
When allowCredentials is true, allowedOrigins cannot contain the special value “*“since that cannot
When allowCredentials is true, allowedOrigins cannot contain thespecial value "*"since that cannot be set on the “Access-Control-Allow-Origin” response header. To allow credentials to a set of origins, list them explicitly or consider using “allowedOriginPatterns” instead.
出现该问题是跨域问题,当allowCredentials为true时,allowingOrigins不能包含特殊值“ *”,因为无法在“ Access-Control-Allow-Origin”响应标头上设置。
处理方法是:首先找打你后端跨域设置文件,将方法中的addAllowedOrigin(““)替换成addAllowedOriginPattern(””)
————————————————