一切福田,不離方寸,從心而覓,感無不通。

SpringBoot升级2.4.0所出现的问题:When allowCredentials is true, allowedOrigins cannot contain the specia

  1. When allowCredentials is true, allowedOrigins cannot contain the special 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.

翻译如下:
在这里插入图片描述

解决办法:跨域配置报错,将.allowedOrigins替换成.allowedOriginPatterns即可。

修改前:

 

修改后:

 

from:https://blog.csdn.net/jxysgzs/article/details/110818712