类 EhCacheManagerUtils

    • 方法详细资料

      • buildCacheManager

        public static CacheManager buildCacheManager()
                                              throws CacheException
        Build an EhCache CacheManager from the default configuration.

        The CacheManager will be configured from "ehcache.xml" in the root of the class path (that is, default EhCache initialization - as defined in the EhCache docs - will apply). If no configuration file can be found, a fail-safe fallback configuration will be used.

        返回:
        the new EhCache CacheManager
        抛出:
        CacheException - in case of configuration parsing failure
      • buildCacheManager

        public static CacheManager buildCacheManager​(String name)
                                              throws CacheException
        Build an EhCache CacheManager from the default configuration.

        The CacheManager will be configured from "ehcache.xml" in the root of the class path (that is, default EhCache initialization - as defined in the EhCache docs - will apply). If no configuration file can be found, a fail-safe fallback configuration will be used.

        参数:
        name - the desired name of the cache manager
        返回:
        the new EhCache CacheManager
        抛出:
        CacheException - in case of configuration parsing failure
      • buildCacheManager

        public static CacheManager buildCacheManager​(String name,
                                                     Resource configLocation)
                                              throws CacheException
        Build an EhCache CacheManager from the given configuration resource.
        参数:
        name - the desired name of the cache manager
        configLocation - the location of the configuration file (as a Spring resource)
        返回:
        the new EhCache CacheManager
        抛出:
        CacheException - in case of configuration parsing failure