-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade sample microservices to Java 17 and Spring Boot 3 (#399)
* Update ms channel-operations example ca * Update ms example-article ca * update ms example-dynamo example ca * update ms example-mongo example ca * update ms example-r2dbc example ca * update ms example-redis example ca * update rest-consumer-client example ca * update ms rest-consumer-server example ca * update ms s3-example example ca * update Dockerfile of sample microservices * update ms example dependencies * Add gradle-wrapper.properties to .gitignore file * Update gradle task
- Loading branch information
1 parent
a88edd9
commit 6aa578e
Showing
149 changed files
with
2,300 additions
and
1,002 deletions.
There are no files selected for viewing
25 changes: 18 additions & 7 deletions
25
examples-ca/channel-operations/applications/app-service/build.gradle
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
apply plugin: 'org.springframework.boot' | ||
|
||
dependencies { | ||
implementation project(':r2postgresql') | ||
implementation project(':reactive-web') | ||
testImplementation 'com.fasterxml.jackson.core:jackson-databind' | ||
testImplementation 'com.tngtech.archunit:archunit:1.1.0' | ||
implementation project(':r2postgresql') | ||
implementation project(':reactive-web') | ||
implementation project(':model') | ||
implementation project(':usecase') | ||
compile 'org.springframework.boot:spring-boot-starter' | ||
compile 'org.reactivecommons.utils:object-mapper:0.1.0' | ||
runtime('org.springframework.boot:spring-boot-devtools') | ||
implementation 'org.springframework.boot:spring-boot-starter' | ||
runtimeOnly('org.springframework.boot:spring-boot-devtools') | ||
} | ||
|
||
task explodedJar(type: Copy) { | ||
tasks.register('explodedJar', Copy) { | ||
with jar | ||
into "${buildDir}/exploded" | ||
into layout.buildDirectory.dir("exploded") | ||
} | ||
|
||
jar { | ||
// To disable the *-plain.jar | ||
enabled = false | ||
} | ||
|
||
bootJar { | ||
// Sets output jar name | ||
archiveFileName = "${project.getParent().getName()}.${archiveExtension.get()}" | ||
} |
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
46 changes: 38 additions & 8 deletions
46
examples-ca/channel-operations/applications/app-service/src/main/resources/application.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,44 @@ | ||
##Spring Configuration | ||
server: | ||
port: 8090 | ||
port: 8080 | ||
spring: | ||
application: | ||
name: r2dbcconnection | ||
name: "channel-operations" | ||
devtools: | ||
add-properties: false | ||
h2: | ||
console: | ||
enabled: true | ||
path: /h2 | ||
profiles: | ||
include: | ||
include: "local" | ||
logging: | ||
level: | ||
root: INFO | ||
reactor: | ||
netty: false | ||
|
||
management: | ||
endpoint: | ||
health: | ||
enabled: true | ||
show-details: never | ||
probes: | ||
enabled: true | ||
endpoints: | ||
web: | ||
exposure: | ||
include: "health, liveness, readiness" | ||
base-path: / | ||
path-mapping: | ||
health: "health" | ||
liveness: "liveness" | ||
readiness: "readiness" | ||
|
||
adapters: | ||
postgres: | ||
database: "channel" | ||
host: "localhost" | ||
port: 5432 | ||
username: "postgres" | ||
password: "admin" | ||
schema: "management" | ||
pool: | ||
initial-size: 12 | ||
max-size: 15 | ||
max-idle-time: 10 |
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
2 changes: 2 additions & 0 deletions
2
...a/channel-operations/applications/app-service/src/test/java/co/com/bancolombia/.gitignore
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ArchitectureTest.java | ||
Utils.java |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,35 @@ | ||
buildscript { | ||
ext { | ||
cleanArchitectureVersion = '1.8.2' | ||
springBootVersion = '2.3.8.RELEASE' | ||
sonarVersion = '3.0' | ||
jacocoVersion = '0.8.5' | ||
} | ||
ext { | ||
cleanArchitectureVersion = '3.6.3' | ||
springBootVersion = '3.1.5' | ||
sonarVersion = '4.4.1.3373' | ||
jacocoVersion = '0.8.11' | ||
lombokVersion = '1.18.30' | ||
mapstructVersion = '1.5.5.Final' | ||
} | ||
} | ||
|
||
plugins { | ||
id 'co.com.bancolombia.cleanArchitecture' version "${cleanArchitectureVersion}" | ||
id 'org.springframework.boot' version "${springBootVersion}" | ||
id 'org.sonarqube' version "${sonarVersion}" | ||
id 'jacoco' | ||
id 'co.com.bancolombia.cleanArchitecture' version "${cleanArchitectureVersion}" | ||
id 'org.springframework.boot' version "${springBootVersion}" apply false | ||
id 'org.sonarqube' version "${sonarVersion}" | ||
id 'jacoco' | ||
} | ||
|
||
sonarqube { | ||
sonar { | ||
def modules = subprojects.projectDir.collect { "${it.toString().replace(project.projectDir.toString() + "/", "")}" } | ||
properties { | ||
property "sonar.sourceEnconding", "UTF-8" | ||
property "sonar.modules", "applications/app-service," + | ||
"domain/model, domain/usecase," + | ||
"infrastructure/driven-adapters/*, infrastructure/entry-points/*" | ||
property "sonar.sources", "src, deployment, build.gradle, applications/app-service/build.gradle" | ||
property "sonar.modules", "${modules.join(',')}" | ||
property "sonar.sources", "src,deployment,settings.gradle,main.gradle,build.gradle,${modules.collect { "${it}/build.gradle" }.join(',')}" | ||
property "sonar.exclusions", "**/MainApplication.java" | ||
property "sonar.test", "src/test" | ||
property "sonar.java.binaries", "" | ||
property "sonar.junit.reportsPath", "" | ||
property "sonar.java.coveragePlugin", "jacoco" | ||
property "sonar.coverage.jacoco.xmlReportPaths", "build/reports/jacoco/test/jacocoTestReport.xml" | ||
property "sonar.externalIssuesReportPaths", "build/issues.json" | ||
} | ||
} | ||
apply from: './main.gradle' | ||
|
||
apply from: './main.gradle' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
FROM adoptopenjdk/openjdk8-openj9@sha256:75225e1550aab2a1c57c806d18ed301419cc6dcadb521effe7dc0652a160a3a1 | ||
FROM eclipse-temurin:17-jdk-alpine | ||
VOLUME /tmp | ||
COPY *.jar app.jar | ||
RUN sh -c 'touch /app.jar' | ||
ENV JAVA_OPTS=" -Xshareclasses:name=cacheapp,cacheDir=/cache,nonfatal -XX:+UseContainerSupport -XX:MaxRAMPercentage=70 -Djava.security.egd=file:/dev/./urandom" | ||
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -jar /app.jar" ] | ||
COPY channel-operations.jar app.jar | ||
ENV JAVA_OPTS="-XX:+UseContainerSupport -XX:MaxRAMPercentage=70 -Djava.security.egd=file:/dev/./urandom" | ||
ENTRYPOINT [ "/bin/sh", "-c", "/opt/java/openjdk/bin/java $JAVA_OPTS -jar /app.jar" ] |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
dependencies { | ||
compile project(':model') | ||
implementation project(':model') | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
package=co.com.bancolombia | ||
systemProp.version=1.8.2 | ||
systemProp.version=3.6.3 | ||
reactive=true | ||
lombok=true | ||
org.gradle.parallel=true | ||
language=java | ||
metrics=false |
Oops, something went wrong.