如何启用Spring Security的日志记录?
我正在设置Spring Security来处理登录用户。我已经以用户身份登录,并且在成功登录后进入“拒绝访问”错误页面。我不知道实际上为用户分配了哪些角色,或者不知道导致访问被拒绝的规则,因为我不知道如何为Spring Security库启用调试。 我的安全性xml: <?xml version="1.0" encoding="UTF-8"?> <beans ... > <!-- security --> <security:debug/><!-- doesn't seem to be working --> <security:http auto-config="true"> <security:intercept-url pattern="/Admin**" access="hasRole('PROGRAMMER') or hasRole('ADMIN')"/> <security:form-login login-page="/Load.do" default-target-url="/Admin.do?m=loadAdminMain" authentication-failure-url="/Load.do?error=true" username-parameter="j_username" password-parameter="j_password" login-processing-url="/j_spring_security_check"/> <security:csrf/><!-- enable Cross Site Request Forgery protection --> </security:http> <security:authentication-manager> <security:authentication-provider> <security:jdbc-user-service data-source-ref="loginDataSource" users-by-username-query="SELECT username, password, …