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