<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # 31.1 支持的緩存提供商 ### 31.1 支持的緩存提供商 緩存抽象不提供實際的存儲,而是依賴于`org.springframework.cache.Cache`和`org.springframework.cache.CacheManager`接口的實現。只要通過`@EnableCaching`注解開啟緩存支持,Spring Boot就會根據實現自動配置一個合適的`CacheManager`。 **注** 如果你使用的緩存設施beans不是基于接口的,確保啟用`proxyTargetClass`,并設置其屬性為`@EnableCaching`。 **注** 使用`spring-boot-starter-cache`‘Starter’可以快速添加所需緩存依賴,如果你是手動添加依賴,需要注意一些實現只有`spring-context-support` jar才提供。 如果你還沒有定義一個`CacheManager`類型的bean,或一個名為`cacheResolver`的`CacheResolver`(查看`CachingConfigurer`),Spring Boot將嘗試以下提供商(按這個順序): - [Generic](http://docs.spring.io/spring-boot/docs/1.4.1.RELEASE/reference/htmlsingle/#boot-features-caching-provider-generic) - [JCache (JSR-107)](http://docs.spring.io/spring-boot/docs/1.4.1.RELEASE/reference/htmlsingle/#boot-features-caching-provider-jcache)(EhCache 3, Hazelcast, Infinispan, etc) - [EhCache 2.x](http://docs.spring.io/spring-boot/docs/1.4.1.RELEASE/reference/htmlsingle/#boot-features-caching-provider-ehcache2) - [Hazelcast](http://docs.spring.io/spring-boot/docs/1.4.1.RELEASE/reference/htmlsingle/#boot-features-caching-provider-hazelcast) - [Infinispan](http://docs.spring.io/spring-boot/docs/1.4.1.RELEASE/reference/htmlsingle/#boot-features-caching-provider-infinispan) - [Couchbase](http://docs.spring.io/spring-boot/docs/1.4.1.RELEASE/reference/htmlsingle/#boot-features-caching-provider-couchbase) - [Redis](http://docs.spring.io/spring-boot/docs/1.4.1.RELEASE/reference/htmlsingle/#boot-features-caching-provider-redis) - [Caffeine](http://docs.spring.io/spring-boot/docs/1.4.1.RELEASE/reference/htmlsingle/#boot-features-caching-provider-caffeine) - [Guava](http://docs.spring.io/spring-boot/docs/1.4.1.RELEASE/reference/htmlsingle/#boot-features-caching-provider-guava) - [Simple](http://docs.spring.io/spring-boot/docs/1.4.1.RELEASE/reference/htmlsingle/#boot-features-caching-provider-simple) **注**`spring.cache.type`屬性可強制指定使用的緩存提供商,如果需要在一些環境(比如,測試)中[禁用全部緩存](http://docs.spring.io/spring-boot/docs/1.4.1.RELEASE/reference/htmlsingle/#boot-features-caching-provider-none)也可以使用該屬性。 如果`CacheManager`是Spring Boot自動配置的,你可以在它完全初始化前,通過實現`CacheManagerCustomizer`接口進一步配置,以下設置使用的緩存name: ``` @Bean public CacheManagerCustomizer<ConcurrentMapCacheManager> cacheManagerCustomizer() { return new CacheManagerCustomizer<ConcurrentMapCacheManager>() { @Override public void customize(ConcurrentMapCacheManager cacheManager) { cacheManager.setCacheNames(Arrays.asList("one", "two")); } }; } ``` **注** 在以上示例中,需要配置一個`ConcurrentMapCacheManager`,如果沒有配置,則自定義器(customizer)將不會被調用。自定義器你添加多少都可以,并可以使用`@Order`或`Ordered`對它們進行排序。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看