Spring Security 3.0.5 在 Eclipse 中抛出以下警告:
Class 'org.springframework.security.core.userdetails.memory.UserMap' is marked deprecated
对于以下配置:
<security:authentication-manager>
<security:authentication-provider>
<security:user-service>
<security:user name="john" password="john"
authorities="ROLE_USER" />
<security:user name="admin" password="admin"
authorities="ROLE_USER, ROLE_ADMIN" />
<security:user name="system" password="system"
authorities="ROLE_USER, ROLE_ADMIN" />
<security:user name="guest" password="guest"
authorities="ROLE_GUEST" />
</security:user-service>
</security:authentication-provider>
</security:authentication-manager>
Javadocs说,只需使用普通地图即可。但我不确定他们的意思是什么以及普通地图的去向?我对安全命名空间提供的“帮助”有点失望……