亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

spring security 問題,獲取不到用戶信息,而能打印出以下信息:為什么

spring security 問題,獲取不到用戶信息,而能打印出以下信息:為什么

偶然的你 2022-10-19 15:15:40
Authentication event AuthenticationSuccessEvent: test777; details: org.springframework.security.ui.WebAuthenticationDetails@957e: RemoteIpAddress: 127.0.0.1; SessionId: 46399F4EF5621F5F9E37D3F9D1051812WARN - Authentication event InteractiveAuthenticationSuccessEvent: test777; details: org.springframework.security.ui.WebAuthenticationDetails@957e: RemoteIpAddress: 127.0.0.1; SessionId: 46399F4EF5621F5F9E37D3F9D1051812但是:SecurityContextHolder.getContext().getAuthentication().getPrincipal()得不用戶信息跟蹤:authentication 為null
查看完整描述

2 回答

?
蕭十郎

TA貢獻1815條經驗 獲得超13個贊

說明白點,能登陸不?驗證下Security配置文件中的SQL語句是否正確,Security配置文件放出來看看。

查看完整回答
反對 回復 2022-10-24
?
炎炎設計

TA貢獻1808條經驗 獲得超4個贊

getAuthentication() 方法的返回值為 null,你可以先看看 getContext()的返回值是什么,如果這里的 authentication 為空,你再查查為什么。

查看完整回答
反對 回復 2022-10-24
  • 2 回答
  • 0 關注
  • 287 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號