spring cloud security 问题

配置了security 在gateway上,就是做成api那样的,通过登录获取token,用token 去访问受保护的资源,
我这边写的页面上的访问:
var settings = {
“async”: true,
“crossDomain”: true,
“url”: “http://localhost:8120/common/validatedPoList?poList=1113740%2C111%2C121”,
“method”: “GET”,
“headers”: {
“authorization”: “BearereyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0Nzc5Mjg5NDUsInVzZXJfbmFtZSI6IlJlOGQ0ZTkiLCJhdXRob3JpdGllcyI6WyJDUkVBVEUiLCJTRUFSQ0giLCJERVRBSUwiLCJXUklURSIsIkNSRUFUT1IiLCJTRVJWSUNFX1JFUVVFU1QiLCJQUk9EX01HTVQiLCJTT1VSQ0lOR19XRiJdLCJqdGkiOiIwYWYwMTY1Ni1lMjBlLTQzNGMtOTA5YS0zOTBmMjhjNmE5NTYiLCJjbGllbnRfaWQiOiJnYXRld2F5Iiwic2NvcGUiOlsib3BlbmlkIl19.BhEOTQMRRxT1bVIg_0_R_SN1GGUvlZ4jyw1GE08NWFe8ja8rkRX9fjgExbcxVxIt3O0wxmUxQBGkyq-sSL-0qDHwTaWd2kRb5qm7gvW_4IWdO9m_PhyOPXW8JwZQ96PRRjFdfIX_CuO2VV1fsfdjymjWUM1PVOmx2zYbQvgZLPjRgOTJX_j5zsHlx5kVHud7kggG_jx48MPKmMsrjSId5oGTMnlPXk2QfUoXmK8TjYOT1fpEInVaw8G6k5h08_L1l8-wS0MuVkySmt8MkK1pSr_rQk2nu1mFoQDuyXB8XMYMKtMdB5KEOj7TFEdRzjzclKlfEAoGJbAIaxC03iyaaA”,
“cache-control”: “no-cache”
}
}

$.ajaxsettings.donefunction response {
console.logresponse;
};

道为什么报401求各位大神帮忙一下

发表评论

电子邮件地址不会被公开。 必填项已用*标注