Skip to content

Commit 04cbcce

Browse files
authored
Code Examples with Detailed README.adoc for all Chapters (2–11) of MicroProfile Tutorial (#20)
* Create index.adoc * Add files via upload Uploading code for Chapter02 * source code for chapter 03 uploading source code for chapter 03 * source code for chapter04 uploading source code for chapter04 * source code for chapter04 uploading source code for chapter04 * Delete code/chapter04 directory * source code for chapter04 uploading source code for chapter04 * Source code for chapter 05 Uploading source code for chapter 05 * Source code for chapter06 uploading chapter06 source code * source code for chapter07 uploading source code for chapter07 * source code for chapter08 uploading source code for chapter08 * Delete code/chapter08/payment/target directory * Update pom.xml * Update pom.xml * Update pom.xml changing Java version to JDK 17 * Create README.adoc Adding README file containing instructions to run the project * Create .devcontainer.json Adding Dev Conainter configuration to run this project * Create .gitignore * Create chapter03/mp-ecomm-store/pom.xml * Update server.xml * Delete code/chapter03/mp-ecomm-store directory * Create dummy * Add files via upload * Update README.adoc.original * Delete code/chapter03/catalog/README.adoc.original * Update README.adoc * Delete code/chapter03/dummy * Create README.adoc * Create README.adoc * Update README.adoc * Create .gitignore * Create devcontainer.json * Update and document source code for Chapters 2–11 - Thoroughly tested and updated source code for all projects from Chapter 2 to Chapter 11 - Added or refined README.adoc files for each chapter, including detailed instructions on setup, execution, and functionality verification * Refactor pom.xml to close build tag and remove unused AppTest class * Fix chapter02 - persistence code Fixing auto id generation * Add Derby dependency and configure persistence for product management; refactor ProductService and ProductResource to utilize service layer * Refactor Product entity and resource; update persistence configuration and SQL import script * Refactor README and add API test script for MicroProfile E-Commerce Store - Updated README.adoc for mp-ecomm-store to include SDKMAN installation instructions and unit test execution details. - Enhanced chapter03 README.adoc with comprehensive project structure, key components, API endpoints, and testing instructions. - Removed outdated README.adoc files from mp-ecomm-store and interceptor directories. - Introduced a new test script (test-api.sh) to automate CRUD operation tests for the Product API. * Updating source code for chapter03 * Updating code for chapter04 * Updating code for Chapter05 * Updating code for chapter06 * Updating code for chapter07 * update code for chapter08 * code update for chapter09 * updating source code for chapter09 * updating chapter09 source code updating chapter09 source code about Open Telemetry * updating code for chapter 10 * updating code for chapter 11 * Revert "updating code for chapter 11" This reverts commit 5f55b80. * Create server.xml Adding liberty/config/server.xml * Refactor inventory service and update documentation; remove obsolete test scripts * Add server configuration files and implement product integration service - Created server.xml files for catalog, inventory, order, payment, shipment, shopping cart, and user services. - Implemented ProductIntegrationService for product validation and retrieval in payment processing. - Updated README.md for order service with new cURL examples. - Removed obsolete JWT debug scripts and test scripts. - Cleaned up index.html by removing the footer. * Update server.xml configurations and remove obsolete CORS filter from web.xml * Update application path for ShipmentApplication to '/api'
1 parent 2b64e7b commit 04cbcce

File tree

344 files changed

+34504
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

344 files changed

+34504
-0
lines changed

.devcontainer/.devcontainer.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/java
3+
{
4+
"name": "Microprofile",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/java:1-17-bookworm",
7+
8+
"features": {
9+
"ghcr.io/devcontainers/features/java:1": {
10+
"installMaven": true,
11+
"version": "17",
12+
"jdkDistro": "ms",
13+
"gradleVersion": "latest",
14+
"mavenVersion": "latest",
15+
"antVersion": "latest",
16+
"groovyVersion": "latest"
17+
},
18+
"ghcr.io/ebaskoro/devcontainer-features/sdkman:1": {
19+
"candidate": "java",
20+
"version": "latest"
21+
},
22+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
23+
"moby": true,
24+
"azureDnsAutoDetection": true,
25+
"installDockerBuildx": true,
26+
"installDockerComposeSwitch": true,
27+
"version": "latest",
28+
"dockerDashComposeVersion": "none"
29+
}
30+
},
31+
32+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
33+
// "forwardPorts": [],
34+
35+
// Use 'postCreateCommand' to run commands after the container is created.
36+
// "postCreateCommand": "java -version",
37+
38+
// Configure tool-specific properties.
39+
"customizations": {
40+
"vscode": {
41+
"extensions": [
42+
"vscjava.vscode-java-pack",
43+
"github.copilot",
44+
"microprofile-community.vscode-microprofile-pack"
45+
]
46+
}
47+
}
48+
49+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
50+
// "remoteUser": "root"
51+
}

