我是Spring Security的新手。我正在开发一个使用Spring Security的项目,但最近遇到了以下代码片段。我试图了解 password-encoder 和 jdbc-user-service ,但是我不了解它的工作原理。有人可以阐明这些标签吗?
<authentication-manager id="dev" alias="authenticationManager">
<authentication-provider>
<password-encoder ref="encoder"/>
<jdbc-user-service data-source-ref="dataSource"
users-by-username-query=
"select EmailId as USERNAME,Password as PASSWORD, IsActive as ENABLED from WBS_Trn_User where EmailId=?"
authorities-by-username-query=
"select u.EmailId as USERNAME, r.Code as ROLENAME from WBS_Trn_User u join WBS_Trn_Role r on r.roleId = u.RoleId where u.EmailId=?" />
</authentication-provider>
</authentication-manager>