部署陷入“清理Shiro环境”

时间:2015-08-26 11:47:09

标签: java shiro

有时当我尝试使用Apache Shiro部署应用程序时,部署会在这些消息后冻结:

2015-08-26 08:34:39,567 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-3) JBAS017535: Unregistered web context: /shelfboard

2015-08-26 08:34:39,585 INFO  [io.undertow.servlet] (MSC service thread 1-3) Cleaning up Shiro Environment

然后,我必须杀死服务器,再次启动并重新部署。

已加载shiro-core-1.2.3shiro-web-1.2.3shiro-ehcache-1.2.3

必须做什么?

完全部署后,会显示以下消息:

2015-08-26 09:19:14,653 INFO  [io.undertow.servlet] (MSC service thread 1-2) Initializing Shiro environment

2015-08-26 09:19:14,653 INFO  [org.apache.shiro.web.env.EnvironmentLoader] (MSC service thread 1-2) Starting Shiro environment initialization.

2015-08-26 09:19:14,758 INFO  [org.apache.shiro.config.ReflectionBuilder] (MSC service thread 1-2) An instance with name 'authc' already exists.  Redefining this object as a new instance of type org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter

2015-08-26 09:19:14,859 INFO  [org.apache.shiro.realm.AuthorizingRealm] (MSC service thread 1-2) No cache or cacheManager properties have been set.  Authorization cache cannot be obtained.

2015-08-26 09:19:14,869 INFO  [org.apache.shiro.web.env.EnvironmentLoader] (MSC service thread 1-2) Shiro environment initialized in 216 ms.

2015-08-26 09:19:14,963 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-2) Inicializando Mojarra 2.2.8-jbossorg-1 20140822-1131 para o contexto '/shelfboard'

shiro.ini:

[main]

# realms to be used
customSecurityRealm = auth.CustomSecurityRealm
customSecurityRealm.jndiDataSourceName = java:jboss/datasources/ShelfBoard
builtInCacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager
securityManager.cacheManager = $builtInCacheManager

# specify login page
authc.loginUrl = /login.xhtml
authc = org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter
securityManager.rememberMeManager.cookie.name = demoRememberMe

# redirect after successful login
authc.successUrl  = /home.xhtml

# redirect to an error page if user does not have access rights
roles.unauthorizedUrl = /acesso-negado.xhtml

[urls]
/acesso-negado.xhtml = anon
/esqueci-senha.xhtml = anon
/resources/** = anon
/ajuda.xhtml = authc
/index.xhtml = authc

(etc)

0 个答案:

没有答案