0
点赞
收藏
分享

微信扫一扫

缓存ehcache启动失败Factory method ‘ehCacheCacheManager‘ threw exception

爱写作的小土豆 2022-01-14 阅读 67

启动失败了,报了如下错误:

以前一直在用,没有问题,新项目报错。

新项目唯一不同的是使用了easyexcel得错误生成pom

查看easyexcel的pom.xml,找到了这个

        <dependency>
            <groupId>com.github.duanyashu</groupId>
            <artifactId>easyExcel-errorExport</artifactId>
            <version>1.1.1</version>   
        </dependency>

基本上定位问题所在了,org.ehcache和net.sf.ehcache有冲突,那么既然easyexcel已经引用了,我们就去掉net.sf.ehcache。

然后依然报错,有了新的提示,告诉我们无法连接redis,懂了。

那么我们尝试一下用net.sf.ehcache,排除org.ehcache。

 <dependency>
            <groupId>com.github.duanyashu</groupId>
            <artifactId>easyExcel-errorExport</artifactId>
            <version>1.1.1</version>
            <exclusions>
                <exclusion>
                    <groupId>org.ehcache</groupId>
                    <artifactId>ehcache</artifactId>
                </exclusion>
            </exclusions>
 </dependency>

启动成功了。

举报

相关推荐

0 条评论