Skip to content

Commit b20e42a

Browse files
Merge pull request #31 from JavatoDev-com/version-upgrade
Version upgrade
2 parents 9603fb9 + 1f117cc commit b20e42a

File tree

148 files changed

+3493
-940
lines changed

Some content is hidden

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

148 files changed

+3493
-940
lines changed

.github/workflows/gradle.yml

+83-34
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3-
4-
name: Java CI with Gradle
1+
name: CI For Concept Microservice
52

63
on:
74
push:
@@ -11,37 +8,89 @@ on:
118

129
jobs:
1310
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix: { dir: [
14+
'core-banking-service',
15+
'internet-banking-config-server',
16+
'internet-banking-fund-transfer-service',
17+
'internet-banking-user-service',
18+
'internet-banking-utility-payment-service',
19+
'internet-banking-service-registry',
20+
'internet-banking-api-gateway'
21+
] }
22+
permissions:
23+
contents: read
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
- name: Set up JDK 21
28+
uses: actions/setup-java@v4
29+
with:
30+
java-version: '21'
31+
distribution: 'temurin'
32+
33+
- name: Setup Gradle
34+
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
35+
36+
- name: Build
37+
run: ./gradlew build -x test
38+
working-directory: ${{ matrix.dir }}
1439

40+
- uses: actions/upload-artifact@v4
41+
with:
42+
name: ${{ matrix.dir }}-artifacts
43+
path: |
44+
${{ matrix.dir }}/build/libs/${{ matrix.dir }}*SNAPSHOT.jar
45+
${{ matrix.dir }}/Dockerfile
46+
${{ matrix.dir }}/wait-for-it.sh
47+
retention-days: 1
48+
overwrite: true
49+
50+
docker_publish:
1551
runs-on: ubuntu-latest
52+
strategy:
53+
matrix: { dir: [
54+
'core-banking-service',
55+
'internet-banking-config-server',
56+
'internet-banking-fund-transfer-service',
57+
'internet-banking-user-service',
58+
'internet-banking-utility-payment-service',
59+
'internet-banking-service-registry',
60+
'internet-banking-api-gateway'
61+
] }
62+
permissions:
63+
contents: read
64+
packages: write
65+
needs: build
1666

