Spring Boot 2.0.5升级到2.1.1在启动Jcache问题上失败

时间:2018-12-14 11:07:11

标签: spring-boot caching spring-boot-actuator

SpringBoot启动时出现错误。与旧版本一样工作。我怀疑与2.1.x版中已添加的新执行器指标(/ actuator / caches)有关的问题。该如何解决?

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'objectMapperConfigurer' defined in class path resource [springfox/documentation/spring/web/SpringfoxWebMvcConfiguration.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.annotation.ProxyCachingConfiguration': BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.config.internalJCacheAdvisor' defined in class path resource [org/springframework/cache/jcache/config/ProxyJCacheConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cache.jcache.interceptor.BeanFactoryJCacheOperationSourceAdvisor]: Factory method 'cacheAdvisor' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jCacheOperationSource' defined in class path resource [org/springframework/cache/jcache/config/ProxyJCacheConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cache.jcache.interceptor.JCacheOperationSource]: Factory method 'cacheOperationSource' threw exception; nested exception is java.lang.NoSuchFieldError: cacheManager

1 个答案:

答案 0 :(得分:0)

通过添加gradle解决 // https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-cache 编译组:“ org.springframework.boot”,名称:“ spring-boot-starter-cache”,版本:“ 2.1.1.RELEASE”