我正在尝试使用FilterChainProxy将Spring Security配置从HTTP命名空间转换为直接配置.在转换之前,HTTP命名空间的一切都很好.但是在用FilterChainProxy用几个元素替换元素之后,我在登录系统时遇到了"j_spring_security_check not found"错误.我尝试用"/ app/j_spring_security_check"更改全部或部分"/ j_spring_security_check"但仍无法成功登录.
我的环境:AppFuse 2.1包含Spring MVC,iBatis,Spring Security 3.0.7,tuckey urlrewrite 3.2.0,Spring 3.0.6 Windows 7 JDK 1.5.0_17 Maven 2.2.1 apache-tomcat-6.0.32
Security.xml(在转换之前,一切正常.)
…
<http auto-config="true" lowercase-comparisons="false">
<intercept-url pattern="/images/**" filters="none"/>
<intercept-url pattern="/styles/**" filters="none"/>
<intercept-url pattern="/scripts/**" filters="none"/>
<intercept-url pattern="/app/admin/**" access="ROLE_ADMIN"/>
<intercept-url pattern="/app/passwordHint*" access="ROLE_ANONYMOUS,ROLE_ADMIN,ROLE_USER"/>
<intercept-url pattern="/app/signup*" access="ROLE_ANONYMOUS,ROLE_ADMIN,ROLE_USER"/>
<intercept-url pattern="/app/**" access="ROLE_ADMIN,ROLE_USER"/>
<form-login login-page="/login" authentication-failure-url="/login?error=true"
login-processing-url="/j_spring_security_check"/>
<remember-me user-service-ref="userDao" key="e37f4b31-0c45-11dd-bd0b-0800200c9a66"/>
</http>
<authentication-manager alias="authenticationManager">
<authentication-provider user-service-ref="userDao">
<password-encoder ref="passwordEncoder"/>
</authentication-provider>
</authentication-manager>
…
Run Code Online (Sandbox Code Playgroud)
Security.xml(替换http命名空间后,找不到"j_spring_security_check")
<beans:bean id="springSecurityFilterChain"
class="org.springframework.security.web.FilterChainProxy">
<filter-chain-map path-type="ant">
<filter-chain pattern="/images/**" filters="none"/>
<filter-chain pattern="/styles/**" filters="none"/>
<filter-chain pattern="/scripts/**" filters="none"/>
<filter-chain …Run Code Online (Sandbox Code Playgroud) 我在使用Jeffrey Friedl的着作Mastering Regular Expressions 3rd Ed的"负面外观"代码运行我的perl脚本时遇到以下错误.(第167页).任何人都可以帮我吗?
错误消息:
序列(?在正则表达式中不完整;用< - HERE标记m /((?< - HERE/at /home/wubin28/mastering_regex_cn/p167.pl第13行.
我的perl脚本
#!/usr/bin/perl
use 5.006;
use strict;
use warnings;
my $str = "<B>Billions and <B>Zillions</B> of suns";
if ($str =~ m!
(
<B>
(
(?!<B>) ## line 13
.
)*?
</B>
)
!x
) {
print "\$1: $1\n"; #output: <B>Billions and <B>Zillions</B>
} else {
print "not matched.\n";
}
Run Code Online (Sandbox Code Playgroud)