0
我配置我的應用程序使用Apache四郎的安全,不過,我不斷收到在我的日誌輸出如下:Apache Shiro未配置FilterChainResolver。回到原來的FilterChain
DEBUG o.a.s.w.servlet.AbstractShiroFilter - No FilterChainResolver configured. Returning original FilterChain.
我的.ini文件看起來像這樣的時刻:
[main]
cacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager
securityManager.cacheManager = $cacheManager
authc = org.apache.shiro.web.filter.authc.BasicHttpAuthenticationFilter
authc.loginUrl = /login.xhtml
[users]
admin = password
[urls]
/login.xhtml = authc
/logout = logout
/secured/** = authc
從我的web.xml中的相關片段如下:
<listener>
<listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
</listener>
<filter>
<filter-name>ShiroFilter</filter-name>
<filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ShiroFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
我在tomcat的7容器使用Apache四郎1.2 奇怪的是,沒有太多的問題來解決這個問題,我忽略了什麼?