idea启动项目报错:xxx/WEB-INF/lib/ehcache-core-2.4.3.jar

idea启动项目报错:

No configuration found. Configuring ehcache from ehcache-failsafe.xml  found in the classpath:jar:file:/D:/Codes/classes/artifacts/Codes_war_exploded/WEB-INF/lib/ehcache-core-2.4.3.jar!/ehcache-failsafe.xml

解决方法:在resources下面添加ehcache.xml文件

ehcache.xml内容:




    
    

    
    

        
    

然后在application.yml下添加:

spring:
    cache:
      ehcache:
        config: classpath:ehcache.xml

pom.xml里面添加:


    org.ehcache
    ehcache
    3.7.1

重启,解决啦!!!!

 

 

 

 

 

你可能感兴趣的:(学习记录积累)