Created
October 25, 2021 09:25
-
-
Save sumanentc/8dc314de98d970ebf0adc70ebac63988 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class IgniteCacheManagerConfiguration { | |
private final String igniteConfigPath; | |
public IgniteCacheManagerConfiguration(@Value(IGNITE_CONFIG_PROP_SPRING) String igniteConfigPath) { | |
this.igniteConfigPath = igniteConfigPath; | |
} | |
@DependsOn(IGNITE_SYSTEM_PROPERTIES_CONFIGURATION) | |
@Bean | |
public CacheManager cacheManager(ResourceLoader resourceLoader) throws IOException { | |
return Caching.getCachingProvider().getCacheManager(resourceLoader | |
.getResource(igniteConfigPath).getURI(), getClass().getClassLoader()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment