NutzCN Logo
问答 对应shiro.ini中指定的ehcache.xml中定义的name在哪里
发布于 2403天前 作者 qq_4945a577 1598 次浏览 复制 上一个帖子 下一个帖子
标签:

"args" : ["nutzbook"] // 对应shiro.ini中指定的ehcache.xml中定义的name

var ioc = {
    "cacheManager" : {
        "type" : "net.sf.ehcache.CacheManager",
        "factory" : "net.sf.ehcache.CacheManager#getCacheManager",
        "args" : ["nutzbook"] // 对应shiro.ini中指定的ehcache.xml中定义的name
    }
    /*
    // 如果不需要shiro初始化的Ehcache, 使用下面的方式配置
    "cacheManager" : {
        "type" : "net.sf.ehcache.CacheManager",
        "factory" : "net.sf.ehcache.CacheManager#create"
    }
     */
};

shiro.ini中ehcache.xml的这个文件在哪里(maven项目)

[main]
nutzdao_realm = SimpleAuthorizingRealm

authc = org.nutz.integration.shiro.SimpleAuthenticationFilter
authc.loginUrl  = /user/login
logout.redirectUrl= /user/login
cacheManager = org.apache.shiro.cache.ehcache.EhCacheManager
cacheManager.cacheManagerConfigFile=classpath:ehcache.xml
#nutzdao_realm.cacheManager = $cacheManager
[urls]
/rs/*        = anon
/user/logout = logout
/user/error  = anon
/user/login  = anon
/user/profile/active/mail = anon
7 回复

因为需要把nutzbook改成别的名字所以在修改项目中nutzbook痕迹

ehcache.xml里面

xsi:noNamespaceSchemaLocation="ehcache.xsd"报错说解析找不到ehcache.xsd

<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="false"
         monitoring="autodetect" dynamicConfig="true" name="visualdisplay">

IDE 在这个ehcache.xsd出现的位置显示红色报警,提示cannot resolve file 'ehcache.xsd'

添加回复
请先登陆
回到顶部