http://192.168.0.113:8080/upload/imgs/YI[LCK_`{~1}4C3P`~C%F_O.png
这个是我访问图片的路径,访问的时候会被拦截器拦截然后跳回登陆页面。
我尝试去掉拦截去访问图片,搞了大半天了但还是失败了,所以特意来请教各位。
下面是shiro.ini的配置------------------------------------------------------------
[main]
#Session
sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager
# Session Cache
# sessionDAO = org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO
# sessionManager.sessionDAO = $sessionDAO
cacheManager = org.apache.shiro.cache.ehcache.EhCacheManager
cacheManager.cacheManagerConfigFile=classpath:ehcache.xml
securityManager.cacheManager = $cacheManager
# sessionIdGenerator=org.apache.shiro.session.mgt.eis.JavaUuidSessionIdGenerator
# sessionDAO.sessionIdGenerator=$sessionIdGenerator
# session listener
sessionListener=com.dd.listener.ShiroSessionListener
sessionManager.sessionListeners=$sessionListener
# cookie
sessionIdCookie=org.apache.shiro.web.servlet.SimpleCookie
sessionIdCookie.name=sid
sessionIdCookie.maxAge=43200000
sessionIdCookie.httpOnly=true
sessionManager.sessionIdCookie=$sessionIdCookie
sessionManager.sessionIdCookieEnabled=true
sessionManager.globalSessionTimeout=43200000
securityManager.sessionManager = $sessionManager
#user
user_realm = com.dd.realm.SimpleAuthorizingRealm
user_realm.cacheManager = $cacheManager
#mis
#authc = com.dd.filter.AuthenticationFilter
authc.loginUrl = /login.html
authc.successUrl = /user/chat
#authc.failureKeyAttribute=shiroLoginFailure
[urls]
/user/getUser = anon
/user/quit = anon
/user/loginImp = anon
/user/chat = anon
/user/chat1 = anon
/user/getOldMsgs = anon
/user/updteMesssageZt = anon
/user/seachUser = anon
/user/seach = anon
/user/getInitData = anon
/user/unreadMsgCount = anon
/user/getMsg = anon
/user/markRead = anon
/user/message = anon
/user/testDemo = anon
/upload/image = anon
/upload/imgs = anon
/upload/files = anon
/user/updteMesssageZt= anon
/user/getInitData= anon
/user/registry = anon
/login.html = anon
/user/login = anon
/css/** = anon
/js/** = anon
/img/** = anon
/user/logout = logout
/** = authc
下面是web.xml配置-----------------------------------------------------------------------------------------------------
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
Archetype Created Web Application
login.html
org.apache.shiro.web.env.EnvironmentLoaderListener
shiroEnvironmentClass
org.apache.shiro.web.env.IniWebEnvironment
shiroConfigLocations
classpath:shiro.ini
ShiroFilter
org.apache.shiro.web.servlet.ShiroFilter
ShiroFilter
/*
<filter>
<filter-name>DruidWebStatFilter</filter-name>
<filter-class>com.alibaba.druid.support.http.WebStatFilter</filter-class>
<init-param>
<param-name>exclusions</param-name>
<param-value>*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*,/rs/*</param-value>
</init-param>
DruidWebStatFilter
/*
nutz
org.nutz.mvc.NutFilter
modules
com.dd.MainModule
nutz
/*
REQUEST
FORWARD
freemarker
freemarker.ext.servlet.FreemarkerServlet
TemplatePath
/
template_exception_handler
ignore
ContentType
text/html
template_update_delay
0
default_encoding
UTF-8
locale
zh_CN
number_format
0.##########
datetime_format
yyyy-MM-dd HH:mm:ss
2
freemarker
*.ftl
freemarker
*.html
com.dd.listener.SessionListener
1440000