Skip to content

Commit

Permalink
Merge pull request #27 from liangyuanpeng/profiles
Browse files Browse the repository at this point in the history
Add profiles for build
  • Loading branch information
liangyuanpeng authored Jan 19, 2024
2 parents 83c7f1e + 1fc7efc commit bc2fb39
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 0 deletions.
59 changes: 59 additions & 0 deletions java/springboot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
</properties>
<dependencies>

<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.11.0</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
Expand Down Expand Up @@ -169,6 +175,59 @@
</pluginManagement>
</build>
</profile>

<profile>
<id>dev</id>
<properties>
<profileActive>dev</profileActive>
<docker.image.version>${version}</docker.image.version>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>

<profile>
<id>docker</id>
<properties>
<docker.image.version>${version}</docker.image.version>
<profileActive>docker</profileActive>
</properties>
</profile>
<profile>
<id>temurin17</id>
<properties>
<docker.image.version>${version}-temurin17</docker.image.version>
<profileActive>docker</profileActive>
<docker.image.from>registry.cn-hongkong.aliyuncs.com/smartoilets/eclipse-temurin:17.0.5_8-jre</docker.image.from>
</properties>
</profile>
<profile>
<id>temurin21</id>
<properties>
<docker.image.version>${version}-temurin21</docker.image.version>
<profileActive>docker</profileActive>
<docker.image.from>eclipse-temurin:21.0.1_12-jdk</docker.image.from>
</properties>
</profile>

<profile>
<id>zulu17-crac</id>
<properties>
<docker.image.version>${version}-zulu17-crac</docker.image.version>
<profileActive>docker</profileActive>
<docker.image.from>azul/zulu-openjdk:17.0.9-17.46-jdk-crac</docker.image.from>
</properties>
</profile>
<profile>
<id>zulu21-crac</id>
<properties>
<docker.image.version>${version}-zulu21-crac</docker.image.version>
<profileActive>docker</profileActive>
<docker.image.from>azul/zulu-openjdk:21.0.1-21.30-jdk-crac</docker.image.from>
</properties>
</profile>

</profiles>

<build>
Expand Down
21 changes: 21 additions & 0 deletions java/springboot/src/main/resources/application-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
management:
endpoints:
web:
exposure:
include: '*'

spring:
profiles:
active: '@profileActive@'
# autoconfigure:
# exclude: org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration
data:
redis:
enabled: false
repositories:
enabled: false
host: localhost
port: 6666
password:
usePipeline: true
usePipelineBatchThreads: 100
2 changes: 2 additions & 0 deletions java/springboot/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ management:
include: '*'

spring:
profiles:
active: '@profileActive@'
# autoconfigure:
# exclude: org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration
data:
Expand Down

0 comments on commit bc2fb39

Please sign in to comment.