Skip to content

Commit

Permalink
adjusts to infinispan cache
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Nov 20, 2022
1 parent d49b9df commit a675bbc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
3 changes: 2 additions & 1 deletion generators/base/generator-base.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2555,13 +2555,14 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
dest.buildToolUnknown = !dest.buildToolGradle && !dest.buildToolMaven;
dest.buildDir = this.getBuildDirectoryForBuildTool(dest.buildTool);

dest.cacheProviderNo = dest.cacheProvider === NO_CACHE;
dest.cacheProviderNo = !dest.cacheProvider || dest.cacheProvider === NO_CACHE;
dest.cacheProviderCaffeine = dest.cacheProvider === CAFFEINE;
dest.cacheProviderEhCache = dest.cacheProvider === EHCACHE;
dest.cacheProviderHazelcast = dest.cacheProvider === HAZELCAST;
dest.cacheProviderInfinispan = dest.cacheProvider === INFINISPAN;
dest.cacheProviderMemcached = dest.cacheProvider === MEMCACHED;
dest.cacheProviderRedis = dest.cacheProvider === REDIS;
dest.cacheProviderAny = !dest.cacheProviderNo;

dest.devDatabaseTypeH2Disk = dest.devDatabaseType === H2_DISK;
dest.devDatabaseTypeH2Memory = dest.devDatabaseType === H2_MEMORY;
Expand Down
4 changes: 3 additions & 1 deletion generators/server/templates/build.gradle.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,9 @@ if (SPRING_BOOT_VERSION.indexOf('M') > -1 || SPRING_BOOT_VERSION.indexOf('RC') >
<%_ } _%>
<%_ if (cacheProviderInfinispan) { _%>
implementation "org.infinispan:infinispan-hibernate-cache-v60"
implementation "org.infinispan:infinispan-spring-boot-starter-embedded"
implementation group: "org.infinispan", name: "infinispan-spring-boot-starter-embedded", {
exclude group: "org.infinispan", module: "infinispan-core"
}
implementation "org.infinispan:infinispan-core-jakarta"
implementation "org.infinispan:infinispan-jcache"
compileOnly "org.infinispan:infinispan-component-annotations"
Expand Down
6 changes: 6 additions & 0 deletions generators/server/templates/pom.xml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,12 @@
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-spring-boot-starter-embedded</artifactId>
<exclusions>
<exclusion>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ spring:
<%_ } _%>
application:
name: <%= baseName %>
<%_ if (cacheProviderInfinispan) { _%>
cache:
type: <%= cacheProvider %>
<%_ } _%>
<%_ if (serviceDiscoveryConsul || (applicationTypeGateway && reactive) || messageBrokerKafka) { _%>
cloud:
<%_ if (serviceDiscoveryConsul) { _%>
Expand Down

0 comments on commit a675bbc

Please sign in to comment.