1767
steps:
18-
- uses: actions/checkout@v2
19-
- name: Set up JDK 11
20-
uses: actions/setup-java@v2
21-
with:
22-
java-version: '11'
23-
distribution: 'adopt'
24-
cache: gradle
25-
- name: Building core-banking-service
26-
working-directory: ./core-banking-service
27-
run: ./gradlew build
28-
29-
- name: Building internet-banking-fund-transfer-service
30-
working-directory: ./internet-banking-fund-transfer-service
31-
run: ./gradlew build
32-
33-
- name: Building internet-banking-user-service
34-
working-directory: ./internet-banking-user-service
35-
run: ./gradlew build
36-
37-
- name: Building internet-banking-utility-payment-service
38-
working-directory: ./internet-banking-utility-payment-service
39-
run: ./gradlew build
40-
41-
- name: Building internet-banking-service-registry
42-
working-directory: ./internet-banking-service-registry
43-
run: ./gradlew build -x test
44-
45-
- name: Building internet-banking-api-gateway
46-
working-directory: ./internet-banking-api-gateway
47-
run: ./gradlew build -x test
68+
- name: Download latest build artifact
69+
uses: actions/download-artifact@v4
70+
with:
71+
name: ${{ matrix.dir }}-artifacts
72+
- name: Move artifacts to the correct directory
73+
shell: bash
74+
run: |
75+
ls -lrt
76+
mkdir -p ${{ matrix.dir }}-downloaded-artifacts
77+
mv build ${{ matrix.dir }}-downloaded-artifacts
78+
mv Dockerfile ${{ matrix.dir }}-downloaded-artifacts
79+
mv wait-for-it.sh ${{ matrix.dir }}-downloaded-artifacts
80+
81+
- name: Validate moved artifacts
82+
run: ls -lrt
83+
working-directory: ${{ matrix.dir }}-downloaded-artifacts
84+
85+
- name: Build Docker images
86+
run: docker build -t javatodev/${{ matrix.dir }} .
87+
working-directory: ${{ matrix.dir }}-downloaded-artifacts
88+
89+
- name: Login to GitHub Container Registry
90+
uses: docker/login-action@v3
91+
with:
92+
username: ${{ secrets.DOCKERHUB_USERNAME }}
93+
password: ${{ secrets.DOCKERHUB_TOKEN }}
94+
95+
- name: Push Docker image to GitHub Container Registry
96+
run: docker push javatodev/${{ matrix.dir }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

README.md

+22-18
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
[![Java CI with Gradle](https://github.com/javatodev/internet-banking-concept-microservices/actions/workflows/gradle.yml/badge.svg)](https://github.com/javatodev/internet-banking-concept-microservices/actions/workflows/gradle.yml)
1+
[![CI For Concept Microservice](https://github.com/JavatoDev-com/internet-banking-concept-microservices/actions/workflows/gradle.yml/badge.svg)](https://github.com/JavatoDev-com/internet-banking-concept-microservices/actions/workflows/gradle.yml)
22

33
# Internet Banking Concept With Java Spring Boot Microservices
44

55
This source code was developed for Java based microservices tutorial series from [javatodev.com](https://javatodev.com).
66

77
In this article series I’m going to explain using internet banking API concept with spring boot based microserices architecture. Initially I’ll develop the core API which will evolve as a full fledged REST API collection until deployments.
88

9+
### Releases
10+
11+
[1.0.0](https://github.com/JavatoDev-com/internet-banking-concept-microservices/releases/tag/v.1.0.0) - Initial release with Java 11 and Spring Boot 2.
12+
913
### Microservices Inside This Project
1014

1115
Here this project consist of mainly 6 microservices and those are,
1216

1317
- User service (banking-core-user-service) – This service includes all the operations under the User such as registrations and retrieval. Additionally, this API consumes keycloak REST API to register and manage the user base while using the local PostgreSQL database as well.
1418
- Fund transfer service (banking-core-fund-transfer-service) – This is the service that handles all the fund transfers between accounts and this API will push messages to a centralized RabbitMQ queue to use from the Notification service.
1519
- Payment service (banking-core-payments-service) – This service will include all the API endpoints to process Utility payments in this project and that will push notification messages to RabbitMQ as well.
16-
- Notification service – This API is registered under the service registry but consumes all the messages from RabbitMQ and pushes necessary notifications to the end users.
20+
- Notification service – This API is registered under the service registry but consumes all the messages from RabbitMQ and pushes necessary notifications to the end users. - PENDING Development
1721
- Banking core service – This is the banking core service that acts as a dummy banking core with accounts, users, transaction details, and processors for banking transactions.
1822

1923
### Base Project Architecture
@@ -24,22 +28,22 @@ alt="Spring Boot Microservices Project Architecture By Javatodev.com"/></a>
2428

2529
### Technology Stack
2630

27-
1. Java 11
28-
2. Spring Boot 2.4.5
29-
3. Netflix Eureka Service Registry
30-
4. Netflix Eureka Service Client
31-
5. Spring Cloud API Gateway
32-
6. Spring Cloud Config Server
33-
7. Zipkin
34-
8. Spring Cloud Sleuth
35-
9. Open Feign
36-
10. RabbitMQ
37-
11. Prometheus
38-
12. Jitpack
39-
13. MySQL
40-
14. Keycloak
41-
15. Docker / Docker Compose
42-
16. Kubernetes
31+
1. Java 21
32+
2. Spring Boot 3.2.4
33+
3. Spring Cloud 2023.0.0
34+
4. Netflix Eureka Service Registry
35+
5. Netflix Eureka Service Client
36+
6. Spring Cloud API Gateway
37+
7. Spring Cloud Config Server
38+
8. Zipkin
39+
9. Spring Cloud Sleuth
40+
10. Open Feign
41+
11. RabbitMQ
42+
12. Prometheus
43+
13. MySQL
44+
14. Keycloak
45+
15. Docker / Docker Compose
46+
16. Kubernetes
4347
17. Keycloak
4448

4549
Article series

core-banking-service/Dockerfile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM eclipse-temurin:21.0.2_13-jre-alpine
2+
LABEL maintainer="[email protected]"
3+
VOLUME /main-app
4+
ADD build/libs/core-banking-service-0.0.1-SNAPSHOT.jar app.jar
5+
EXPOSE 8092
6+
COPY wait-for-it.sh wait-for-it.sh
7+
RUN chmod +x wait-for-it.sh
8+
# Add bash for wait-for-it.sh
9+
RUN apk add --no-cache bash
10+
ENTRYPOINT ["java", "-jar", "-Dspring.profiles.active=docker", "/app.jar"]

core-banking-service/build.gradle

+10-13
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,22 @@
11
plugins {
2-
id 'org.springframework.boot' version '2.5.0'
3-
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
42
id 'java'
3+
id 'org.springframework.boot' version '3.2.4'
4+
id 'io.spring.dependency-management' version '1.1.4'
55
}
66

77
group = 'com.javatodev.finance'
88
version = '0.0.1-SNAPSHOT'
9-
sourceCompatibility = '11'
109

11-
configurations {
12-
compileOnly {
13-
extendsFrom annotationProcessor
14-
}
10+
java {
11+
sourceCompatibility = '21'
1512
}
1613

1714
repositories {
1815
mavenCentral()
19-
maven { url 'https://repo.spring.io/snapshot' }
20-
maven { url 'https://repo.spring.io/milestone' }
2116
}
2217

2318
ext {
24-
set('springCloudVersion', "2020.0.4")
19+
set('springCloudVersion', "2023.0.0")
2520
}
2621

2722
dependencies {
@@ -36,11 +31,13 @@ dependencies {
3631

3732
compileOnly 'org.projectlombok:lombok'
3833
annotationProcessor 'org.projectlombok:lombok'
39-
implementation 'org.flywaydb:flyway-core:8.0.3'
40-
runtimeOnly 'mysql:mysql-connector-java'
34+
35+
implementation 'org.flywaydb:flyway-core:10.12.0'
36+
implementation 'org.flywaydb:flyway-mysql:10.12.0'
37+
implementation 'com.mysql:mysql-connector-j:8.4.0'
4138

4239
testImplementation 'org.springframework.boot:spring-boot-starter-test'
43-
testImplementation 'com.h2database:h2:1.4.200'
40+
testImplementation 'com.h2database:h2:2.2.224'
4441

4542

4643
}
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
1+
#
2+
# Copyright 2012-2024 the original author or authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
117
distributionBase=GRADLE_USER_HOME
218
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
19+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
20+
networkTimeout=10000
21+
validateDistributionUrl=true
422
zipStoreBase=GRADLE_USER_HOME
523
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)