ajax沒(méi)有攜帶cookie
a調(diào)用b,已經(jīng)在b添加了cookie,就是報(bào)錯(cuò)
Resolved exception caused by Handler execution: org.springframework.web.bind.ServletRequestBindingException: Missing cookie 'coo' for method parameter of type String
a調(diào)用b,已經(jīng)在b添加了cookie,就是報(bào)錯(cuò)
Resolved exception caused by Handler execution: org.springframework.web.bind.ServletRequestBindingException: Missing cookie 'coo' for method parameter of type String
2018-06-24
舉報(bào)
2019-03-10
今天又試了試,? 是我錯(cuò)了,?原因是我把cookie添加到了 http://127.0.0.1:8080域名下,這樣就會(huì)報(bào)Missing cookie 'xxx' for method parameter of type String
因?yàn)閍jax的url寫(xiě)的是http://localhost:8080,? 這樣自然讀不到127.0.0.1:8080下的cookie,?
請(qǐng)注意localhost和127.0.0.1是兩個(gè)域,?一定要確保一致
講師是對(duì)的,?A發(fā)ajax請(qǐng)求給B,?帶著的是B的cookie,?還是受限于同源策略, ajax的Request URL是B,?cookie就是B的
2019-03-08
我也報(bào)這個(gè)錯(cuò),?然后我把cookie加到客戶(hù)端,?也就是8081端口上, 把服務(wù)端(8080)的cookie刪掉, 就行了.
我認(rèn)為講師講的不對(duì),?發(fā)起人才能帶cookie,?你從8081訪問(wèn)8080,? ajax帶著的是8081的cookie
2018-09-16
coo? 拼寫(xiě)檢查了嗎