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
答案 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”