shiro*ehcache*xml启动时报错

weixin_46668875 2021-01-01 12:48:53
<?xml version="1.0" encoding="UTF-8"?>
<ehcache name="shiroCache" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"
updateCheck="false">
<diskStore path="java.io.tmpdir"/>
<defaultCache
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="false"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120" />
<!-- 授权缓存-->
<cache name="authorizationCache"
maxEntriesLocalHeap="2000"
eternal="false"
timeToIdleSeconds="3600"
timeToLiveSeconds="0"
overflowToDisk="false"
statistics="true">
</cache>
<!-- 认证缓存-->
<cache name="authenticationCache"
maxEntriesLocalHeap="2000"
eternal="false"
timeToIdleSeconds="3600"
timeToLiveSeconds="0"
overflowToDisk="false"
statistics="true">
</cache>
</ehcache>
报错:org.xml.sax.SAXParseException; systemId: http://ehcache.org/ehcache.xsd; lineNumber: 2; columnNumber: 35; s4s-elt-character: 方案元素中不允许出现除 'xs:appinfo' 和 'xs:documentation' 之外的非空格字符。发现了 '301 Moved Permanently'
新手,请大神赐教!
...全文
6976 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
lt1693016523 2021-01-04
  • 打赏
  • 举报
回复
<ehcache updateCheck="false" name="shiroCache" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="classpath:/config/ehcache.xsd">  
    <defaultCache
		maxElementsInMemory="10000"  
		eternal="false"  
		timeToIdleSeconds="120"  
		timeToLiveSeconds="120"  
		overflowToDisk="false"  
		diskPersistent="false"  
		diskExpiryThreadIntervalSeconds="120" />  
</ehcache>
改为引用本地文件解决了
lt1693016523 2021-01-04
  • 打赏
  • 举报
回复
我今天也是这个问题,还没解决 楼主解决了吗
weixin_46668875 2021-01-01
  • 打赏
  • 举报
回复
高手,试过了,不是空格的原因,但目前还找不到原因。
街头小贩 2021-01-01
  • 打赏
  • 举报
回复
你的配置文件中有非法字符,建议你用文本编辑器, 可以看到换行, 空格和回车符的编辑器

51,396

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