你们中的任何人都对我如何实施这个过程有明确的想法吗?我知道我们需要一个 XML,我们在其中对数据库进行查询,如下所示:
<security:authentication-manager>
<security:authentication-provider >
<security:jdbc-user-service data-source-ref="dataSource"
users-by-username-query="
select emailid username,password,'true' enabled from tbl_LoginDetails
where emailid=?"
authorities-by-username-query="
select a.emailid username,b.authority from tbl_LoginDetails a,tbl_UserRoles b
where a.userId=b.userId
and a.emailid=?"/>
<security:password-encoder ref="passwordEncoder">
</security:password-encoder>
</security:authentication-provider>
</security:authentication-manager>
<bean name="passwordEncoder" class="org.springframework.security.authentication.encoding.ShaPasswordEncoder">
但是,我还必须从我的 Java swing 应用程序中做些什么。我的意思是:我有一个带有两个文本框的窗口,用于输入用户和密码。我还需要做什么?