org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer Java Examples
The following examples show how to use
org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CacheConfiguration.java From Spring-5.0-Projects with MIT License | 6 votes |
@Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return cm -> { cm.createCache(com.nilangpatel.repository.UserRepository.USERS_BY_LOGIN_CACHE, jcacheConfiguration); cm.createCache(com.nilangpatel.repository.UserRepository.USERS_BY_EMAIL_CACHE, jcacheConfiguration); cm.createCache(com.nilangpatel.domain.User.class.getName(), jcacheConfiguration); cm.createCache(com.nilangpatel.domain.Authority.class.getName(), jcacheConfiguration); cm.createCache(com.nilangpatel.domain.User.class.getName() + ".authorities", jcacheConfiguration); cm.createCache(com.nilangpatel.domain.PersistentToken.class.getName(), jcacheConfiguration); cm.createCache(com.nilangpatel.domain.User.class.getName() + ".persistentTokens", jcacheConfiguration); cm.createCache(com.nilangpatel.domain.Country.class.getName(), jcacheConfiguration); cm.createCache(com.nilangpatel.domain.Country.class.getName() + ".cities", jcacheConfiguration); cm.createCache(com.nilangpatel.domain.Country.class.getName() + ".countryLanguages", jcacheConfiguration); cm.createCache(com.nilangpatel.domain.City.class.getName(), jcacheConfiguration); cm.createCache(com.nilangpatel.domain.CountryLanguage.class.getName(), jcacheConfiguration); // jhipster-needle-ehcache-add-entry }; }
Example #2
Source File: CacheConfig.java From amazon-ecs-java-microservices with Apache License 2.0 | 5 votes |
@Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return cm -> { Configuration<Object, Object> cacheConfiguration = createCacheConfiguration(); cm.createCache("vets", cacheConfiguration); }; }
Example #3
Source File: CacheConfiguration.java From tutorials with MIT License | 5 votes |
@Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return cm -> { cm.createCache(com.baeldung.domain.User.class.getName(), jcacheConfiguration); cm.createCache(com.baeldung.domain.Authority.class.getName(), jcacheConfiguration); cm.createCache(com.baeldung.domain.User.class.getName() + ".authorities", jcacheConfiguration); cm.createCache(com.baeldung.domain.Post.class.getName(), jcacheConfiguration); cm.createCache(com.baeldung.domain.Comment.class.getName(), jcacheConfiguration); // jhipster-needle-ehcache-add-entry }; }
Example #4
Source File: InitializrAutoConfiguration.java From initializr with Apache License 2.0 | 5 votes |
@Bean JCacheManagerCustomizer initializrCacheManagerCustomizer() { return (cacheManager) -> { cacheManager.createCache("initializr.metadata", config().setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(Duration.TEN_MINUTES))); cacheManager.createCache("initializr.dependency-metadata", config()); cacheManager.createCache("initializr.project-resources", config()); cacheManager.createCache("initializr.templates", config()); }; }
Example #5
Source File: CacheConfiguration.java From 21-points with Apache License 2.0 | 5 votes |
@Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return cm -> { cm.createCache(org.jhipster.health.repository.UserRepository.USERS_BY_LOGIN_CACHE, jcacheConfiguration); cm.createCache(org.jhipster.health.repository.UserRepository.USERS_BY_EMAIL_CACHE, jcacheConfiguration); cm.createCache(org.jhipster.health.domain.User.class.getName(), jcacheConfiguration); cm.createCache(org.jhipster.health.domain.Authority.class.getName(), jcacheConfiguration); cm.createCache(org.jhipster.health.domain.User.class.getName() + ".authorities", jcacheConfiguration); cm.createCache(org.jhipster.health.domain.BloodPressure.class.getName(), jcacheConfiguration); cm.createCache(org.jhipster.health.domain.Weight.class.getName(), jcacheConfiguration); cm.createCache(org.jhipster.health.domain.Points.class.getName(), jcacheConfiguration); cm.createCache(org.jhipster.health.domain.Preferences.class.getName(), jcacheConfiguration); // jhipster-needle-ehcache-add-entry }; }
Example #6
Source File: CfpApplication.java From spring-boot-samples with Apache License 2.0 | 5 votes |
@Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return cm -> { cm.createCache("github.commits", initConfiguration(Duration.TEN_MINUTES)); cm.createCache("github.polishCommit", initConfiguration(Duration.ONE_HOUR)); cm.createCache("github.user", initConfiguration(Duration.ONE_HOUR)); }; }
Example #7
Source File: CacheConfig.java From amazon-ecs-java-microservices with Apache License 2.0 | 5 votes |
@Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return cm -> { Configuration<Object, Object> cacheConfiguration = createCacheConfiguration(); cm.createCache("vets", cacheConfiguration); }; }
Example #8
Source File: CacheConfig.java From amazon-ecs-java-microservices with Apache License 2.0 | 5 votes |
@Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return cm -> { Configuration<Object, Object> cacheConfiguration = createCacheConfiguration(); cm.createCache("vets", cacheConfiguration); }; }
Example #9
Source File: CacheConfiguration.java From alchemy with Apache License 2.0 | 5 votes |
@Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return cm -> { createCache(cm, com.dfire.platform.alchemy.repository.UserRepository.USERS_BY_LOGIN_CACHE); createCache(cm, com.dfire.platform.alchemy.repository.UserRepository.USERS_BY_EMAIL_CACHE); // jhipster-needle-ehcache-add-entry }; }
Example #10
Source File: CacheConfiguration.java From scava with Eclipse Public License 2.0 | 5 votes |
@Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return cm -> { cm.createCache(org.eclipse.scava.authservice.repository.UserRepository.USERS_BY_LOGIN_CACHE, jcacheConfiguration); cm.createCache(org.eclipse.scava.authservice.repository.UserRepository.USERS_BY_EMAIL_CACHE, jcacheConfiguration); // jhipster-needle-ehcache-add-entry }; }
Example #11
Source File: CacheConfiguration.java From jhipster-online with Apache License 2.0 | 5 votes |
@Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return cm -> { createIfNotExists(cm, STATISTICS_YORC_COUNT, statisticsJcacheConfiguration); createIfNotExists(cm, STATISTICS_JDL_COUNT, statisticsJcacheConfiguration); createIfNotExists(cm, STATISTICS_USERS_COUNT, statisticsJcacheConfiguration); createIfNotExists(cm, io.github.jhipster.online.repository.UserRepository.USERS_BY_LOGIN_CACHE, jcacheConfiguration); createIfNotExists(cm, io.github.jhipster.online.repository.UserRepository.USERS_BY_EMAIL_CACHE, jcacheConfiguration); createIfNotExists(cm, io.github.jhipster.online.domain.User.class.getName(), jcacheConfiguration); createIfNotExists(cm, io.github.jhipster.online.domain.User.class.getName() + ".gitCompanies", jcacheConfiguration); createIfNotExists(cm, io.github.jhipster.online.domain.Authority.class.getName(), jcacheConfiguration); createIfNotExists(cm, io.github.jhipster.online.domain.User.class.getName() + ".authorities", jcacheConfiguration); createIfNotExists(cm, io.github.jhipster.online.domain.Jdl.class.getName(), jcacheConfiguration); createIfNotExists(cm, io.github.jhipster.online.domain.JdlMetadata.class.getName(), jcacheConfiguration); createIfNotExists(cm, io.github.jhipster.online.domain.GitCompany.class.getName(), jcacheConfiguration); createIfNotExists(cm, io.github.jhipster.online.domain.GitCompany.class.getName() + ".gitProjects", jcacheConfiguration); createIfNotExists(cm, io.github.jhipster.online.domain.YoRC.class.getName(), jcacheConfiguration); createIfNotExists(cm, io.github.jhipster.online.domain.YoRC.class.getName() + ".languages", jcacheConfiguration); createIfNotExists(cm, io.github.jhipster.online.domain.GeneratorIdentity.class.getName(), jcacheConfiguration); createIfNotExists(cm, io.github.jhipster.online.domain.YoRC.class.getName() + ".testFrameworks", jcacheConfiguration); createIfNotExists(cm, io.github.jhipster.online.domain.YoRC.class.getName() + ".selectedLanguages", jcacheConfiguration); createIfNotExists(cm, io.github.jhipster.online.domain.SubGenEvent.class.getName(), jcacheConfiguration); createIfNotExists(cm, io.github.jhipster.online.domain.EntityStats.class.getName(), jcacheConfiguration); // jhipster-needle-ehcache-add-entry }; }
Example #12
Source File: CacheConfiguration.java From Full-Stack-Development-with-JHipster with MIT License | 5 votes |
@Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return cm -> { cm.createCache(com.jhipsterbook.demo.repository.UserRepository.USERS_BY_LOGIN_CACHE, jcacheConfiguration); cm.createCache(com.jhipsterbook.demo.repository.UserRepository.USERS_BY_EMAIL_CACHE, jcacheConfiguration); cm.createCache(com.jhipsterbook.demo.domain.User.class.getName(), jcacheConfiguration); cm.createCache(com.jhipsterbook.demo.domain.Authority.class.getName(), jcacheConfiguration); cm.createCache(com.jhipsterbook.demo.domain.User.class.getName() + ".authorities", jcacheConfiguration); cm.createCache(com.jhipsterbook.demo.domain.Employee.class.getName(), jcacheConfiguration); // jhipster-needle-ehcache-add-entry }; }
Example #13
Source File: CacheConfiguration.java From TeamDojo with Apache License 2.0 | 5 votes |
@Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return cm -> { cm.createCache(UserRepository.USERS_BY_LOGIN_CACHE, jcacheConfiguration); cm.createCache(UserRepository.USERS_BY_EMAIL_CACHE, jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.User.class.getName(), jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Authority.class.getName(), jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.User.class.getName() + ".authorities", jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.PersistentToken.class.getName(), jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.User.class.getName() + ".persistentTokens", jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Dimension.class.getName(), jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Dimension.class.getName() + ".participants", jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Dimension.class.getName() + ".levels", jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Dimension.class.getName() + ".badges", jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Skill.class.getName(), jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Skill.class.getName() + ".teams", jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Skill.class.getName() + ".badges", jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Skill.class.getName() + ".levels", jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Team.class.getName(), jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Team.class.getName() + ".participations", jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Team.class.getName() + ".skills", jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.TeamSkill.class.getName(), jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Level.class.getName(), jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Level.class.getName() + ".skills", jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Badge.class.getName(), jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Badge.class.getName() + ".skills", jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Badge.class.getName() + ".dimensions", jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.BadgeSkill.class.getName(), jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.LevelSkill.class.getName(), jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Organization.class.getName(), jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Report.class.getName(), jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Comment.class.getName(), jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Activity.class.getName(), jcacheConfiguration); cm.createCache(de.otto.teamdojo.domain.Image.class.getName(), jcacheConfiguration); // jhipster-needle-ehcache-add-entry }; }
Example #14
Source File: CacheConfiguration.java From java-microservices-examples with Apache License 2.0 | 5 votes |
@Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return cm -> { createCache(cm, com.okta.developer.gateway.repository.UserRepository.USERS_BY_LOGIN_CACHE); createCache(cm, com.okta.developer.gateway.repository.UserRepository.USERS_BY_EMAIL_CACHE); createCache(cm, com.okta.developer.gateway.domain.User.class.getName()); createCache(cm, com.okta.developer.gateway.domain.Authority.class.getName()); createCache(cm, com.okta.developer.gateway.domain.User.class.getName() + ".authorities"); // jhipster-needle-ehcache-add-entry }; }
Example #15
Source File: CacheConfiguration.java From spring-init with Apache License 2.0 | 4 votes |
@Bean public JCacheManagerCustomizer petclinicCacheConfigurationCustomizer() { return cm -> { cm.createCache("vets", cacheConfiguration()); }; }
Example #16
Source File: InitializrAutoConfigurationTests.java From initializr with Apache License 2.0 | 4 votes |
@Test void cacheConfiguration() { this.contextRunner.run((context) -> assertThat(context).hasSingleBean(JCacheManagerCustomizer.class)); }
Example #17
Source File: InitializrAutoConfigurationTests.java From initializr with Apache License 2.0 | 4 votes |
@Test void cacheConfigurationConditionalOnClass() { this.contextRunner.withClassLoader(new FilteredClassLoader("javax.cache.CacheManager")) .run((context) -> assertThat(context).doesNotHaveBean(JCacheManagerCustomizer.class)); }