最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號安全,請及時綁定郵箱和手機立即綁定

@CrossOrigin(allowCredentials = "true",allowedHeaders = "*") 總是報錯

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: 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.

http://img1.sycdn.imooc.com//611a64b50001691b19110697.jpg

正在回答

1 回答

在最新的?2.5.2?版本中,使用這種方式運行項目會報錯,使用了 allowCredentials = “true” 之后,不可以把origin設(shè)置為*(即默認狀態(tài))。

如果在IDEA里運行可以加上域名否則就用第二行的

@CrossOrigin(origins?=?"http://localhost:63342",allowCredentials?=?"true",allowedHeaders?=?"*")
@CrossOrigin(origins?=?{"?*?"},?allowedHeaders="*")
下載視頻 ? ? ? ? ?
0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

@CrossOrigin(allowCredentials = "true",allowedHeaders = "*") 總是報錯

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號