第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

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

@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è)置為*(即默認(rèn)狀態(tài))。

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

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

舉報

0/150
提交
取消

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

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

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

幫助反饋 APP下載

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

公眾號

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