Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

springboot 3.3.8 和jetcache2.7.4 整合时,启动出现错误:org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.alicp.jetcache.CacheManager' available #961

Open
jcrao opened this issue Feb 18, 2025 · 3 comments

Comments

@jcrao
Copy link

jcrao commented Feb 18, 2025

pom:

@jcrao
Copy link
Author

jcrao commented Feb 18, 2025

com.alicp.jetcache jetcache-autoconfigure ${jetcache.version} org.springframework.boot spring-boot-starter com.alicp.jetcache jetcache-anno ${jetcache.version} org.springframework spring-context com.alicp.jetcache jetcache-redis-springdata ${jetcache.version} org.springframework.data spring-data-redis

@jcrao
Copy link
Author

jcrao commented Feb 18, 2025

使用方式: import com.alicp.jetcache.Cache;
import com.alicp.jetcache.anno.CacheType;
import com.alicp.jetcache.anno.CreateCache;
import net.xuanyutech.gwsr.base.model.Device;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.TimeUnit;

/**

  • 缓存类

  • Created by liheng on 2020/05/07
    */
    @configuration
    public class Caches {

    @CreateCache(name = CacheKey.DEVICE_CACHE, timeUnit = TimeUnit.DAYS, expire = 30, cacheType = CacheType.REMOTE)
    private Cache<String, Device> deviceCache;

    /**

    • 设备缓存
    • @return
      */
      public Cache<String, Device> getDeviceCache() {
      return this.deviceCache;
      }

@jcrao
Copy link
Author

jcrao commented Feb 18, 2025

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant