gpt4 book ai didi

java - Netbeans 8.0.1 找不到 shiro.ini

转载 作者:行者123 更新时间:2023-11-30 08:01:51 26 4
gpt4 key购买 nike

我在WEB-INF下的网页下添加了这个shir.ini:

[main]
# Objects and their properties are defined here,
# Such as the securityManager, Realms and anything
# else needed to build the SecurityManager
shiro.loginUrl = /index.jsp
[users]
root = 12345,admin
guest = 12345,guest

[roles]
admin = *

[urls]
/index.xhtml = authc
/login.xhtml = authc
/info.xhtml = anon
/logout = logout
/admin/** = authc, roles[admin]

但是在 glassfish server 4.1 窗口中,我收到此错误:

SEVERE:   [admin-listener(5)] INFO org.apache.shiro.web.env.EnvironmentLoader - Starting Shiro environment initialization.
SEVERE: [admin-listener(5)] ERROR org.apache.shiro.web.env.EnvironmentLoader - Shiro environment initialization failed
SEVERE: org.apache.shiro.config.ConfigurationException: Shiro INI configuration was either not found or discovered to be empty/unconfigured.

您知道原因是什么或如何解决吗?

最佳答案

不一定,

扩展 ResourceBasedWebEnvironment

IniWebEnvironment 类将默认配置位置指定为 /WEB-INF/shiro.iniclasspath:shiro。 ini

关于java - Netbeans 8.0.1 找不到 shiro.ini,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31804499/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com