I add spring-boot-starter-cache and com.github.ben-manes.caffeine:jcache on classpath , also add following properties

spring.cache.type=jcache
spring.cache.caffeine.spec=maximumSize=100,expireAfterWrite=600s
spring.cache.cache-names=projectNodes

but , the property 'spring.cache.caffeine.spec' didn't work, It seems caffeine also need a JCachePropertiesCustomizer when com.github.ben-manes.caffeine:jcache on classpath

Comment From: wilkinsona

Thanks for the report. What's your reason for using Caffeine's JCache Provider in a Spring Boot application? Doing so isn't recommended. As such, I'm not sure that it's something that we'd want to support without good reason.

Comment From: lmtoo

hibernate‘s second level cache can make use of Jcache, can't directly use caffeineCacheManager or spring's cacheManager

Comment From: snicoll

the property 'spring.cache.caffeine.spec' didn't work

Yes, that is expected. If you opt-in for JCache support rather than the native Caffeine support, you need to configure Caffeine through the JCache APIs. Spring Boot does not have any opinion when you opt-in for JCache as we have to behave how the spec mandates.