.gitignore

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,73 @@
1+
# Compiled class file
2+
*.class
3+
4+
# Log file
5+
*.log
6+
7+
# BlueJ files
8+
*.ctxt
9+
10+
# Mobile Tools for Java (J2ME)
11+
.mtj.tmp/
12+
13+
# Package Files #
14+
*.jar
15+
*.war
16+
*.nar
17+
*.ear
18+
*.zip
19+
*.tar.gz
20+
*.rar
21+
22+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23+
hs_err_pid*
24+
replay_pid*
25+
26+
# Maven
27+
log/
28+
target/
29+
release/
30+
dependency-reduced-pom.xml
31+
buildNumber.properties
32+
.mvn/timing.properties
33+
34+
# Gradle
35+
.gradle/
36+
build/
37+
!gradle/wrapper/gradle-wrapper.jar
38+
39+
# Eclipse
40+
.classpath
41+
.project
42+
.settings/
43+
44+
# IntelliJ
45+
*.iml
46+
.idea/
47+
out/
48+
49+
# VS Code
50+
.vscode/
51+
52+
# OS Files
53+
.DS_Store
54+
Thumbs.db
55+
56+
# Others
57+
*.mf
58+
*.swp
59+
*.cs
60+
*~
61+
62+
# Liberty
63+
wlp/usr/servers/*/logs/
64+
wlp/usr/servers/*/workarea/
65+
wlp/usr/servers/*/dropins/
66+
wlp/usr/servers/*/apps/
67+
wlp/usr/servers/*/configDropins/
68+
69+
# Specific project directories
70+
liberty-rest-app/target/
71+
mp-ecomm-store/target/
72+
173
/node_modules/
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/java
3+
{
4+
"name": "Microprofile",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/java:1-17-bookworm",
7+
8+
"features": {
9+
"ghcr.io/devcontainers/features/java:1": {
10+
"installMaven": true,
11+
"version": "17",
12+
"jdkDistro": "ms",
13+
"gradleVersion": "latest",
14+
"mavenVersion": "latest",
15+
"antVersion": "latest",
16+
"groovyVersion": "latest"
17+
},
18+
"ghcr.io/ebaskoro/devcontainer-features/sdkman:1": {
19+
"candidate": "java",
20+
"version": "latest"
21+
},
22+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
23+
"moby": true,
24+
"azureDnsAutoDetection": true,
25+
"installDockerBuildx": true,
26+
"installDockerComposeSwitch": true,
27+
"version": "latest",
28+
"dockerDashComposeVersion": "none"
29+
}
30+
},
31+
32+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
33+
// "forwardPorts": [],
34+
35+
// Use 'postCreateCommand' to run commands after the container is created.
36+
// "postCreateCommand": "java -version",
37+
38+
// Configure tool-specific properties.
39+
"customizations": {
40+
"vscode": {
41+
"extensions": [
42+
"vscjava.vscode-java-pack",
43+
"github.copilot",
44+
"microprofile-community.vscode-microprofile-pack",
45+
"asciidoctor.asciidoctor-vscode",
46+
"ms-vscode-remote.remote-containers"
47+
]
48+
}
49+
}
50+
51+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
52+
// "remoteUser": "root"
53+
}

code/.gitignore

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Compiled class files
2+
*.class
3+
4+
# Log files
5+
*.log
6+
7+
# BlueJ files
8+
*.ctxt
9+
10+
# Mobile Tools for Java (J2ME)
11+
.mtj.tmp/
12+
13+
# Package Files
14+
*.jar
15+
*.war
16+
*.nar
17+
*.ear
18+
*.zip
19+
*.tar.gz
20+
*.rar
21+
22+
# Virtual machine crash logs
23+
hs_err_pid*
24+
replay_pid*
25+
26+
# Maven
27+
target/
28+
pom.xml.tag
29+
pom.xml.releaseBackup
30+
pom.xml.versionsBackup
31+
pom.xml.next
32+
release.properties
33+
dependency-reduced-pom.xml
34+
buildNumber.properties
35+
.mvn/timing.properties
36+
.mvn/wrapper/maven-wrapper.jar
37+
38+
# Liberty
39+
.liberty/
40+
.factorypath
41+
wlp/
42+
liberty/
43+
44+
# IntelliJ IDEA
45+
.idea/
46+
*.iws
47+
*.iml
48+
*.ipr
49+
50+
# Eclipse
51+
.apt_generated/
52+
.settings/
53+
.project
54+
.classpath
55+
.factorypath
56+
.metadata/
57+
bin/
58+
tmp/
59+
60+
# VS Code
61+
.vscode/*
62+
!.vscode/settings.json
63+
!.vscode/tasks.json
64+
!.vscode/launch.json
65+
!.vscode/extensions.json
66+
67+
# Test reports (keeping XML reports)
68+
target/surefire-reports/junitreports/
69+
target/surefire-reports/old/
70+
target/site/
71+
target/failsafe-reports/
72+
73+
# JaCoCo coverage reports except the main report
74+
target/jacoco/
75+
!target/site/jacoco/index.html
76+
77+
# Miscellaneous
78+
*.swp
79+
*.bak
80+
*.tmp
81+
*~
82+
.DS_Store
83+
Thumbs.db

0 commit comments

Comments
 (0)