Compare commits
500
Commits
29b900cccd
...
d6c10e8303
@@ -8,11 +8,13 @@ permissions:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # tag=v3
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c # v3
|
||||
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'zulu'
|
||||
@@ -22,8 +24,8 @@ jobs:
|
||||
- name: Start the stack
|
||||
run: docker-compose up -d
|
||||
- name: Wait for stack to come up
|
||||
run: sleep 120
|
||||
run: sleep 300
|
||||
- name: Check health
|
||||
run: curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/health
|
||||
run: curl -f -k --retry 10 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/health
|
||||
- name: Check info
|
||||
run: (( $(curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/info | wc --chars) > 100 ))
|
||||
|
||||
@@ -8,22 +8,24 @@ permissions:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # tag=v3
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c # v3
|
||||
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'zulu'
|
||||
cache: gradle
|
||||
- name: Build the image
|
||||
run: ./gradlew :fineract-provider:clean :fineract-provider:jibDockerBuild -x test
|
||||
- name: Start the stack
|
||||
run: ./gradlew --no-daemon --console=plain :fineract-provider:clean :fineract-provider:jibDockerBuild -x test
|
||||
- name: Start the Standalone Stack
|
||||
run: docker-compose -f docker-compose-postgresql.yml up -d
|
||||
- name: Wait for stack to come up
|
||||
run: sleep 120
|
||||
run: sleep 300
|
||||
- name: Check health
|
||||
run: curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/health
|
||||
run: curl -f -k --retry 10 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/health
|
||||
- name: Check info
|
||||
run: (( $(curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/info | wc --chars) > 100 ))
|
||||
|
||||
@@ -7,22 +7,24 @@ permissions:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
|
||||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # tag=v3
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c # v3
|
||||
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'zulu'
|
||||
cache: gradle
|
||||
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
|
||||
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
|
||||
with:
|
||||
node-version: 16
|
||||
- name: Congfigure vega-cli
|
||||
run: npm i -g vega-cli --unsafe
|
||||
- name: Validate Gradle wrapper
|
||||
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6
|
||||
uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4
|
||||
- name: Install additional software
|
||||
run: |
|
||||
sudo apt-get update
|
||||
|
||||
@@ -10,15 +10,15 @@ jobs:
|
||||
|
||||
services:
|
||||
mariad:
|
||||
image: mariadb:10.10
|
||||
image: mariadb:11.0
|
||||
ports:
|
||||
- 3306:3306
|
||||
env:
|
||||
MARIADB_ROOT_PASSWORD: mysql
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
|
||||
options: --health-cmd="healthcheck.sh --su-mysql --connect --innodb_initialized" --health-interval=5s --health-timeout=2s --health-retries=3
|
||||
|
||||
mock-oauth2-server:
|
||||
image: ghcr.io/navikt/mock-oauth2-server:0.5.6
|
||||
image: ghcr.io/navikt/mock-oauth2-server:1.0.0
|
||||
ports:
|
||||
- 9000:9000
|
||||
env:
|
||||
@@ -27,22 +27,23 @@ jobs:
|
||||
|
||||
env:
|
||||
TZ: Asia/Kolkata
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
|
||||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # tag=v3
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c # v3
|
||||
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'zulu'
|
||||
cache: gradle
|
||||
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
|
||||
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
|
||||
with:
|
||||
node-version: 16
|
||||
- name: Congfigure vega-cli
|
||||
run: npm i -g vega-cli --unsafe
|
||||
- name: Validate Gradle wrapper
|
||||
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6
|
||||
uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4
|
||||
- name: Verify MariaDB connection
|
||||
run: |
|
||||
while ! mysqladmin ping -h"127.0.0.1" -P3306 ; do
|
||||
@@ -52,20 +53,40 @@ jobs:
|
||||
run: |
|
||||
./gradlew --no-daemon -q createDB -PdbName=fineract_tenants
|
||||
./gradlew --no-daemon -q createDB -PdbName=fineract_default
|
||||
- name: Start LocalStack
|
||||
env:
|
||||
AWS_ENDPOINT_URL: http://localhost:4566
|
||||
AWS_ACCESS_KEY_ID: localstack
|
||||
AWS_SECRET_ACCESS_KEY: localstack
|
||||
AWS_REGION: us-east-1
|
||||
run: |
|
||||
docker run -d --name localstack -p 4566:4566 -p 4510-4559:4510-4559 localstack/localstack:2.1
|
||||
sleep 10
|
||||
docker exec localstack awslocal s3api create-bucket --bucket fineract-reports
|
||||
echo "LocalStack initialization complete"
|
||||
- name: Install additional software
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install ghostscript graphviz -y
|
||||
|
||||
- name: Build & Test
|
||||
env:
|
||||
AWS_ENDPOINT_URL: http://localhost:4566
|
||||
AWS_ACCESS_KEY_ID: localstack
|
||||
AWS_SECRET_ACCESS_KEY: localstack
|
||||
AWS_REGION: us-east-1
|
||||
FINERACT_REPORT_EXPORT_S3_ENABLED: true
|
||||
FINERACT_REPORT_EXPORT_S3_BUCKET_NAME: fineract-reports
|
||||
run: |
|
||||
./gradlew --no-daemon --console=plain build test --fail-fast -x doc -x :twofactor-tests:test -x :oauth2-test:test
|
||||
./gradlew --no-daemon --console=plain :twofactor-tests:test --fail-fast
|
||||
./gradlew --no-daemon --console=plain :oauth2-tests:test --fail-fast
|
||||
./gradlew --no-daemon --console=plain build -x cucumber -x test -x doc
|
||||
./gradlew --no-daemon --console=plain cucumber
|
||||
./gradlew --no-daemon --console=plain test -x :twofactor-tests:test -x :oauth2-test:test
|
||||
./gradlew --no-daemon --console=plain :twofactor-tests:test
|
||||
./gradlew --no-daemon --console=plain :oauth2-tests:test
|
||||
|
||||
- name: Archive test results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3
|
||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # tag=v3
|
||||
with:
|
||||
name: test-results
|
||||
path: |
|
||||
@@ -75,7 +96,7 @@ jobs:
|
||||
|
||||
- name: Archive server logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3
|
||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # tag=v3
|
||||
with:
|
||||
name: server-logs
|
||||
path: |
|
||||
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
|
||||
|
||||
mock-oauth2-server:
|
||||
image: ghcr.io/navikt/mock-oauth2-server:0.5.6
|
||||
image: ghcr.io/navikt/mock-oauth2-server:1.0.0
|
||||
ports:
|
||||
- 9000:9000
|
||||
env:
|
||||
@@ -27,22 +27,23 @@ jobs:
|
||||
|
||||
env:
|
||||
TZ: Asia/Kolkata
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
|
||||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # tag=v3
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c # v3
|
||||
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'zulu'
|
||||
cache: gradle
|
||||
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
|
||||
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
|
||||
with:
|
||||
node-version: 16
|
||||
- name: Congfigure vega-cli
|
||||
run: npm i -g vega-cli --unsafe
|
||||
- name: Validate Gradle wrapper
|
||||
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6
|
||||
uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4
|
||||
- name: Verify MariaDB connection
|
||||
run: |
|
||||
while ! mysqladmin ping -h"127.0.0.1" -P3306 ; do
|
||||
@@ -52,20 +53,40 @@ jobs:
|
||||
run: |
|
||||
./gradlew --no-daemon -q createMySQLDB -PdbName=fineract_tenants
|
||||
./gradlew --no-daemon -q createMySQLDB -PdbName=fineract_default
|
||||
- name: Start LocalStack
|
||||
env:
|
||||
AWS_ENDPOINT_URL: http://localhost:4566
|
||||
AWS_ACCESS_KEY_ID: localstack
|
||||
AWS_SECRET_ACCESS_KEY: localstack
|
||||
AWS_REGION: us-east-1
|
||||
run: |
|
||||
docker run -d --name localstack -p 4566:4566 -p 4510-4559:4510-4559 localstack/localstack:2.1
|
||||
sleep 10
|
||||
docker exec localstack awslocal s3api create-bucket --bucket fineract-reports
|
||||
echo "LocalStack initialization complete"
|
||||
- name: Install additional software
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install ghostscript graphviz -y
|
||||
|
||||
- name: Build & Test
|
||||
env:
|
||||
AWS_ENDPOINT_URL: http://localhost:4566
|
||||
AWS_ACCESS_KEY_ID: localstack
|
||||
AWS_SECRET_ACCESS_KEY: localstack
|
||||
AWS_REGION: us-east-1
|
||||
FINERACT_REPORT_EXPORT_S3_ENABLED: true
|
||||
FINERACT_REPORT_EXPORT_S3_BUCKET_NAME: fineract-reports
|
||||
run: |
|
||||
./gradlew --no-daemon --console=plain build test --fail-fast -x doc -x :twofactor-tests:test -x :oauth2-test:test -PdbType=mysql
|
||||
./gradlew --no-daemon --console=plain :twofactor-tests:test --fail-fast -PdbType=mysql
|
||||
./gradlew --no-daemon --console=plain :oauth2-tests:test --fail-fast -PdbType=mysql
|
||||
./gradlew --no-daemon --console=plain build -x cucumber -x test -x doc
|
||||
./gradlew --no-daemon --console=plain cucumber
|
||||
./gradlew --no-daemon --console=plain test -x :twofactor-tests:test -x :oauth2-test:test -PdbType=mysql
|
||||
./gradlew --no-daemon --console=plain :twofactor-tests:test -PdbType=mysql
|
||||
./gradlew --no-daemon --console=plain :oauth2-tests:test -PdbType=mysql
|
||||
|
||||
- name: Archive test results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3
|
||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # tag=v3
|
||||
with:
|
||||
name: test-results
|
||||
path: |
|
||||
@@ -75,7 +96,7 @@ jobs:
|
||||
|
||||
- name: Archive server logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3
|
||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # tag=v3
|
||||
with:
|
||||
name: server-logs
|
||||
path: |
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
|
||||
services:
|
||||
postgresql:
|
||||
image: postgres:13.9
|
||||
image: postgres:15.3
|
||||
ports:
|
||||
- 5432:5432
|
||||
env:
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
options: --health-cmd="pg_isready -q -d postgres -U root" --health-interval=5s --health-timeout=2s --health-retries=3
|
||||
|
||||
mock-oauth2-server:
|
||||
image: ghcr.io/navikt/mock-oauth2-server:0.5.6
|
||||
image: ghcr.io/navikt/mock-oauth2-server:1.0.0
|
||||
ports:
|
||||
- 9000:9000
|
||||
env:
|
||||
@@ -28,22 +28,23 @@ jobs:
|
||||
|
||||
env:
|
||||
TZ: Asia/Kolkata
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
|
||||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # tag=v3
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c # v3
|
||||
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'zulu'
|
||||
cache: gradle
|
||||
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
|
||||
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
|
||||
with:
|
||||
node-version: 16
|
||||
- name: Congfigure vega-cli
|
||||
run: npm i -g vega-cli --unsafe
|
||||
- name: Validate Gradle wrapper
|
||||
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6
|
||||
uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4
|
||||
- name: Verify PostgreSQL connection
|
||||
run: |
|
||||
while ! pg_isready -d postgres -U root -h 127.0.0.1 -p 5432 ; do
|
||||
@@ -53,20 +54,40 @@ jobs:
|
||||
run: |
|
||||
./gradlew --no-daemon -q createPGDB -PdbName=fineract_tenants
|
||||
./gradlew --no-daemon -q createPGDB -PdbName=fineract_default
|
||||
- name: Start LocalStack
|
||||
env:
|
||||
AWS_ENDPOINT_URL: http://localhost:4566
|
||||
AWS_ACCESS_KEY_ID: localstack
|
||||
AWS_SECRET_ACCESS_KEY: localstack
|
||||
AWS_REGION: us-east-1
|
||||
run: |
|
||||
docker run -d --name localstack -p 4566:4566 -p 4510-4559:4510-4559 localstack/localstack:2.1
|
||||
sleep 10
|
||||
docker exec localstack awslocal s3api create-bucket --bucket fineract-reports
|
||||
echo "LocalStack initialization complete"
|
||||
- name: Install additional software
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install ghostscript graphviz -y
|
||||
|
||||
- name: Build & Test
|
||||
env:
|
||||
AWS_ENDPOINT_URL: http://localhost:4566
|
||||
AWS_ACCESS_KEY_ID: localstack
|
||||
AWS_SECRET_ACCESS_KEY: localstack
|
||||
AWS_REGION: us-east-1
|
||||
FINERACT_REPORT_EXPORT_S3_ENABLED: true
|
||||
FINERACT_REPORT_EXPORT_S3_BUCKET_NAME: fineract-reports
|
||||
run: |
|
||||
./gradlew --no-daemon --console=plain build test --fail-fast -x doc -x :twofactor-tests:test -x :oauth2-test:test -PdbType=postgresql
|
||||
./gradlew --no-daemon --console=plain :twofactor-tests:test --fail-fast -PdbType=postgresql
|
||||
./gradlew --no-daemon --console=plain :oauth2-tests:test --fail-fast -PdbType=postgresql
|
||||
./gradlew --no-daemon --console=plain build -x cucumber -x test -x doc
|
||||
./gradlew --no-daemon --console=plain cucumber
|
||||
./gradlew --no-daemon --console=plain test -x :twofactor-tests:test -x :oauth2-test:test -PdbType=postgresql
|
||||
./gradlew --no-daemon --console=plain :twofactor-tests:test -PdbType=postgresql
|
||||
./gradlew --no-daemon --console=plain :oauth2-tests:test -PdbType=postgresql
|
||||
|
||||
- name: Archive test results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3
|
||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # tag=v3
|
||||
with:
|
||||
name: test-results
|
||||
path: |
|
||||
@@ -76,7 +97,7 @@ jobs:
|
||||
|
||||
- name: Archive server logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3
|
||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # tag=v3
|
||||
with:
|
||||
name: server-logs
|
||||
path: |
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
name: Fineract ActiveMQ Smoke
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # tag=v3
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'zulu'
|
||||
cache: gradle
|
||||
- name: Build the image
|
||||
run: ./gradlew --no-daemon --console=plain :fineract-provider:clean :fineract-provider:jibDockerBuild -x test
|
||||
- name: Start the ActiveMQ Stack
|
||||
run: docker-compose -f docker-compose-postgresql-activemq.yml up --scale fineract-worker=1 -d
|
||||
- name: Wait for stack to come up
|
||||
run: sleep 500
|
||||
- name: Check health Manager
|
||||
run: curl -f -k --retry 10 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/health
|
||||
- name: Check health Worker1
|
||||
run: curl -f -k --retry 10 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8444/fineract-provider/actuator/health
|
||||
- name: Check info Manager
|
||||
run: (( $(curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/info | wc --chars) > 100 ))
|
||||
- name: Check info Worker1
|
||||
run: (( $(curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8444/fineract-provider/actuator/info | wc --chars) > 100 ))
|
||||
- name: Run Smoke Test with Remote COB
|
||||
run: ./gradlew --no-daemon --console=plain :integration-tests:cleanTest :integration-tests:test --tests "org.apache.fineract.integrationtests.investor.externalassetowner.InitiateExternalAssetOwnerTransferTest" -PcargoDisabled
|
||||
@@ -0,0 +1,37 @@
|
||||
name: Fineract Kafka Smoke
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # tag=v3
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'zulu'
|
||||
cache: gradle
|
||||
- name: Build the image
|
||||
run: ./gradlew --no-daemon --console=plain :fineract-provider:clean :fineract-provider:jibDockerBuild -x test
|
||||
- name: Start the Kafka Stack
|
||||
run: docker-compose -f docker-compose-postgresql-kafka.yml up --scale fineract-worker=1 -d
|
||||
- name: Wait for stack to come up
|
||||
run: sleep 500
|
||||
- name: Check health Manager
|
||||
run: curl -f -k --retry 10 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/health
|
||||
- name: Check health Worker1
|
||||
run: curl -f -k --retry 10 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8444/fineract-provider/actuator/health
|
||||
- name: Check info Manager
|
||||
run: (( $(curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/info | wc --chars) > 100 ))
|
||||
- name: Check info Worker1
|
||||
run: (( $(curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8444/fineract-provider/actuator/info | wc --chars) > 100 ))
|
||||
- name: Run Smoke Test with Remote COB
|
||||
run: ./gradlew --no-daemon --console=plain :integration-tests:cleanTest :integration-tests:test --tests "org.apache.fineract.integrationtests.investor.externalassetowner.InitiateExternalAssetOwnerTransferTest" -PcargoDisabled
|
||||
@@ -17,16 +17,17 @@ jobs:
|
||||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
|
||||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # tag=v3
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c # v3
|
||||
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'zulu'
|
||||
cache: gradle
|
||||
- name: Validate Gradle wrapper
|
||||
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6
|
||||
uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4
|
||||
- name: Sonarqube
|
||||
run: ./gradlew --no-daemon --console=plain -Dsonar.verbose=true -Dsonar.login=$SONAR_TOKEN -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.organization=$SONAR_ORGANIZATION -Dsonar.projectKey=$SONAR_PROJECT_KEY --info --stacktrace sonarqube
|
||||
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
pull-requests: write # for actions/stale to close stale PRs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@5ebf00ea0e4c1561e9b43a292ed34424fb1d4578 # tag=v5
|
||||
- uses: actions/stale@1160a2240286f5da8ec72b1c0816ce2481aabf84 # v8
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# stale-issue-message: 'Stale issue message'
|
||||
|
||||
@@ -2,6 +2,7 @@ Apache Fineract: A Platform for Microfinance
|
||||
============
|
||||
[](https://validator.swagger.io/validator/debug?url=https://demo.fineract.dev/fineract-provider/swagger-ui/fineract.yaml) [](https://github.com/apache/fineract/actions/workflows/build.yml) [](https://hub.docker.com/r/apache/fineract) [](https://hub.docker.com/r/apache/fineract/builds) [](https://sonarcloud.io/summary/new_code?id=apache_fineract)
|
||||
|
||||
</b>
|
||||
|
||||
Fineract is a mature platform with open APIs that provides a reliable, robust, and affordable core banking solution for financial institutions offering services to the world’s 3 billion underbanked and unbanked.
|
||||
|
||||
@@ -12,16 +13,16 @@ to start contributing to this project in the online web-based IDE GitPod.io righ
|
||||
(You may initially have to press F1 to Find Command and run "Java: Start Language Server".)
|
||||
It's of course also possible to contribute with a "traditional" local development environment (see below).
|
||||
|
||||
Community
|
||||
COMMUNITY
|
||||
=========
|
||||
|
||||
If you are interested in contributing to this project, but perhaps don't quite know how and where to get started, please [join our developer mailing list](http://fineract.apache.org/#contribute), listen into our conversations, chime into threads, and just send us a "Hello!" introduction email; we're a friendly bunch, and look forward to hearing from you.
|
||||
|
||||
|
||||
Requirements
|
||||
REQUIREMENTS
|
||||
============
|
||||
* Java >= 17 (Azul Zulu JVM is tested by our CI on GitHub Actions)
|
||||
* MariaDB 10.9
|
||||
* `Java >= 17` (Azul Zulu JVM is tested by our CI on GitHub Actions)
|
||||
* MariaDB `10.9`
|
||||
|
||||
You can run the required version of the database server in a container, instead of having to install it, like this:
|
||||
|
||||
@@ -31,20 +32,20 @@ and stop and destroy it like this:
|
||||
|
||||
docker rm -f mariadb-10.9
|
||||
|
||||
Beware that this database container database keeps its state inside the container and not on the host filesystem. It is lost when you destroy (rm) this container. This is typically fine for development. See [Caveats: Where to Store Data on the database container documentation](https://hub.docker.com/_/mariadb) re. how to make it persistent instead of ephemeral.
|
||||
<br>Beware that this database container database keeps its state inside the container and not on the host filesystem. It is lost when you destroy (rm) this container. This is typically fine for development. See [Caveats: Where to Store Data on the database container documentation](https://hub.docker.com/_/mariadb) re. how to make it persistent instead of ephemeral.<br>
|
||||
|
||||
Tomcat v9 is only required if you wish to deploy the Fineract WAR to a separate external servlet container. Note that you do not require to install Tomcat to develop Fineract, or to run it in production if you use the self-contained JAR, which transparently embeds a servlet container using Spring Boot. (Until FINERACT-730, Tomcat 7/8 were also supported, but now Tomcat 9 is required.)
|
||||
|
||||
IMPORTANT: if you use MySQL or MariaDB
|
||||
<br>IMPORTANT: If you use MySQL or MariaDB
|
||||
============
|
||||
|
||||
Recently (after release 1.7.0) we introduced improved date time handling in Fineract. Date time is from now on stored in UTC and we are enforcing UTC timezone even on the JDBC driver, e. g. for MySQL:
|
||||
Recently (after release `1.7.0`), we introduced improved date time handling in Fineract. Date time is from now on stored in UTC and we are enforcing UTC timezone even on the JDBC driver, e. g. for MySQL:
|
||||
|
||||
```
|
||||
serverTimezone=UTC&useLegacyDatetimeCode=false&sessionVariables=time_zone=‘-00:00’
|
||||
```
|
||||
|
||||
__DO__: If you do use MySQL as your Fineract databsae then the following configuration is highly recommended:
|
||||
__DO__: If you do use MySQL as your Fineract database then the following configuration is highly recommended:
|
||||
|
||||
* Run the application in UTC (the default command line in our Docker image has the necessary parameters already set)
|
||||
* Run the MySQL database server in UTC (if you use managed services like AWS RDS then this should be the default anyway, but it would be good to double-check)
|
||||
@@ -61,7 +62,7 @@ If a previously used Fineract instance didn't run in UTC (backward compatibility
|
||||
|
||||
__RECOMMENDATION__: you need to shift all dates in your database by the timezone offset that your Fineract instance used.
|
||||
|
||||
Instructions how to run for local development
|
||||
<br>INSTRUCTIONS: How to run for local development
|
||||
============
|
||||
|
||||
Run the following commands:
|
||||
@@ -70,7 +71,7 @@ Run the following commands:
|
||||
1. `./gradlew bootRun`
|
||||
|
||||
|
||||
Instructions to build the JAR file
|
||||
<br>INSTRUCTIONS: How to build the JAR file
|
||||
============
|
||||
1. Clone the repository or download and extract the archive file to your local directory.
|
||||
2. Run `./gradlew clean bootJar` to build a modern cloud native fully self contained JAR file which will be created at `fineract-provider/build/libs` directory.
|
||||
@@ -86,7 +87,7 @@ The tenants database connection details are configured [via environment variable
|
||||
java -jar fineract-provider.jar
|
||||
|
||||
|
||||
Security
|
||||
<br>SECURITY
|
||||
============
|
||||
NOTE: The HTTP Basic and OAuth2 authentication schemes are mutually exclusive. You can't enable them both at the same time. Fineract checks these settings on startup and will fail if more than one authentication scheme is enabled.
|
||||
|
||||
@@ -103,7 +104,7 @@ FINERACT_SECURITY_OAUTH_ENABLED=false
|
||||
java -Dfineract.security.basicauth.enabled=true -Dfineract.security.oauth.enabled=false -jar fineract-provider.jar
|
||||
```
|
||||
|
||||
OAuth2 Authentication
|
||||
<br>OAuth2 AUTHENTICATION
|
||||
------------
|
||||
There is also an OAuth2 authentication scheme available. Again, two ways to enable it:
|
||||
1. Use environment variables (best choice if you run with Docker Compose):
|
||||
@@ -116,7 +117,7 @@ FINERACT_SECURITY_OAUTH_ENABLED=true
|
||||
java -Dfineract.security.basicauth.enabled=false -Dfineract.security.oauth.enabled=true -jar fineract-provider.jar
|
||||
```
|
||||
|
||||
Two Factor Authentication
|
||||
TWO FACTOR AUTHENTICATION (2FA)
|
||||
------------
|
||||
You can also enable 2FA authentication. Depending on how you start Fineract add the following:
|
||||
|
||||
@@ -130,7 +131,7 @@ FINERACT_SECURITY_2FA_ENABLED=true
|
||||
```
|
||||
|
||||
|
||||
Instructions to build a WAR file
|
||||
<br>INSTRUCTIONS: How to build a WAR file
|
||||
============
|
||||
1. Clone the repository or download and extract the archive file to your local directory.
|
||||
2. Run `./gradlew :fineract-war:clean :fineract-war:war` to build a traditional WAR file which will be created at `fineract-war/build/libs` directory.
|
||||
@@ -141,7 +142,7 @@ We recommend using the JAR instead of the WAR file deployment, because it's much
|
||||
Note that with the 1.4 release the tenants database pool configuration changed from Tomcat DBCP in XML to an embedded Hikari, configured by environment variables, see above.
|
||||
|
||||
|
||||
Instructions to execute Integration Tests
|
||||
INSTRUCTIONS: How to execute Integration Tests
|
||||
============
|
||||
> Note that if this is the first time to access MySQL DB, then you may need to reset your password.
|
||||
|
||||
@@ -151,7 +152,7 @@ Run the following commands:
|
||||
1. `./gradlew clean test`
|
||||
|
||||
|
||||
Instructions to run and debug in Eclipse IDE
|
||||
INSTRUCTIONS: How to run and debug in Eclipse IDE
|
||||
============
|
||||
|
||||
It is possible to run Fineract in Eclipse IDE and also to debug Fineract using Eclipse's debugging facilities.
|
||||
@@ -169,7 +170,7 @@ You can also use Eclipse Junit support to run tests in Eclipse (Run As->Junit Te
|
||||
Finally, modifying source code in Eclipse automatically triggers hot code replace to a running instance, allowing you to immediately test your changes
|
||||
|
||||
|
||||
Instructions to run using Docker and docker-compose
|
||||
INSTRUCTIONS: How to run using Docker and docker-compose
|
||||
===================================================
|
||||
|
||||
It is possible to do a 'one-touch' installation of Fineract using containers (AKA "Docker").
|
||||
@@ -213,7 +214,7 @@ Please check `application.properties` to see which connection pool settings can
|
||||
|
||||
NOTE: we'll keep backwards compatibility until one of the next releases to ensure that things are working as expected. Environment variables prefixed `fineract_tenants_*` can still be used to configure the database connection, but we strongly encourage using `FINERACT_HIKARI_*` with more options.
|
||||
|
||||
SSL configuration
|
||||
<br>SSL CONFIGURATION
|
||||
=================
|
||||
|
||||
Read also [the HTTPS related doc](fineract-doc/src/docs/en/deployment.adoc#https).
|
||||
@@ -222,16 +223,16 @@ By default SSL is enabled, but all SSL related properties are now tunable. SSL c
|
||||
You can choose now easily a different SSL keystore by setting `FINERACT_SERVER_SSL_KEY_STORE` with a path to a different (not embedded) keystore. The password can be set via `FINERACT_SERVER_SSL_KEY_STORE_PASSWORD`. See the `application.properties` file and the latest Spring Boot documentation (https://docs.spring.io/spring-boot/docs/current/reference/html/application-properties.html) for more details.
|
||||
|
||||
|
||||
Tomcat configuration
|
||||
<br>TOMCAT CONFIGURATION
|
||||
====================
|
||||
|
||||
Please refer to the `application.properties` and the official Spring Boot documentation (https://docs.spring.io/spring-boot/docs/current/reference/html/application-properties.html) on how to do performance tuning for Tomcat. Note: you can set now the acceptable form POST size (default is 2MB) via environment variable `FINERACT_SERVER_TOMCAT_MAX_HTTP_FORM_POST_SIZE`.
|
||||
|
||||
|
||||
Instructions to run on Kubernetes
|
||||
<br>INSTRUCTIONS: How to run on Kubernetes
|
||||
=================================
|
||||
|
||||
General Clusters
|
||||
<br>General Clusters
|
||||
----------------
|
||||
|
||||
You can also run Fineract using containers on a Kubernetes cluster.
|
||||
@@ -262,7 +263,7 @@ Now to run a new Fineract instance on Minikube you can simply:
|
||||
1. `minikube service fineract-server --url --https`
|
||||
1. Fineract is now running at the printed URL (note HTTP), which you can check e.g. using:
|
||||
|
||||
http --verify=no --timeout 240 --check-status get $(minikube service fineract-server --url --https)/fineract-provider/actuator/health
|
||||
http --verify=no --timeout 240 --check-status get $(minikube service fineract-server --url --https)/fineract-provider/actuator/health
|
||||
|
||||
To check the status of your containers on your local minikube Kubernetes cluster, run:
|
||||
|
||||
@@ -285,7 +286,7 @@ To shutdown and reset your cluster, run:
|
||||
We have [some open issues in JIRA with Kubernetes related enhancement ideas](https://jira.apache.org/jira/browse/FINERACT-783?jql=labels%20%3D%20kubernetes%20AND%20project%20%3D%20%22Apache%20Fineract%22%20) which you are welcome to contribute to.
|
||||
|
||||
|
||||
Instructions to download Gradle wrapper
|
||||
INSTRUCTIONS: How to download Gradle wrapper
|
||||
============
|
||||
The file gradle/wrapper/gradle-wrapper.jar binary is checked into this projects Git source repository,
|
||||
but won't exist in your copy of the Fineract codebase if you downloaded a released source archive from apache.org.
|
||||
@@ -298,16 +299,43 @@ In that case, you need to download it using the commands below:
|
||||
curl --insecure -L https://github.com/apache/fineract/raw/develop/gradle/wrapper/gradle-wrapper.jar > gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
Instructions to run Apache RAT (Release Audit Tool)
|
||||
INSTRUCTIONS: How to run Apache RAT (Release Audit Tool)
|
||||
============
|
||||
1. Extract the archive file to your local directory.
|
||||
2. Run `./gradlew rat`. A report will be generated under build/reports/rat/rat-report.txt
|
||||
|
||||
|
||||
Instructions to enable ActiveMQ
|
||||
INSTRUCTIONS: How to enable External Message Broker (ActiveMQ or Apache Kafka)
|
||||
============
|
||||
Messaging configuration is disabled by default. If you want to enable it and register some message listeners, application needs to be started with the proper Spring profile, ie `-Dspring.profiles.active=activeMqEnabled` (or one of the other Spring ways to configure it).
|
||||
|
||||
There are two use-cases where external message broker is needed:
|
||||
- External Business Events / Reliable Event Framework
|
||||
- Executing Partitioned Spring Batch Jobs
|
||||
|
||||
External Events are business events, e.g.: `ClientCreated`, which might be important for third party systems. Apache Fineract supports ActiveMQ (or other JMS compliant brokers) and Apache Kafka endpoints for sending out Business Events. By default, they are not emitted.
|
||||
|
||||
In case of a large deployment with millions of accounts, the Close of Business Day Spring Batch job may run several hours. In order to speed up this task, remote partitioning of the job is supported. The Manager node partitions (breaks up) the COB job into smaller pieces (sub tasks) which then can be executed on multiple Worker nodes in parallel. The worker nodes are notified either by ActiveMQ or Kafka regarding their new sub tasks.
|
||||
### Active MQ
|
||||
|
||||
JMS based messaging is disabled by default. In `docker-compose-postgresql-activemq.yml` an example is shown where ActiveMQ is enabled. In that configuration one Spring Batch Manager instance and two Spring Batch Worker instances are created.
|
||||
Spring based events should be disabled and jms based event handling should be enabled. Furthermore, proper broker JMS URL should be configured.
|
||||
|
||||
```
|
||||
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_JMS_ENABLED=true
|
||||
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_SPRING_EVENTS_ENABLED=false
|
||||
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_JMS_BROKER_URL=tcp://activemq:61616
|
||||
```
|
||||
|
||||
For additional ActiveMQ related configuration please take a look to the `application.properties` where the supported configuration parameters are listed with their default values.
|
||||
|
||||
### Kafka
|
||||
|
||||
Kafka support also disabled by default. In `docker-compose-postgresql-kafka.yml` an example is shown where self-hosted Kafka is enabled for both External Events and Spring Batch Remote Job execution.
|
||||
|
||||
During the development Fineract was tested with PLAINTEXT Kafka brokers without authentication and with AWS MSK using IAM authentication. The extra [jar file](https://github.com/aws/aws-msk-iam-auth/releases) required for IAM authentication is already added to the classpath.
|
||||
An example MSK setup can be found in `docker-compose-postgresql-kafka-msk.yml`.
|
||||
|
||||
The full list of supported Kafka related properties are documented here: https://fineract.apache.org/docs/current/
|
||||
|
||||
Checkstyle and Spotless
|
||||
============
|
||||
@@ -360,7 +388,7 @@ As discussed in [LEGAL-462](https://issues.apache.org/jira/browse/LEGAL-462), th
|
||||
complies with the [Apache Software Foundation third-party license policy](https://www.apache.org/legal/resolved.html).
|
||||
|
||||
|
||||
Apache Fineract Platform API
|
||||
<br><br>APACHE FINERACT PLATFORM API
|
||||
============
|
||||
|
||||
The API for Fineract is documented in [apiLive.htm](fineract-provider/src/main/resources/static/api-docs/apiLive.htm), and the [apiLive.htm can be viewed on Fineract.dev](https://fineract.apache.org/legacy-docs/apiLive.htm "API Documentation"). If you have your own Fineract instance running, you can find this documentation under [/fineract-provider/api-docs/apiLive.htm](https://localhost:8443/fineract-provider/api-docs/apiLive.htm).
|
||||
@@ -370,7 +398,7 @@ The Swagger documentation (work in progress; see [FINERACT-733](https://issues.a
|
||||
Apache Fineract supports client code generation using [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) based on the [OpenAPI Specification](https://swagger.io/specification/). For more instructions on how to generate the client code, check [docs/developers/swagger/client.md](docs/developers/swagger/client.md).
|
||||
|
||||
|
||||
API clients (Web UIs, Mobile, etc.)
|
||||
<br>API CLIENTS (Web UIs, Mobile, etc.)
|
||||
============
|
||||
|
||||
* https://github.com/openMF/community-app/ is the "traditional" Reference Client App Web UI for the API offered by this project
|
||||
@@ -379,7 +407,7 @@ API clients (Web UIs, Mobile, etc.)
|
||||
* https://github.com/openMF has more related proejcts
|
||||
|
||||
|
||||
Online Demos
|
||||
<br>ONLINE DEMOS
|
||||
============
|
||||
|
||||
* [fineract.dev](https://www.fineract.dev) always runs the latest version of this code
|
||||
@@ -387,8 +415,7 @@ Online Demos
|
||||
* [Swagger-UI Demo video](https://www.youtube.com/watch?v=FlVd-0YAo6c) This is a demo video for Swagger-UI documentation, more information [here](https://github.com/apache/fineract#swagger-ui-documentation).
|
||||
|
||||
|
||||
|
||||
Developers
|
||||
<br>DEVELOPERS
|
||||
============
|
||||
Please see <https://cwiki.apache.org/confluence/display/FINERACT/Contributor%27s+Zone> for the developers wiki page.
|
||||
|
||||
@@ -399,47 +426,47 @@ Please see <https://cwiki.apache.org/confluence/display/FINERACT/How-to+articles
|
||||
Please visit [our JIRA Dashboard](https://issues.apache.org/jira/secure/Dashboard.jspa?selectPageId=12335824) to find issues to work on, see what others are working on, or open new issues.
|
||||
|
||||
|
||||
Video Demonstration
|
||||
<br>VIDEO DEMONSTRATION
|
||||
============
|
||||
|
||||
Apache Fineract / Mifos X Demo (November 2016) - <https://www.youtube.com/watch?v=h61g9TptMBo>
|
||||
|
||||
Swagger-UI Documentation
|
||||
<br>SWAGGER UI DEMONSTRATION
|
||||
============
|
||||
|
||||
We use Swagger-UI to generate and maintain our API documentation, you can see the demo video [here](https://www.youtube.com/watch?v=FlVd-0YAo6c) or a live version
|
||||
[here](https://demo.fineract.dev/fineract-provider/swagger-ui/index.html). If you interested to know more about Swagger-UI you can check their [website](https://swagger.io/).
|
||||
|
||||
Governance and Policies
|
||||
<br>GORVENANCE AND POLICIES
|
||||
=======================
|
||||
|
||||
[Becoming a Committer](https://cwiki.apache.org/confluence/display/FINERACT/Becoming+a+Committer)
|
||||
documents the process through which you can become a committer in this project.
|
||||
|
||||
|
||||
Error Handling Guidelines
|
||||
<br>ERROR HANDLING GUIDELINES
|
||||
------------------
|
||||
* When catching exceptions, either rethrow them, or log them. Either way, include the root cause by using `catch (SomeException e)` and then either `throw AnotherException("..details..", e)` or `LOG.error("...context...", e)`.
|
||||
* Completely empty catch blocks are VERY suspicous! Are you sure that you want to just "swallow" an exception? Really, 100% totally absolutely sure?? ;-) Such "normal exceptions which just happen sometimes but are actually not really errors" are almost always a bad idea, can be a performance issue, and typically are an indication of another problem - e.g. the use of a wrong API which throws an Exception for an expected condition, when really you would want to use another API that instead returns something empty or optional.
|
||||
* In tests, you'll typically never catch exceptions, but just propagate them, with `@Test void testXYZ() throws SomeException, AnotherException`..., so that the test fails if the exception happens. Unless you actually really want to test for the occurence of a problem - in that case, use [JUnit's Assert.assertThrows()](https://github.com/junit-team/junit4/wiki/Exception-testing) (but not `@Test(expected = SomeException.class)`).
|
||||
* Never catch `NullPointerException` & Co.
|
||||
|
||||
Logging Guidelines
|
||||
<br>LOGGING GUIDELINES
|
||||
------------------
|
||||
* We use [SLF4J](http://www.slf4j.org) as our logging API.
|
||||
* Never, ever, use `System.out` and `System.err` or `printStackTrace()` anywhere, but always `LOG.info()` or `LOG.error()` instead.
|
||||
* Use placeholder (`LOG.error("Could not... details: {}", something, exception)`) and never String concatenation (`LOG.error("Could not... details: " + something, exception)`)
|
||||
* Which Log Level is appropriate?
|
||||
* `LOG.error()` should be used to inform an "operator" running Fineract who supervises error logs of an unexpected condition. This includes technical problems with an external "environment" (e.g. can't reach a database), and situations which are likely bugs which need to be fixed in the code. They do NOT include e.g. validation errors for incoming API requests - that is signaled through the API response - and does (should) not be logged as an error. (Note that there is no _FATAL_ level in SLF4J; a "FATAL" event should just be logged as an _ERROR_.)
|
||||
* `LOG.warn()` should be using sparingly. Make up your mind if it's an error (above) - or not!
|
||||
* `LOG.info()` can be used notably for one-time actions taken during start-up. It should typically NOT be used to print out "regular" application usage information. The default logging configuration always outputs the application INFO logs, and in production under load, there's really no point to constantly spew out lots of information from frequently traversed paths in the code about what's going on. (Metrics are a better way.) `LOG.info()` *can* be used freely in tests though.
|
||||
* `LOG.debug()` can be used anywhere in the code to log things that may be useful during investigations of specific problems. They are not shown in the default logging configuration, but can be enabled for troubleshooting. Developers should typically "turn down" most `LOG.info()` which they used while writing a new feature to "follow along what happens during local testing" to `LOG.debug()` for production before we merge their PRs.
|
||||
* `LOG.trace()` is not used in Fineract.
|
||||
* `LOG.error()` should be used to inform an "operator" running Fineract who supervises error logs of an unexpected condition. This includes technical problems with an external "environment" (e.g. can't reach a database), and situations which are likely bugs which need to be fixed in the code. They do NOT include e.g. validation errors for incoming API requests - that is signaled through the API response - and does (should) not be logged as an error. (Note that there is no _FATAL_ level in SLF4J; a "FATAL" event should just be logged as an _ERROR_.)
|
||||
* `LOG.warn()` should be using sparingly. Make up your mind if it's an error (above) - or not!
|
||||
* `LOG.info()` can be used notably for one-time actions taken during start-up. It should typically NOT be used to print out "regular" application usage information. The default logging configuration always outputs the application INFO logs, and in production under load, there's really no point to constantly spew out lots of information from frequently traversed paths in the code about what's going on. (Metrics are a better way.) `LOG.info()` *can* be used freely in tests though.
|
||||
* `LOG.debug()` can be used anywhere in the code to log things that may be useful during investigations of specific problems. They are not shown in the default logging configuration, but can be enabled for troubleshooting. Developers should typically "turn down" most `LOG.info()` which they used while writing a new feature to "follow along what happens during local testing" to `LOG.debug()` for production before we merge their PRs.
|
||||
* `LOG.trace()` is not used in Fineract.
|
||||
|
||||
Pull Requests
|
||||
-------------
|
||||
|
||||
We request that your commit message include a FINERACT JIRA issue, recommended to be put in parenthesis add the end of the first line. Start with an upper case imperative verb (not past form), and a short but concise clear description. (E.g. _Add enforced HideUtilityClassConstructor checkstyle (FINERACT-821)_ or _Fix inability to reschedule when interest accrued larger than EMI (FINERACT-1109)_ etc.).
|
||||
We request that your commit message include a FINERACT JIRA issue, recommended to be put in parentheses at the end of the first line. Start with an upper case imperative verb (not past form), and a short but concise clear description. (E.g. _Add enforced HideUtilityClassConstructor checkstyle (FINERACT-821)_ or _Fix inability to reschedule when interest accrued larger than EMI (FINERACT-1109)_ etc.).
|
||||
|
||||
If your PR is failing to pass our CI build due to a test failure, then:
|
||||
|
||||
|
||||
+47
-42
@@ -19,7 +19,7 @@
|
||||
// TODO: this is work in progress, please follow FINERACT-1171
|
||||
buildscript {
|
||||
ext {
|
||||
jacocoVersion = '0.8.7'
|
||||
jacocoVersion = '0.8.10'
|
||||
retrofitVersion = '2.9.0'
|
||||
okhttpVersion = '4.9.3'
|
||||
oltuVersion = '1.0.1'
|
||||
@@ -27,7 +27,10 @@ buildscript {
|
||||
fineractJavaProjects = subprojects.findAll{
|
||||
[
|
||||
'fineract-api',
|
||||
'fineract-core',
|
||||
'fineract-provider',
|
||||
'fineract-investor',
|
||||
'fineract-loan',
|
||||
'integration-tests',
|
||||
'twofactor-tests',
|
||||
'oauth2-tests',
|
||||
@@ -38,7 +41,10 @@ buildscript {
|
||||
fineractPublishProjects = subprojects.findAll{
|
||||
[
|
||||
'fineract-avro-schemas',
|
||||
'fineract-client'
|
||||
'fineract-client',
|
||||
'fineract-provider',
|
||||
'fineract-investor',
|
||||
'fineract-loan'
|
||||
].contains(it.name)
|
||||
}
|
||||
npmRepository = 'https://npm.pkg.github.com'
|
||||
@@ -49,24 +55,26 @@ buildscript {
|
||||
|
||||
dependencies {
|
||||
classpath 'com.bmuschko:gradle-cargo-plugin:2.9.0'
|
||||
classpath 'org.eclipse.persistence:eclipselink:2.7.10'
|
||||
classpath 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6'
|
||||
classpath 'org.eclipse.persistence:eclipselink:4.0.0'
|
||||
classpath 'jakarta.ws.rs:jakarta.ws.rs-api:3.1.0'
|
||||
classpath 'com.google.cloud.tools:jib-layer-filter-extension-gradle:0.3.0'
|
||||
classpath 'org.apache.commons:commons-lang3:3.12.0'
|
||||
classpath 'io.swagger.core.v3:swagger-jaxrs2-jakarta:2.2.11'
|
||||
classpath 'jakarta.servlet:jakarta.servlet-api:6.0.0'
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "org.barfuin.gradle.taskinfo" version "1.4.0"
|
||||
id "org.barfuin.gradle.taskinfo" version "2.1.0"
|
||||
id 'com.adarshr.test-logger' version '3.2.0'
|
||||
id 'com.diffplug.spotless' version '6.12.0' apply false
|
||||
id 'com.diffplug.spotless' version '6.19.0' apply false
|
||||
id 'org.nosphere.apache.rat' version '0.8.0' apply false
|
||||
id 'com.github.hierynomus.license' version '0.16.1' apply false
|
||||
id 'com.github.jk1.dependency-license-report' version '2.1' apply false
|
||||
id 'org.openapi.generator' version '6.2.1' apply false
|
||||
id 'com.github.jk1.dependency-license-report' version '2.5' apply false
|
||||
id 'org.zeroturnaround.gradle.jrebel' version '1.1.12' apply false
|
||||
id 'org.springframework.boot' version '2.7.6' apply false
|
||||
id 'net.ltgt.errorprone' version '2.0.2' apply false
|
||||
id 'io.swagger.core.v3.swagger-gradle-plugin' version '2.2.7' apply false
|
||||
id 'org.springframework.boot' version '3.1.1' apply false
|
||||
id 'net.ltgt.errorprone' version '3.1.0' apply false
|
||||
id 'io.swagger.core.v3.swagger-gradle-plugin' version '2.2.11' apply false
|
||||
id 'com.gorylenko.gradle-git-properties' version '2.4.1' apply false
|
||||
id 'org.asciidoctor.jvm.convert' version '3.3.2' apply false
|
||||
id 'org.asciidoctor.jvm.pdf' version '3.3.2' apply false
|
||||
@@ -74,13 +82,13 @@ plugins {
|
||||
id 'org.asciidoctor.jvm.revealjs' version '3.3.2' apply false
|
||||
id 'org.asciidoctor.jvm.gems' version '3.3.2' apply false
|
||||
id 'org.asciidoctor.kindlegen.base' version '3.2.0' apply false
|
||||
id 'com.google.cloud.tools.jib' version '3.3.1' apply false
|
||||
id 'com.google.cloud.tools.jib' version '3.3.2' apply false
|
||||
id 'fr.brouillard.oss.gradle.jgitver' version '0.10.0-rc03'
|
||||
id 'org.sonarqube' version '3.5.0.2730'
|
||||
id 'com.github.andygoossens.modernizer' version '1.6.2' apply false
|
||||
id 'com.github.spotbugs' version '5.0.13' apply false
|
||||
id 'org.sonarqube' version '4.2.1.3168'
|
||||
id 'com.github.andygoossens.modernizer' version '1.8.0' apply false
|
||||
id 'com.github.spotbugs' version '5.0.14' apply false
|
||||
id 'se.thinkcode.cucumber-runner' version '0.0.11' apply false
|
||||
id "com.github.davidmc24.gradle.plugin.avro-base" version "1.5.0" apply false
|
||||
id "com.github.davidmc24.gradle.plugin.avro-base" version "1.7.1" apply false
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/buildSrc/src/main/groovy/org.apache.fineract.release.gradle"
|
||||
@@ -89,8 +97,8 @@ description = '''\
|
||||
Run as:
|
||||
gradle clean bootRun'''
|
||||
|
||||
ext['groovy.version'] = '3.0.10'
|
||||
ext['swaggerFile'] = "$rootDir/fineract-provider/build/classes/java/main/static/fineract.yaml".toString()
|
||||
ext['groovy.version'] = '4.0.6'
|
||||
ext['swaggerFile'] = "$rootDir/fineract-provider/build/classes/java/main/static/fineract.json".toString()
|
||||
|
||||
allprojects {
|
||||
group = 'org.apache.fineract'
|
||||
@@ -180,6 +188,7 @@ allprojects {
|
||||
'**/*.github/**',
|
||||
'**/MANIFEST.MF',
|
||||
'**/spring.factories',
|
||||
'**/org.springframework.boot.autoconfigure.AutoConfiguration.imports',
|
||||
'**/*.json',
|
||||
'**/*.json.template',
|
||||
'**/*.txt',
|
||||
@@ -282,7 +291,6 @@ configure(project.fineractJavaProjects) {
|
||||
apply plugin: 'net.ltgt.errorprone'
|
||||
apply plugin: 'com.github.spotbugs'
|
||||
apply plugin: 'com.github.andygoossens.modernizer'
|
||||
apply plugin: 'se.thinkcode.cucumber-runner'
|
||||
apply from: "${rootDir}/buildSrc/src/main/groovy/org.apache.fineract.dependencies.gradle"
|
||||
|
||||
group = 'org.apache.fineract'
|
||||
@@ -293,14 +301,16 @@ configure(project.fineractJavaProjects) {
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
/* http://stackoverflow.com/questions/19653311/jpa-repository-works-in-idea-and-production-but-not-in-gradle */
|
||||
sourceSets.main.output.resourcesDir = sourceSets.main.java.outputDir
|
||||
sourceSets.test.output.resourcesDir = sourceSets.test.java.outputDir
|
||||
sourceSets.main.output.resourcesDir = sourceSets.main.java.classesDirectory
|
||||
sourceSets.test.output.resourcesDir = sourceSets.test.java.classesDirectory
|
||||
|
||||
configurations {
|
||||
implementation.setCanBeResolved(true)
|
||||
api.setCanBeResolved(true)
|
||||
}
|
||||
|
||||
tasks.withType(Copy) {
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
}
|
||||
tasks.withType(JavaCompile) {
|
||||
options.compilerArgs += [
|
||||
"-Xlint:unchecked",
|
||||
@@ -396,21 +406,21 @@ configure(project.fineractJavaProjects) {
|
||||
// Configuration for the Checkstyle plugin
|
||||
// https://docs.gradle.org/current/userguide/checkstyle_plugin.html
|
||||
dependencies {
|
||||
checkstyle 'com.puppycrawl.tools:checkstyle:10.5.0'
|
||||
checkstyle 'com.github.sevntu-checkstyle:sevntu-checks:1.43.0'
|
||||
checkstyle 'com.puppycrawl.tools:checkstyle:10.12.1'
|
||||
checkstyle 'com.github.sevntu-checkstyle:sevntu-checks:1.44.1'
|
||||
}
|
||||
|
||||
// Configuration for JaCoCo code coverage task
|
||||
// https://www.eclemma.org/jacoco/
|
||||
jacoco {
|
||||
toolVersion = jacocoVersion
|
||||
reportsDir = file("$buildDir/reports/jacoco")
|
||||
reportsDirectory = file("$buildDir/reports/jacoco")
|
||||
}
|
||||
|
||||
jacocoTestReport {
|
||||
reports {
|
||||
html.enabled=true
|
||||
xml.enabled=true
|
||||
html.required = true
|
||||
xml.required = true
|
||||
html.destination file("${buildDir}/code-coverage")
|
||||
}
|
||||
}
|
||||
@@ -418,11 +428,12 @@ configure(project.fineractJavaProjects) {
|
||||
// Configuration for the errorprone plugin
|
||||
// https://github.com/tbroyer/gradle-errorprone-plugin
|
||||
dependencies {
|
||||
errorprone "com.google.errorprone:error_prone_core:2.16"
|
||||
errorprone "com.google.errorprone:error_prone_core:2.20.0"
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.errorprone {
|
||||
enabled = project.gradle.startParameter.taskNames.contains('build') || project.gradle.startParameter.taskNames.contains('check')
|
||||
disableWarningsInGeneratedCode = true
|
||||
excludedPaths = ".*/build/.*"
|
||||
disable(
|
||||
@@ -440,7 +451,8 @@ configure(project.fineractJavaProjects) {
|
||||
"DirectInvocationOnMock",
|
||||
"CanIgnoreReturnValueSuggester",
|
||||
"SameNameButDifferent", // Until errorprone recognizes Lombok
|
||||
"MultiVariableDeclaration" // Until errorprone recognizes Lombok
|
||||
"MultiVariableDeclaration", // Until errorprone recognizes Lombok
|
||||
"UnnecessaryDefaultInEnumSwitch" // FINERACT-1911
|
||||
)
|
||||
error(
|
||||
"DefaultCharset",
|
||||
@@ -503,7 +515,6 @@ configure(project.fineractJavaProjects) {
|
||||
"EqualsGetClass",
|
||||
"EqualsUnsafeCast",
|
||||
"DoubleBraceInitialization",
|
||||
"UnnecessaryDefaultInEnumSwitch",
|
||||
"UnusedNestedClass",
|
||||
"UnusedMethod",
|
||||
"ModifiedButNotUsed",
|
||||
@@ -521,7 +532,7 @@ configure(project.fineractJavaProjects) {
|
||||
}
|
||||
}
|
||||
|
||||
compileJava {
|
||||
check {
|
||||
dependsOn(rat, licenseMain, licenseTest)
|
||||
}
|
||||
|
||||
@@ -548,11 +559,7 @@ configure(project.fineractJavaProjects) {
|
||||
'org.bouncycastle:bcprov-jdk15to18',
|
||||
'org.awaitility:awaitility',
|
||||
'com.google.truth:truth',
|
||||
'com.google.truth.extensions:truth-java8-extension',
|
||||
'io.cucumber:cucumber-core',
|
||||
'io.cucumber:cucumber-java',
|
||||
'io.cucumber:cucumber-java8',
|
||||
'io.cucumber:cucumber-junit-platform-engine',
|
||||
'com.google.truth.extensions:truth-java8-extension'
|
||||
)
|
||||
}
|
||||
|
||||
@@ -570,12 +577,6 @@ configure(project.fineractJavaProjects) {
|
||||
logLevel 'quiet'
|
||||
}
|
||||
|
||||
cucumber {
|
||||
tags = 'not @ignore'
|
||||
main = 'io.cucumber.core.cli.Main'
|
||||
shorten = 'argfile'
|
||||
}
|
||||
|
||||
// Configuration for spotbugs plugin
|
||||
// https://github.com/spotbugs/spotbugs-gradle-plugin
|
||||
|
||||
@@ -610,6 +611,10 @@ configure(project.fineractJavaProjects) {
|
||||
violationLogLevel="error"
|
||||
javaVersion = project.targetCompatibility
|
||||
ignoreGeneratedClasses = true
|
||||
// Rules can be found here: https://github.com/gaul/modernizer-maven-plugin/blob/master/modernizer-maven-plugin/src/main/resources/modernizer.xml
|
||||
exclusions = [
|
||||
'java/util/Optional.get:()Ljava/lang/Object;' // Disable forcing the usage of Optional.orElseThrow(java.util.function.Supplier<? extends X>)
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import static org.slf4j.LoggerFactory.*
|
||||
|
||||
plugins {
|
||||
id 'io.spring.dependency-management' version '1.1.0'
|
||||
id 'groovy'
|
||||
@@ -23,6 +26,12 @@ plugins {
|
||||
id 'groovy-gradle-plugin'
|
||||
}
|
||||
|
||||
//Suppress errors related to invalid org.eclipse.* maven poms versions.
|
||||
def loggerFactory = getILoggerFactory()
|
||||
def noOpMethod = getILoggerFactory().getClass().getDeclaredMethod("addNoOpLogger", String.class)
|
||||
noOpMethod.setAccessible(true)
|
||||
noOpMethod.invoke(loggerFactory, "io.spring.gradle.dependencymanagement.internal.maven.EffectiveModelBuilder")
|
||||
|
||||
apply from: "${projectDir}/src/main/groovy/org.apache.fineract.dependencies.gradle"
|
||||
|
||||
description = 'Fineract Gradle Plugin'
|
||||
|
||||
@@ -22,14 +22,15 @@ apply plugin: 'io.spring.dependency-management'
|
||||
// https://github.com/spring-gradle-plugins/dependency-management-plugin
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom 'org.springframework:spring-framework-bom:5.3.24'
|
||||
mavenBom 'org.springframework.boot:spring-boot-dependencies:2.7.6'
|
||||
mavenBom 'org.jetbrains.kotlin:kotlin-bom:1.7.22'
|
||||
mavenBom 'org.junit:junit-bom:5.9.1'
|
||||
mavenBom 'com.fasterxml.jackson:jackson-bom:2.14.1'
|
||||
mavenBom 'io.cucumber:cucumber-bom:7.9.0'
|
||||
mavenBom 'io.netty:netty-bom:4.1.85.Final'
|
||||
mavenBom 'org.mockito:mockito-bom:4.9.0'
|
||||
mavenBom 'org.springframework:spring-framework-bom:6.0.10'
|
||||
mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.1'
|
||||
mavenBom 'org.jetbrains.kotlin:kotlin-bom:1.8.22'
|
||||
mavenBom 'org.junit:junit-bom:5.9.3'
|
||||
mavenBom 'com.fasterxml.jackson:jackson-bom:2.15.2'
|
||||
mavenBom 'io.cucumber:cucumber-bom:7.12.1'
|
||||
mavenBom 'io.netty:netty-bom:4.1.94.Final'
|
||||
mavenBom 'org.mockito:mockito-bom:5.4.0'
|
||||
mavenBom 'software.amazon.awssdk:bom:2.20.97'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -37,38 +38,65 @@ dependencyManagement {
|
||||
// We do not use :+ to get the latest available version available on Maven Central, as that could suddenly break things.
|
||||
// We use the Renovate Bot to automatically propose Pull Requests (PRs) when upgrades for all of these versions are available.
|
||||
|
||||
dependency 'org.slf4j:slf4j-api:1.7.36'
|
||||
dependency 'org.slf4j:slf4j-simple:1.7.36'
|
||||
dependency 'org.slf4j:jcl-over-slf4j:1.7.36'
|
||||
dependency 'org.slf4j:jul-to-slf4j:1.7.36'
|
||||
dependency 'org.slf4j:log4j-over-slf4j:1.7.36'
|
||||
dependency 'ch.qos.logback:logback-core:1.2.11'
|
||||
dependency 'ch.qos.logback:logback-classic:1.2.11'
|
||||
dependency 'org.slf4j:slf4j-api:2.0.7'
|
||||
dependency 'org.slf4j:slf4j-simple:2.0.7'
|
||||
dependency 'org.slf4j:jcl-over-slf4j:2.0.7'
|
||||
dependency 'org.slf4j:jul-to-slf4j:2.0.7'
|
||||
dependency 'org.slf4j:log4j-over-slf4j:2.0.7'
|
||||
dependency 'ch.qos.logback:logback-core:1.4.8'
|
||||
dependency 'ch.qos.logback:logback-classic:1.4.8'
|
||||
dependency 'ch.qos.logback.contrib:logback-json-classic:0.1.5'
|
||||
dependency 'ch.qos.logback.contrib:logback-jackson:0.1.5'
|
||||
dependency 'org.codehaus.janino:janino:3.1.9'
|
||||
|
||||
dependency 'org.eclipse.persistence:org.eclipse.persistence.jpa:2.7.10'
|
||||
dependency 'com.google.guava:guava:31.1-jre'
|
||||
dependency 'com.google.code.gson:gson:2.10'
|
||||
dependency 'com.google.truth:truth:1.1.3'
|
||||
dependency 'com.google.truth.extensions:truth-java8-extension:1.1.3'
|
||||
dependency 'com.google.googlejavaformat:google-java-format:1.15.0'
|
||||
|
||||
dependency 'org.eclipse.persistence:org.eclipse.persistence.jpa:4.0.0'
|
||||
dependency 'com.google.guava:guava:32.0.0-jre'
|
||||
dependency 'com.google.code.gson:gson:2.10.1'
|
||||
dependency 'com.google.truth:truth:1.1.5'
|
||||
dependency 'com.google.truth.extensions:truth-java8-extension:1.1.5'
|
||||
dependency 'com.google.googlejavaformat:google-java-format:1.17.0'
|
||||
dependency ('org.apache.commons:commons-email:1.5') {
|
||||
exclude 'com.sun.mail:javax.mail'
|
||||
exclude 'javax.activation:activation'
|
||||
}
|
||||
dependency 'commons-io:commons-io:2.11.0'
|
||||
dependency 'commons-io:commons-io:2.13.0'
|
||||
dependency 'com.github.librepdf:openpdf:1.3.30'
|
||||
dependency ('org.mnode.ical4j:ical4j:3.2.7') {
|
||||
dependency ('org.mnode.ical4j:ical4j:3.2.11') {
|
||||
exclude 'com.sun.mail:javax.mail'
|
||||
exclude 'org.codehaus.groovy:groovy'
|
||||
}
|
||||
dependency 'org.apache.commons:commons-csv:1.10.0'
|
||||
dependency 'org.quartz-scheduler:quartz:2.3.2'
|
||||
dependency 'com.amazonaws:aws-java-sdk-s3:1.12.350'
|
||||
dependency 'software.amazon.awssdk:bom:2.20.97'
|
||||
dependency 'org.ehcache:ehcache:3.10.8'
|
||||
dependency 'com.github.spullara.mustache.java:compiler:0.9.10'
|
||||
dependency 'com.jayway.jsonpath:json-path:2.7.0'
|
||||
dependency 'org.apache.tika:tika-core:2.6.0'
|
||||
dependency ('org.apache.tika:tika-parser-microsoft-module:2.6.0') {
|
||||
dependency 'com.jayway.jsonpath:json-path:2.8.0'
|
||||
dependency 'org.apache.tika:tika-core:2.8.0'
|
||||
dependency ('org.apache.tika:tika-parser-microsoft-module:2.8.0') {
|
||||
exclude 'org.bouncycastle:bcprov-jdk15on'
|
||||
exclude 'org.bouncycastle:bcmail-jdk15on'
|
||||
exclude 'org.bouncycastle:bcprov-jdk18on'
|
||||
exclude 'org.bouncycastle:bcmail-jdk18on'
|
||||
exclude 'commons-logging:commons-logging'
|
||||
exclude 'org.apache.logging.log4j:log4j-api'
|
||||
exclude 'org.slf4j:slf4j-api'
|
||||
exclude 'commons-io:commons-io'
|
||||
exclude 'commons-logging:commons-logging'
|
||||
exclude 'commons-codec:commons-codec'
|
||||
exclude 'org.apache.commons:commons-compress'
|
||||
exclude 'org.apache.commons:commons-lang3'
|
||||
exclude 'org.apache.poi:poi'
|
||||
exclude 'org.apache.poi:poi-scratchpad'
|
||||
exclude 'org.glassfish.jaxb:jaxb-runtime'
|
||||
exclude 'org.apache.commons:commons-compress'
|
||||
exclude 'xml-apis:xml-apis'
|
||||
}
|
||||
dependency ('org.apache.tika:tika-parser-miscoffice-module:2.8.0') {
|
||||
exclude 'org.bouncycastle:bcprov-jdk15on'
|
||||
exclude 'org.bouncycastle:bcmail-jdk15on'
|
||||
exclude 'org.bouncycastle:bcprov-jdk18on'
|
||||
exclude 'org.bouncycastle:bcmail-jdk18on'
|
||||
exclude 'commons-logging:commons-logging'
|
||||
exclude 'org.apache.logging.log4j:log4j-api'
|
||||
exclude 'org.slf4j:slf4j-api'
|
||||
@@ -82,39 +110,25 @@ dependencyManagement {
|
||||
exclude 'org.apache.commons:commons-compress'
|
||||
exclude 'xml-apis:xml-apis'
|
||||
}
|
||||
dependency ('org.apache.tika:tika-parser-miscoffice-module:2.6.0') {
|
||||
exclude 'org.bouncycastle:bcprov-jdk15on'
|
||||
exclude 'org.bouncycastle:bcmail-jdk15on'
|
||||
exclude 'commons-logging:commons-logging'
|
||||
exclude 'org.apache.logging.log4j:log4j-api'
|
||||
exclude 'org.slf4j:slf4j-api'
|
||||
exclude 'commons-io:commons-io'
|
||||
exclude 'commons-codec:commons-codec'
|
||||
exclude 'org.apache.commons:commons-compress'
|
||||
exclude 'org.apache.commons:commons-lang3'
|
||||
exclude 'org.apache.poi:poi'
|
||||
exclude 'org.apache.poi:poi-scratchpad'
|
||||
exclude 'org.glassfish.jaxb:jaxb-runtime'
|
||||
exclude 'org.apache.commons:commons-compress'
|
||||
exclude 'xml-apis:xml-apis'
|
||||
dependency ('org.apache.httpcomponents:httpclient:4.5.14') {
|
||||
exclude 'commons-logging:commons-logging:'
|
||||
}
|
||||
dependency 'org.apache.httpcomponents:httpclient:4.5.13'
|
||||
dependency 'jakarta.management.j2ee:jakarta.management.j2ee-api:1.1.4'
|
||||
dependency 'jakarta.jms:jakarta.jms-api:2.0.3'
|
||||
dependency 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6'
|
||||
dependency 'org.glassfish.jersey.media:jersey-media-multipart:2.36'
|
||||
dependency 'jakarta.jms:jakarta.jms-api:3.1.0'
|
||||
dependency 'jakarta.ws.rs:jakarta.ws.rs-api:3.1.0'
|
||||
dependency 'org.glassfish.jersey.media:jersey-media-multipart:3.1.2'
|
||||
dependency 'org.glassfish.jaxb:jaxb-runtime:2.3.6' // Swagger needs exactly this version
|
||||
dependency 'org.apache.bval:org.apache.bval.bundle:2.0.6'
|
||||
dependency 'joda-time:joda-time:2.12.1'
|
||||
dependency 'joda-time:joda-time:2.12.5'
|
||||
|
||||
dependency 'io.github.classgraph:classgraph:4.8.151'
|
||||
dependency 'io.github.classgraph:classgraph:4.8.160'
|
||||
dependency 'org.awaitility:awaitility:4.2.0'
|
||||
dependency 'com.github.spotbugs:spotbugs-annotations:4.7.3'
|
||||
dependency 'javax.cache:cache-api:1.1.1'
|
||||
dependency 'org.mock-server:mockserver-junit-jupiter:5.14.0'
|
||||
dependency 'org.webjars:webjars-locator-core:0.52'
|
||||
dependency 'com.icegreen:greenmail-junit5:1.6.11'
|
||||
dependency 'com.intuit.karate:karate-junit5:1.3.0'
|
||||
dependency 'org.mock-server:mockserver-junit-jupiter:5.15.0'
|
||||
dependency 'org.webjars:webjars-locator-core:0.53'
|
||||
dependency 'com.icegreen:greenmail-junit5:2.0.0'
|
||||
dependency 'com.intuit.karate:karate-junit5:1.4.0'
|
||||
|
||||
// fineract client dependencies
|
||||
dependency "com.squareup.retrofit2:retrofit:2.9.0"
|
||||
@@ -134,99 +148,104 @@ dependencyManagement {
|
||||
dependency "org.apache.oltu.oauth2:org.apache.oltu.oauth2.common:1.0.1"
|
||||
dependency "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.1"
|
||||
dependency "org.apache.oltu.oauth2:org.apache.oltu.oauth2.httpclient4:1.0.1"
|
||||
dependency "com.squareup.okhttp3:okhttp:4.10.0"
|
||||
dependency "com.squareup.okhttp3:okcurl:4.10.0"
|
||||
dependency "com.squareup.okhttp3:logging-interceptor:4.10.0"
|
||||
dependency "com.squareup.okhttp3:okhttp:4.11.0"
|
||||
dependency "com.squareup.okhttp3:okcurl:4.11.0"
|
||||
dependency "com.squareup.okhttp3:logging-interceptor:4.11.0"
|
||||
dependency "com.squareup.okhttp3:okhttp-apache:4.9.3"
|
||||
dependency "com.squareup.okhttp3:okhttp-android-support:4.9.3"
|
||||
dependency "com.squareup.okhttp3:okhttp-urlconnection:4.10.0"
|
||||
dependency "com.squareup.okhttp3:okhttp-sse:4.10.0"
|
||||
dependency "com.squareup.okhttp3:okhttp-urlconnection:4.11.0"
|
||||
dependency "com.squareup.okhttp3:okhttp-sse:4.11.0"
|
||||
dependency "io.gsonfire:gson-fire:1.8.5"
|
||||
dependency "com.google.code.findbugs:jsr305:3.0.2"
|
||||
dependency "commons-codec:commons-codec:1.15"
|
||||
dependency "org.projectlombok:lombok:1.18.24"
|
||||
dependency "commons-codec:commons-codec:1.16.0"
|
||||
dependency "org.projectlombok:lombok:1.18.28"
|
||||
|
||||
dependency 'org.bouncycastle:bcpkix-jdk15to18:1.72'
|
||||
dependency 'org.bouncycastle:bcprov-jdk15to18:1.72'
|
||||
dependency 'org.bouncycastle:bcpkix-jdk15to18:1.75'
|
||||
dependency 'org.bouncycastle:bcprov-jdk15to18:1.75'
|
||||
dependency 'org.bouncycastle:bcprov-jdk15on:1.70'
|
||||
dependency 'org.bouncycastle:bcpg-jdk15on:1.70'
|
||||
|
||||
dependency 'org.eclipse.jgit:org.eclipse.jgit:6.3.0.202209071007-r'
|
||||
dependency 'org.eclipse.jgit:org.eclipse.jgit.ssh.apache:6.3.0.202209071007-r'
|
||||
dependency 'org.eclipse.jgit:org.eclipse.jgit:6.6.0.202305301015-r'
|
||||
dependency 'org.eclipse.jgit:org.eclipse.jgit.ssh.apache:6.6.0.202305301015-r'
|
||||
|
||||
dependency 'org.tmatesoft.svnkit:svnkit:1.10.9'
|
||||
dependency 'org.tmatesoft.svnkit:svnkit:1.10.11'
|
||||
dependency 'com.vdurmont:semver4j:3.1.0'
|
||||
dependency 'org.beryx:text-io:3.4.1'
|
||||
|
||||
dependency 'org.springdoc:springdoc-openapi-ui:1.6.13'
|
||||
dependency 'org.springdoc:springdoc-openapi-webmvc-core:1.6.13'
|
||||
dependency 'org.springdoc:springdoc-openapi-common:1.6.13'
|
||||
dependency 'org.springdoc:springdoc-openapi-security:1.6.13'
|
||||
dependency 'org.springdoc:springdoc-openapi-javadoc:1.6.13'
|
||||
dependency ('org.springdoc:springdoc-openapi-starter-webmvc-ui:2.1.0') {
|
||||
exclude 'io.swagger.core.v3:swagger-core'
|
||||
}
|
||||
|
||||
dependency 'com.google.cloud.sql:mysql-socket-factory-connector-j-8:1.7.2'
|
||||
dependency 'com.google.cloud.sql:mysql-socket-factory-connector-j-8:1.12.0'
|
||||
|
||||
dependency ('org.apache.activemq:activemq-broker:5.17.2') {
|
||||
dependency ('org.apache.activemq:activemq-client-jakarta:5.18.2') {
|
||||
exclude 'javax.annotation:javax.annotation-api'
|
||||
}
|
||||
|
||||
dependency 'io.swagger:swagger-annotations:1.6.9'
|
||||
dependency 'io.swagger.core.v3:swagger-annotations:2.2.7'
|
||||
dependency ('io.swagger.core.v3:swagger-jaxrs2:2.2.7') {
|
||||
dependency 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.11'
|
||||
dependency ('io.swagger.core.v3:swagger-jaxrs2-jakarta:2.2.11') {
|
||||
exclude 'jakarta.activation:jakarta.activation-api'
|
||||
}
|
||||
dependency ('io.swagger.core.v3:swagger-core:2.2.7') {
|
||||
dependency ('io.swagger.core.v3:swagger-core-jakarta:2.2.11') {
|
||||
exclude 'jakarta.activation:jakarta.activation-api'
|
||||
}
|
||||
|
||||
dependency "jakarta.annotation:jakarta.annotation-api:1.3.5"
|
||||
dependency 'jakarta.activation:jakarta.activation-api:2.1.0'
|
||||
dependency ('com.sun.mail:jakarta.mail:1.6.7') {
|
||||
dependency "jakarta.annotation:jakarta.annotation-api:2.1.1"
|
||||
dependency 'jakarta.activation:jakarta.activation-api:2.1.2'
|
||||
dependency ('com.sun.mail:jakarta.mail:2.0.1') {
|
||||
// Spring needs this version
|
||||
exclude 'com.sun.activation:jakarta.activation'
|
||||
}
|
||||
dependency ('jakarta.xml.bind:jakarta.xml.bind-api:2.3.3') {
|
||||
dependency ('jakarta.xml.bind:jakarta.xml.bind-api:4.0.0') {
|
||||
exclude 'jakarta.activation:jakarta.activation-api'
|
||||
}
|
||||
|
||||
dependency ('org.liquibase:liquibase-core:4.17.2') {
|
||||
dependency ('org.liquibase:liquibase-core:4.23.0') {
|
||||
exclude 'javax.xml.bind:jaxb-api'
|
||||
}
|
||||
|
||||
dependency ('org.dom4j:dom4j:2.1.3') {
|
||||
dependency ('org.dom4j:dom4j:2.1.4') {
|
||||
exclude 'relaxngDatatype:relaxngDatatype' // already in com.sun.xml.bind:jaxb-osgi:2.3.0.1
|
||||
// FINERACT-940 && FINERACT-966 https://github.com/spotbugs/spotbugs/issues/1128
|
||||
exclude 'xpp3:xpp3'
|
||||
exclude 'pull-parser:pull-parser'
|
||||
}
|
||||
|
||||
dependency 'org.owasp.esapi:esapi:2.5.1.0'
|
||||
dependency 'org.owasp.esapi:esapi:2.5.2.0'
|
||||
dependency 'org.awaitility:awaitility:4.2.0'
|
||||
|
||||
dependencySet(group: 'org.apache.poi', version: '5.2.2') {
|
||||
dependencySet(group: 'org.apache.poi', version: '5.2.3') {
|
||||
entry 'poi'
|
||||
entry 'poi-ooxml'
|
||||
entry 'poi-ooxml-schemas'
|
||||
}
|
||||
|
||||
dependencySet(group: 'io.rest-assured', version: '4.5.1') {
|
||||
dependencySet(group: 'io.rest-assured', version: '5.3.1') {
|
||||
entry 'rest-assured'
|
||||
entry 'json-path'
|
||||
entry 'xml-path'
|
||||
}
|
||||
dependency 'org.apache.groovy:groovy-xml:4.0.13'
|
||||
dependency 'org.apache.groovy:groovy-json:4.0.13'
|
||||
|
||||
dependency 'org.mapstruct:mapstruct:1.5.3.Final'
|
||||
dependency 'org.mapstruct:mapstruct-processor:1.5.3.Final'
|
||||
dependency 'org.mapstruct:mapstruct:1.5.5.Final'
|
||||
dependency 'org.mapstruct:mapstruct-processor:1.5.5.Final'
|
||||
|
||||
dependency "org.apache.avro:avro:1.11.1"
|
||||
|
||||
dependency "io.github.resilience4j:resilience4j-spring-boot2:1.7.1"
|
||||
dependency "io.github.resilience4j:resilience4j-spring-boot2:2.0.2"
|
||||
|
||||
dependency ('org.mariadb.jdbc:mariadb-java-client:3.1.0') {
|
||||
dependency ('org.mariadb.jdbc:mariadb-java-client:3.1.4') {
|
||||
exclude 'org.slf4j:jcl-over-slf4j'
|
||||
exclude 'org.slf4j:slf4j-api'
|
||||
}
|
||||
|
||||
dependency 'org.postgresql:postgresql:42.5.1'
|
||||
dependency 'org.postgresql:postgresql:42.6.0'
|
||||
|
||||
dependency 'org.assertj:assertj-core:3.24.2'
|
||||
|
||||
dependency 'org.apache.commons:commons-math3:3.6.1'
|
||||
|
||||
dependency 'org.mockito:mockito-inline:5.2.0'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,9 +23,9 @@ import org.apache.fineract.gradle.FineractPluginExtension.FineractPluginEmailPar
|
||||
import org.slf4j.Logger
|
||||
import org.slf4j.LoggerFactory
|
||||
|
||||
import javax.mail.*
|
||||
import javax.mail.internet.InternetAddress
|
||||
import javax.mail.internet.MimeMessage
|
||||
import jakarta.mail.*
|
||||
import jakarta.mail.internet.InternetAddress
|
||||
import jakarta.mail.internet.MimeMessage
|
||||
|
||||
class EmailService {
|
||||
private static final Logger log = LoggerFactory.getLogger(EmailService.class)
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
description = 'ACME Corp.: Fineract external events'
|
||||
|
||||
group = 'com.acme.fineract.event'
|
||||
|
||||
archivesBaseName = 'acme-fineract-event-externalevent'
|
||||
|
||||
apply from: 'dependencies.gradle'
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
dependencies {
|
||||
implementation(project(':fineract-core'))
|
||||
implementation(project(':fineract-loan'))
|
||||
implementation(project(':fineract-provider'))
|
||||
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package com.acme.fineract.event.externalevent;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.fineract.infrastructure.event.external.service.validation.ExternalEventSourceData;
|
||||
import org.apache.fineract.infrastructure.event.external.service.validation.ExternalEventSourceProvider;
|
||||
import org.apache.fineract.infrastructure.event.external.service.validation.SimpleExternalEventSourceProvider;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class AcmeExternalEventSourceProviderConfig {
|
||||
|
||||
@Bean
|
||||
public ExternalEventSourceProvider acmeEventSourceProvider() {
|
||||
return new SimpleExternalEventSourceProvider(List.of(new ExternalEventSourceData("com.acme.fineract.event.externalevent")));
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package com.acme.fineract.event.externalevent;
|
||||
|
||||
import org.apache.fineract.infrastructure.event.business.domain.loan.LoanBusinessEvent;
|
||||
import org.apache.fineract.portfolio.loanaccount.domain.Loan;
|
||||
|
||||
public class AcmeLoanExternalEvent extends LoanBusinessEvent {
|
||||
|
||||
private static final String TYPE = "AcmeLoanExternalEvent";
|
||||
|
||||
public AcmeLoanExternalEvent(Loan value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return TYPE;
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd">
|
||||
<changeSet author="acme" id="1">
|
||||
<insert tableName="m_external_event_configuration">
|
||||
<column name="type" value="AcmeLoanExternalEvent"/>
|
||||
<column name="enabled" valueBoolean="false"/>
|
||||
</insert>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
description = 'ACME Corp.: Fineract Event Starter'
|
||||
|
||||
group = 'com.acme.fineract.event'
|
||||
|
||||
archivesBaseName = 'acme-fineract-event-starter'
|
||||
|
||||
apply from: 'dependencies.gradle'
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
dependencies {
|
||||
implementation(project(':fineract-core'))
|
||||
implementation(project(':fineract-provider'))
|
||||
implementation('org.springframework.boot:spring-boot-starter')
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package com.acme.fineract.event.starter;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.ComponentScans;
|
||||
|
||||
@AutoConfiguration
|
||||
@ComponentScans({ @ComponentScan("com.acme.fineract.event.externalevent") })
|
||||
public class AcmeEventAutoConfiguration {}
|
||||
+1
@@ -0,0 +1 @@
|
||||
com.acme.fineract.event.starter.AcmeEventAutoConfiguration
|
||||
@@ -18,6 +18,8 @@
|
||||
*/
|
||||
|
||||
dependencies {
|
||||
implementation(project(':fineract-core'))
|
||||
implementation(project(':fineract-loan'))
|
||||
implementation(project(':fineract-provider'))
|
||||
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
*/
|
||||
|
||||
dependencies {
|
||||
implementation(project(':fineract-core'))
|
||||
implementation(project(':fineract-loan'))
|
||||
implementation(project(':fineract-provider'))
|
||||
implementation('org.springframework.batch:spring-batch-integration')
|
||||
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
|
||||
|
||||
+9
-6
@@ -20,31 +20,34 @@ package com.acme.fineract.loan.job;
|
||||
|
||||
import org.springframework.batch.core.Job;
|
||||
import org.springframework.batch.core.Step;
|
||||
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
|
||||
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
|
||||
import org.springframework.batch.core.job.builder.JobBuilder;
|
||||
import org.springframework.batch.core.launch.support.RunIdIncrementer;
|
||||
import org.springframework.batch.core.repository.JobRepository;
|
||||
import org.springframework.batch.core.step.builder.StepBuilder;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
|
||||
@Configuration
|
||||
public class AcmeNoopJobConfiguration {
|
||||
|
||||
@Autowired
|
||||
private JobBuilderFactory jobs;
|
||||
private JobRepository jobRepository;
|
||||
@Autowired
|
||||
private StepBuilderFactory steps;
|
||||
private PlatformTransactionManager transactionManager;
|
||||
@Autowired
|
||||
private AcmeNoopJobTasklet tasklet;
|
||||
|
||||
@Bean
|
||||
protected Step acmeNoopJobStep() {
|
||||
return steps.get(AcmeJobName.ACME_NOOP_JOB.name()).tasklet(tasklet).build();
|
||||
return new StepBuilder(AcmeJobName.ACME_NOOP_JOB.name(), jobRepository).tasklet(tasklet, transactionManager).build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Job acmeNoopJob() {
|
||||
return jobs.get(AcmeJobName.ACME_NOOP_JOB.name()).start(acmeNoopJobStep()).incrementer(new RunIdIncrementer()).build();
|
||||
return new JobBuilder(AcmeJobName.ACME_NOOP_JOB.name(), jobRepository).start(acmeNoopJobStep()).incrementer(new RunIdIncrementer())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.springframework.batch.repeat.RepeatStatus.FINISHED;
|
||||
|
||||
import com.acme.fineract.loan.job.AcmeNoopJobTasklet;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
@@ -47,7 +48,7 @@ public class AcmeNoopJobTaskletTest {
|
||||
@Test
|
||||
public void testJobExecution() throws Exception {
|
||||
resultStatus = underTest.execute(stepContribution, chunkContext);
|
||||
assertEquals(resultStatus, RepeatStatus.FINISHED);
|
||||
assertEquals(FINISHED, resultStatus);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,5 +18,7 @@
|
||||
*/
|
||||
|
||||
dependencies {
|
||||
implementation(project(':fineract-core'))
|
||||
implementation(project(':fineract-loan'))
|
||||
implementation(project(':fineract-provider'))
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
*/
|
||||
|
||||
dependencies {
|
||||
implementation(project(':fineract-core'))
|
||||
implementation(project(':fineract-loan'))
|
||||
implementation(project(':fineract-provider'))
|
||||
implementation(project(':custom:acme:loan:cob'))
|
||||
implementation(project(':custom:acme:loan:processor'))
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
com.acme.fineract.loan.starter.AcmeLoanAutoConfiguration
|
||||
+1
@@ -0,0 +1 @@
|
||||
com.acme.fineract.loan.starter.AcmeLoanAutoConfiguration
|
||||
+4
-3
@@ -21,10 +21,11 @@ package com.acme.fineract.loan.starter;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import io.cucumber.java8.En;
|
||||
import java.util.TreeMap;
|
||||
import java.util.Set;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.fineract.cob.COBBusinessStep;
|
||||
import org.apache.fineract.cob.COBBusinessStepService;
|
||||
import org.apache.fineract.cob.data.BusinessStepNameAndOrder;
|
||||
import org.apache.fineract.portfolio.loanaccount.domain.Loan;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
@@ -38,7 +39,7 @@ public class AcmeBusinessStepDefinitions implements En {
|
||||
|
||||
private COBBusinessStep<Loan> businessStep;
|
||||
|
||||
private TreeMap<Long, String> result;
|
||||
private Set<BusinessStepNameAndOrder> result;
|
||||
|
||||
public AcmeBusinessStepDefinitions() {
|
||||
Given("/^An auto configuration (.*) and a service configuration (.*)$/",
|
||||
@@ -56,7 +57,7 @@ public class AcmeBusinessStepDefinitions implements En {
|
||||
this.businessStep = ctx.getBean((Class<COBBusinessStep<Loan>>) Class.forName(stepClass));
|
||||
|
||||
// TODO: not yet working, because no storage configured/mocked
|
||||
this.result = businessStepService.getCOBBusinessStepMap(this.businessStep.getClass(), stepName);
|
||||
this.result = businessStepService.getCOBBusinessSteps(this.businessStep.getClass(), stepName);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
+13
-2
@@ -23,7 +23,11 @@ import static org.mockito.Mockito.mock;
|
||||
import org.apache.fineract.cob.COBBusinessStepService;
|
||||
import org.apache.fineract.cob.COBBusinessStepServiceImpl;
|
||||
import org.apache.fineract.cob.domain.BatchBusinessStepRepository;
|
||||
import org.apache.fineract.cob.service.ReloaderService;
|
||||
import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService;
|
||||
import org.apache.fineract.infrastructure.core.config.FineractProperties;
|
||||
import org.apache.fineract.infrastructure.core.diagnostics.performance.sampling.core.SamplingConfiguration;
|
||||
import org.apache.fineract.infrastructure.core.diagnostics.performance.sampling.core.SamplingServiceFactory;
|
||||
import org.apache.fineract.infrastructure.event.business.service.BusinessEventNotifierService;
|
||||
import org.apache.fineract.portfolio.loanaccount.domain.LoanAccountDomainService;
|
||||
import org.springframework.beans.factory.ListableBeanFactory;
|
||||
@@ -46,8 +50,15 @@ public class TestDefaultConfiguration {
|
||||
|
||||
@Bean
|
||||
public COBBusinessStepService cobBusinessStepService(BatchBusinessStepRepository batchBusinessStepRepository,
|
||||
ApplicationContext context, ListableBeanFactory beanFactory, BusinessEventNotifierService businessEventNotifierService) {
|
||||
return new COBBusinessStepServiceImpl(batchBusinessStepRepository, context, beanFactory, businessEventNotifierService);
|
||||
ApplicationContext context, ListableBeanFactory beanFactory, BusinessEventNotifierService businessEventNotifierService,
|
||||
ConfigurationDomainService configurationDomainService, ReloaderService reloaderService) {
|
||||
return new COBBusinessStepServiceImpl(batchBusinessStepRepository, context, beanFactory, businessEventNotifierService,
|
||||
configurationDomainService, reloaderService);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public SamplingServiceFactory samplingServiceFactory(SamplingConfiguration samplingConfiguration) {
|
||||
return new SamplingServiceFactory(samplingConfiguration);
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
dependencies {
|
||||
implementation(project(':fineract-core'))
|
||||
implementation(project(':fineract-provider'))
|
||||
compileOnly('org.springframework.boot:spring-boot-autoconfigure')
|
||||
}
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
dependencies {
|
||||
implementation(project(':custom:acme:note:service'))
|
||||
implementation('org.springframework.boot:spring-boot-starter')
|
||||
testImplementation(project(':fineract-core'))
|
||||
testImplementation(project(':fineract-loan'))
|
||||
testImplementation(project(':fineract-provider'))
|
||||
testImplementation('org.springframework.boot:spring-boot-starter-jdbc')
|
||||
testImplementation('org.springframework.boot:spring-boot-starter-data-jpa')
|
||||
|
||||
-1
@@ -1,2 +1 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
com.acme.fineract.portfolio.note.starter.AcmeNoteAutoConfiguration
|
||||
+2
-2
@@ -22,8 +22,8 @@ import static org.mockito.Mockito.mock;
|
||||
|
||||
import org.apache.fineract.infrastructure.core.config.FineractProperties;
|
||||
import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
|
||||
import org.apache.fineract.infrastructure.core.service.RoutingDataSource;
|
||||
import org.apache.fineract.infrastructure.core.service.RoutingDataSourceServiceFactory;
|
||||
import org.apache.fineract.infrastructure.core.service.database.RoutingDataSource;
|
||||
import org.apache.fineract.infrastructure.core.service.database.RoutingDataSourceServiceFactory;
|
||||
import org.apache.fineract.portfolio.client.domain.ClientRepositoryWrapper;
|
||||
import org.apache.fineract.portfolio.group.domain.GroupRepository;
|
||||
import org.apache.fineract.portfolio.loanaccount.domain.LoanRepositoryWrapper;
|
||||
|
||||
+2
-2
@@ -21,8 +21,8 @@ package com.acme.fineract.portfolio.note.starter;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
|
||||
import org.apache.fineract.infrastructure.core.service.RoutingDataSource;
|
||||
import org.apache.fineract.infrastructure.core.service.RoutingDataSourceServiceFactory;
|
||||
import org.apache.fineract.infrastructure.core.service.database.RoutingDataSource;
|
||||
import org.apache.fineract.infrastructure.core.service.database.RoutingDataSourceServiceFactory;
|
||||
import org.apache.fineract.portfolio.client.domain.ClientRepositoryWrapper;
|
||||
import org.apache.fineract.portfolio.group.domain.GroupRepository;
|
||||
import org.apache.fineract.portfolio.loanaccount.domain.LoanRepositoryWrapper;
|
||||
|
||||
@@ -68,6 +68,7 @@ jib {
|
||||
allowInsecureRegistries = true
|
||||
|
||||
dependencies {
|
||||
implementation project(':fineract-core')
|
||||
implementation project(':fineract-provider')
|
||||
// NOTE: dynamically load all custom modules
|
||||
file("${rootDir}/custom").eachDir { companyDir ->
|
||||
@@ -85,7 +86,7 @@ jib {
|
||||
}
|
||||
// NOTE: other custom dependencies
|
||||
implementation 'org.mariadb.jdbc:mariadb-java-client'
|
||||
implementation 'mysql:mysql-connector-java:8.0.31'
|
||||
implementation 'mysql:mysql-connector-java:8.0.33'
|
||||
implementation 'org.postgresql:postgresql'
|
||||
annotationProcessor('org.springframework.boot:spring-boot-autoconfigure-processor')
|
||||
annotationProcessor('org.springframework.boot:spring-boot-configuration-processor')
|
||||
|
||||
@@ -21,7 +21,7 @@ version: '3.7'
|
||||
services:
|
||||
# Backend service
|
||||
fineractmysql:
|
||||
image: mariadb:10.10
|
||||
image: mariadb:11.0
|
||||
volumes:
|
||||
- ../../fineract-db/server_collation.cnf:/etc/mysql/conf.d/server_collation.cnf
|
||||
- ../../fineract-db/docker:/docker-entrypoint-initdb.d:Z,ro
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
|
||||
# You can replace and test a more recent version of docker compose
|
||||
version: '3.7'
|
||||
services:
|
||||
activemq:
|
||||
image: rmohr/activemq:5.15.9-alpine
|
||||
ports:
|
||||
- 6161:6161
|
||||
- 61616:61616
|
||||
# Backend service
|
||||
fineractpostgresql:
|
||||
image: postgres:15.3
|
||||
volumes:
|
||||
- ./fineract-db/docker/postgresql:/docker-entrypoint-initdb.d/:Z,ro
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: root
|
||||
POSTGRES_PASSWORD: skdcnwauicn2ucnaecasdsajdnizucawencascdca
|
||||
FINERACT_DB_USER: postgres
|
||||
FINERACT_DB_PASS: skdcnwauicn2ucnaecasdsajdnizucawencascdca
|
||||
FINERACT_TENANTS_DB_NAME: fineract_tenants
|
||||
FINERACT_TENANT_DEFAULT_DB_NAME: fineract_default
|
||||
healthcheck:
|
||||
test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U", "root" ]
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
ports:
|
||||
- "5432:5432"
|
||||
fineract-manager:
|
||||
image: fineract:latest
|
||||
volumes:
|
||||
- ./fineract-provider/build/data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", 'sh', '-c', 'echo -e "Checking for the availability of Fineract server deployment"; while ! nc -z "fineract-server" 8443; do sleep 1; printf "-"; done; echo -e " >> Fineract server has started";' ]
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
ports:
|
||||
- 8443:8443
|
||||
depends_on:
|
||||
fineractpostgresql:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- FINERACT_NODE_ID=1
|
||||
- FINERACT_HIKARI_DRIVER_SOURCE_CLASS_NAME=org.postgresql.Driver
|
||||
- FINERACT_HIKARI_JDBC_URL=jdbc:postgresql://fineractpostgresql:5432/fineract_tenants
|
||||
- FINERACT_HIKARI_USERNAME=postgres
|
||||
- FINERACT_HIKARI_PASSWORD=skdcnwauicn2ucnaecasdsajdnizucawencascdca
|
||||
- FINERACT_HIKARI_MINIMUM_IDLE=3
|
||||
- FINERACT_HIKARI_MAXIMUM_POOL_SIZE=10
|
||||
- FINERACT_HIKARI_IDLE_TIMEOUT=60000
|
||||
- FINERACT_HIKARI_CONNECTION_TIMEOUT=20000
|
||||
- FINERACT_HIKARI_TEST_QUERY=SELECT 1
|
||||
- FINERACT_HIKARI_AUTO_COMMIT=true
|
||||
- FINERACT_SERVER_SSL_ENABLED=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_PREP_STMTS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_PREP_STMT_CACHE_SIZE=250
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_PREP_STMT_CACHE_SQL_LIMIT=2048
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_USE_SERVER_PREP_STMTS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_USE_LOCAL_SESSION_STATE=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_REWRITE_BATCHED_STATEMENTS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_RESULT_SET_METADATA=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_SERVER_CONFIGURATION=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_ELIDE_SET_AUTO_COMMITS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_MAINTAIN_TIME_STATS=false
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_LOG_SLOW_QUERIES=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_DUMP_QUERIES_IN_EXCEPTION=true
|
||||
- FINERACT_DEFAULT_TENANTDB_HOSTNAME=fineractpostgresql
|
||||
- FINERACT_DEFAULT_TENANTDB_PORT=5432
|
||||
- FINERACT_DEFAULT_TENANTDB_UID=postgres
|
||||
- FINERACT_DEFAULT_TENANTDB_PWD=skdcnwauicn2ucnaecasdsajdnizucawencascdca
|
||||
- FINERACT_DEFAULT_TENANTDB_CONN_PARAMS=
|
||||
- FINERACT_DEFAULT_TENANTDB_TIMEZONE=Asia/Kolkata
|
||||
- FINERACT_DEFAULT_TENANTDB_IDENTIFIER=default
|
||||
- FINERACT_DEFAULT_TENANTDB_NAME=fineract_default
|
||||
- FINERACT_DEFAULT_TENANTDB_DESCRIPTION=Default Demo Tenant
|
||||
- JAVA_TOOL_OPTIONS="-Xmx1G"
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_JMS_ENABLED=true
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_SPRING_EVENTS_ENABLED=false
|
||||
- FINERACT_MODE_BATCH_MANAGER_ENABLED=true
|
||||
- FINERACT_MODE_BATCH_WORKER_ENABLED=false
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_JMS_BROKER_URL=tcp://activemq:61616
|
||||
- LOAN_COB_CHUNK_SIZE=10
|
||||
- LOAN_COB_PARTITION_SIZE=10
|
||||
- SPRING_PROFILES_ACTIVE=test,diagnostics
|
||||
fineract-worker:
|
||||
image: fineract:latest
|
||||
volumes:
|
||||
- ./fineract-provider/build/data:/data
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 2
|
||||
healthcheck:
|
||||
test: ["CMD", 'sh', '-c', 'echo -e "Checking for the availability of Fineract server deployment"; while ! nc -z "fineract-server" 8443; do sleep 1; printf "-"; done; echo -e " >> Fineract server has started";' ]
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
ports:
|
||||
- "8444-8445:8443"
|
||||
depends_on:
|
||||
fineractpostgresql:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- FINERACT_NODE_ID=2
|
||||
- FINERACT_HIKARI_DRIVER_SOURCE_CLASS_NAME=org.postgresql.Driver
|
||||
- FINERACT_HIKARI_JDBC_URL=jdbc:postgresql://fineractpostgresql:5432/fineract_tenants
|
||||
- FINERACT_HIKARI_USERNAME=postgres
|
||||
- FINERACT_HIKARI_PASSWORD=skdcnwauicn2ucnaecasdsajdnizucawencascdca
|
||||
- FINERACT_HIKARI_MINIMUM_IDLE=3
|
||||
- FINERACT_HIKARI_MAXIMUM_POOL_SIZE=10
|
||||
- FINERACT_HIKARI_IDLE_TIMEOUT=60000
|
||||
- FINERACT_HIKARI_CONNECTION_TIMEOUT=20000
|
||||
- FINERACT_HIKARI_TEST_QUERY=SELECT 1
|
||||
- FINERACT_HIKARI_AUTO_COMMIT=true
|
||||
- FINERACT_SERVER_SSL_ENABLED=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_PREP_STMTS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_PREP_STMT_CACHE_SIZE=250
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_PREP_STMT_CACHE_SQL_LIMIT=2048
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_USE_SERVER_PREP_STMTS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_USE_LOCAL_SESSION_STATE=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_REWRITE_BATCHED_STATEMENTS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_RESULT_SET_METADATA=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_SERVER_CONFIGURATION=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_ELIDE_SET_AUTO_COMMITS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_MAINTAIN_TIME_STATS=false
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_LOG_SLOW_QUERIES=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_DUMP_QUERIES_IN_EXCEPTION=true
|
||||
- FINERACT_DEFAULT_TENANTDB_HOSTNAME=fineractpostgresql
|
||||
- FINERACT_DEFAULT_TENANTDB_PORT=5432
|
||||
- FINERACT_DEFAULT_TENANTDB_UID=postgres
|
||||
- FINERACT_DEFAULT_TENANTDB_PWD=skdcnwauicn2ucnaecasdsajdnizucawencascdca
|
||||
- FINERACT_DEFAULT_TENANTDB_CONN_PARAMS=
|
||||
- FINERACT_DEFAULT_TENANTDB_TIMEZONE=Asia/Kolkata
|
||||
- FINERACT_DEFAULT_TENANTDB_IDENTIFIER=default
|
||||
- FINERACT_DEFAULT_TENANTDB_NAME=fineract_default
|
||||
- FINERACT_DEFAULT_TENANTDB_DESCRIPTION=Default Demo Tenant
|
||||
- JAVA_TOOL_OPTIONS="-Xmx1G"
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_JMS_ENABLED=true
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_SPRING_EVENTS_ENABLED=false
|
||||
- FINERACT_MODE_BATCH_MANAGER_ENABLED=false
|
||||
- FINERACT_MODE_BATCH_WORKER_ENABLED=true
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_JMS_BROKER_URL=tcp://activemq:61616
|
||||
@@ -0,0 +1,182 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
|
||||
# You can replace and test a more recent version of docker compose
|
||||
version: '3.7'
|
||||
services:
|
||||
# Backend service
|
||||
fineractpostgresql:
|
||||
image: postgres:15.3
|
||||
volumes:
|
||||
- ./fineract-db/docker/postgresql:/docker-entrypoint-initdb.d/:Z,ro
|
||||
environment:
|
||||
POSTGRES_USER: root
|
||||
POSTGRES_PASSWORD: skdcnwauicn2ucnaecasdsajdnizucawencascdca
|
||||
FINERACT_DB_USER: postgres
|
||||
FINERACT_DB_PASS: skdcnwauicn2ucnaecasdsajdnizucawencascdca
|
||||
FINERACT_TENANTS_DB_NAME: fineract_tenants
|
||||
FINERACT_TENANT_DEFAULT_DB_NAME: fineract_default
|
||||
healthcheck:
|
||||
test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U", "root" ]
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
ports:
|
||||
- "5432:5432"
|
||||
fineract-manager:
|
||||
image: fineract:latest
|
||||
volumes:
|
||||
- ./fineract-provider/build/data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", 'sh', '-c', 'echo -e "Checking for the availability of Fineract server deployment"; while ! nc -z "fineract-server" 8443; do sleep 1; printf "-"; done; echo -e " >> Fineract server has started";' ]
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
ports:
|
||||
- 8443:8443
|
||||
depends_on:
|
||||
fineractpostgresql:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- AWS_ACCESS_KEY_ID=
|
||||
- AWS_SECRET_ACCESS_KEY=
|
||||
- FINERACT_NODE_ID=1
|
||||
- FINERACT_HIKARI_DRIVER_SOURCE_CLASS_NAME=org.postgresql.Driver
|
||||
- FINERACT_HIKARI_JDBC_URL=jdbc:postgresql://fineractpostgresql:5432/fineract_tenants
|
||||
- FINERACT_HIKARI_USERNAME=postgres
|
||||
- FINERACT_HIKARI_PASSWORD=skdcnwauicn2ucnaecasdsajdnizucawencascdca
|
||||
- FINERACT_HIKARI_MINIMUM_IDLE=3
|
||||
- FINERACT_HIKARI_MAXIMUM_POOL_SIZE=10
|
||||
- FINERACT_HIKARI_IDLE_TIMEOUT=60000
|
||||
- FINERACT_HIKARI_CONNECTION_TIMEOUT=20000
|
||||
- FINERACT_HIKARI_TEST_QUERY=SELECT 1
|
||||
- FINERACT_HIKARI_AUTO_COMMIT=true
|
||||
- FINERACT_SERVER_SSL_ENABLED=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_PREP_STMTS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_PREP_STMT_CACHE_SIZE=250
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_PREP_STMT_CACHE_SQL_LIMIT=2048
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_USE_SERVER_PREP_STMTS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_USE_LOCAL_SESSION_STATE=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_REWRITE_BATCHED_STATEMENTS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_RESULT_SET_METADATA=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_SERVER_CONFIGURATION=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_ELIDE_SET_AUTO_COMMITS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_MAINTAIN_TIME_STATS=false
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_LOG_SLOW_QUERIES=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_DUMP_QUERIES_IN_EXCEPTION=true
|
||||
- FINERACT_DEFAULT_TENANTDB_HOSTNAME=fineractpostgresql
|
||||
- FINERACT_DEFAULT_TENANTDB_PORT=5432
|
||||
- FINERACT_DEFAULT_TENANTDB_UID=postgres
|
||||
- FINERACT_DEFAULT_TENANTDB_PWD=skdcnwauicn2ucnaecasdsajdnizucawencascdca
|
||||
- FINERACT_DEFAULT_TENANTDB_CONN_PARAMS=
|
||||
- FINERACT_DEFAULT_TENANTDB_TIMEZONE=Asia/Kolkata
|
||||
- FINERACT_DEFAULT_TENANTDB_IDENTIFIER=default
|
||||
- FINERACT_DEFAULT_TENANTDB_NAME=fineract_default
|
||||
- FINERACT_DEFAULT_TENANTDB_DESCRIPTION=Default Demo Tenant
|
||||
- JAVA_TOOL_OPTIONS="-Xmx1G"
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_JMS_ENABLED=false
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_SPRING_EVENTS_ENABLED=false
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_ENABLED=true
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_BOOTSTRAP_SERVERS=b-3-public.democluster1.am2oyx.c4.kafka.eu-central-1.amazonaws.com:9198,b-2-public.democluster1.am2oyx.c4.kafka.eu-central-1.amazonaws.com:9198,b-1-public.democluster1.am2oyx.c4.kafka.eu-central-1.amazonaws.com:9198
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_ADMIN_EXTRA_PROPERTIES=security.protocol=SASL_SSL|sasl.mechanism=AWS_MSK_IAM|sasl.jaas.config=software.amazon.msk.auth.iam.IAMLoginModule required;|sasl.client.callback.handler.class=software.amazon.msk.auth.iam.IAMClientCallbackHandler
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_PRODUCER_EXTRA_PROPERTIES=security.protocol=SASL_SSL|sasl.mechanism=AWS_MSK_IAM|sasl.jaas.config=software.amazon.msk.auth.iam.IAMLoginModule required;|sasl.client.callback.handler.class=software.amazon.msk.auth.iam.IAMClientCallbackHandler
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_CONSUMER_EXTRA_PROPERTIES=security.protocol=SASL_SSL|sasl.mechanism=AWS_MSK_IAM|sasl.jaas.config=software.amazon.msk.auth.iam.IAMLoginModule required;|sasl.client.callback.handler.class=software.amazon.msk.auth.iam.IAMClientCallbackHandler
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_TOPIC_NAME=job-topic
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_TOPIC_REPLICAS=2
|
||||
- FINERACT_MODE_BATCH_MANAGER_ENABLED=true
|
||||
- FINERACT_MODE_BATCH_WORKER_ENABLED=false
|
||||
- LOAN_COB_CHUNK_SIZE=10
|
||||
- LOAN_COB_PARTITION_SIZE=10
|
||||
- FINERACT_EXTERNAL_EVENTS_ENABLED=true
|
||||
- FINERACT_EXTERNAL_EVENTS_KAFKA_ENABLED=true
|
||||
- FINERACT_EXTERNAL_EVENTS_KAFKA_BOOTSTRAP_SERVERS=b-3-public.democluster1.am2oyx.c4.kafka.eu-central-1.amazonaws.com:9198,b-2-public.democluster1.am2oyx.c4.kafka.eu-central-1.amazonaws.com:9198,b-1-public.democluster1.am2oyx.c4.kafka.eu-central-1.amazonaws.com:9198
|
||||
- FINERACT_EXTERNAL_EVENTS_KAFKA_ADMIN_EXTRA_PROPERTIES=security.protocol=SASL_SSL|sasl.mechanism=AWS_MSK_IAM|sasl.jaas.config=software.amazon.msk.auth.iam.IAMLoginModule required;|sasl.client.callback.handler.class=software.amazon.msk.auth.iam.IAMClientCallbackHandler
|
||||
- FINERACT_EXTERNAL_EVENTS_KAFKA_PRODUCER_EXTRA_PROPERTIES:linger.ms=10|batch.size=16384|security.protocol=SASL_SSL|sasl.mechanism=AWS_MSK_IAM|sasl.jaas.config=software.amazon.msk.auth.iam.IAMLoginModule required;|sasl.client.callback.handler.class=software.amazon.msk.auth.iam.IAMClientCallbackHandler
|
||||
- FINERACT_EXTERNAL_EVENTS_KAFKA_TOPIC_NAME=external-events
|
||||
- FINERACT_EXTERNAL_EVENTS_KAFKA_TOPIC_REPLICAS=2
|
||||
- SPRING_PROFILES_ACTIVE=test,diagnostics
|
||||
fineract-worker:
|
||||
image: fineract:latest
|
||||
volumes:
|
||||
- ./fineract-provider/build/data:/data
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 2
|
||||
healthcheck:
|
||||
test: ["CMD", 'sh', '-c', 'echo -e "Checking for the availability of Fineract server deployment"; while ! nc -z "fineract-server" 8443; do sleep 1; printf "-"; done; echo -e " >> Fineract server has started";' ]
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
ports:
|
||||
- "8444-8445:8443"
|
||||
depends_on:
|
||||
fineractpostgresql:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- AWS_ACCESS_KEY_ID=
|
||||
- AWS_SECRET_ACCESS_KEY=
|
||||
- FINERACT_NODE_ID=1
|
||||
- FINERACT_HIKARI_DRIVER_SOURCE_CLASS_NAME=org.postgresql.Driver
|
||||
- FINERACT_HIKARI_JDBC_URL=jdbc:postgresql://fineractpostgresql:5432/fineract_tenants
|
||||
- FINERACT_HIKARI_USERNAME=postgres
|
||||
- FINERACT_HIKARI_PASSWORD=skdcnwauicn2ucnaecasdsajdnizucawencascdca
|
||||
- FINERACT_HIKARI_MINIMUM_IDLE=3
|
||||
- FINERACT_HIKARI_MAXIMUM_POOL_SIZE=10
|
||||
- FINERACT_HIKARI_IDLE_TIMEOUT=60000
|
||||
- FINERACT_HIKARI_CONNECTION_TIMEOUT=20000
|
||||
- FINERACT_HIKARI_TEST_QUERY=SELECT 1
|
||||
- FINERACT_HIKARI_AUTO_COMMIT=true
|
||||
- FINERACT_SERVER_SSL_ENABLED=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_PREP_STMTS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_PREP_STMT_CACHE_SIZE=250
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_PREP_STMT_CACHE_SQL_LIMIT=2048
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_USE_SERVER_PREP_STMTS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_USE_LOCAL_SESSION_STATE=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_REWRITE_BATCHED_STATEMENTS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_RESULT_SET_METADATA=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_SERVER_CONFIGURATION=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_ELIDE_SET_AUTO_COMMITS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_MAINTAIN_TIME_STATS=false
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_LOG_SLOW_QUERIES=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_DUMP_QUERIES_IN_EXCEPTION=true
|
||||
- FINERACT_DEFAULT_TENANTDB_HOSTNAME=fineractpostgresql
|
||||
- FINERACT_DEFAULT_TENANTDB_PORT=5432
|
||||
- FINERACT_DEFAULT_TENANTDB_UID=postgres
|
||||
- FINERACT_DEFAULT_TENANTDB_PWD=skdcnwauicn2ucnaecasdsajdnizucawencascdca
|
||||
- FINERACT_DEFAULT_TENANTDB_CONN_PARAMS=
|
||||
- FINERACT_DEFAULT_TENANTDB_TIMEZONE=Asia/Kolkata
|
||||
- FINERACT_DEFAULT_TENANTDB_IDENTIFIER=default
|
||||
- FINERACT_DEFAULT_TENANTDB_NAME=fineract_default
|
||||
- FINERACT_DEFAULT_TENANTDB_DESCRIPTION=Default Demo Tenant
|
||||
- JAVA_TOOL_OPTIONS="-Xmx1G"
|
||||
- FINERACT_MODE_BATCH_MANAGER_ENABLED=false
|
||||
- FINERACT_MODE_BATCH_WORKER_ENABLED=true
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_JMS_ENABLED=false
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_SPRING_EVENTS_ENABLED=false
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_ENABLED=true
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_BOOTSTRAP_SERVERS=b-3-public.democluster1.am2oyx.c4.kafka.eu-central-1.amazonaws.com:9198,b-2-public.democluster1.am2oyx.c4.kafka.eu-central-1.amazonaws.com:9198,b-1-public.democluster1.am2oyx.c4.kafka.eu-central-1.amazonaws.com:9198
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_ADMIN_EXTRA_PROPERTIES=security.protocol=SASL_SSL|sasl.mechanism=AWS_MSK_IAM|sasl.jaas.config=software.amazon.msk.auth.iam.IAMLoginModule required;|sasl.client.callback.handler.class=software.amazon.msk.auth.iam.IAMClientCallbackHandler
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_PRODUCER_EXTRA_PROPERTIES=security.protocol=SASL_SSL|sasl.mechanism=AWS_MSK_IAM|sasl.jaas.config=software.amazon.msk.auth.iam.IAMLoginModule required;|sasl.client.callback.handler.class=software.amazon.msk.auth.iam.IAMClientCallbackHandler
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_CONSUMER_EXTRA_PROPERTIES=security.protocol=SASL_SSL|sasl.mechanism=AWS_MSK_IAM|sasl.jaas.config=software.amazon.msk.auth.iam.IAMLoginModule required;|sasl.client.callback.handler.class=software.amazon.msk.auth.iam.IAMClientCallbackHandler
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_TOPIC_NAME=job-topic
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_TOPIC_REPLICAS=2
|
||||
- FINERACT_EXTERNAL_EVENTS_ENABLED=true
|
||||
- FINERACT_EXTERNAL_EVENTS_KAFKA_ENABLED=true
|
||||
- FINERACT_EXTERNAL_EVENTS_KAFKA_BOOTSTRAP_SERVERS=b-3-public.democluster1.am2oyx.c4.kafka.eu-central-1.amazonaws.com:9198,b-2-public.democluster1.am2oyx.c4.kafka.eu-central-1.amazonaws.com:9198,b-1-public.democluster1.am2oyx.c4.kafka.eu-central-1.amazonaws.com:9198
|
||||
- FINERACT_EXTERNAL_EVENTS_KAFKA_ADMIN_EXTRA_PROPERTIES=security.protocol=SASL_SSL|sasl.mechanism=AWS_MSK_IAM|sasl.jaas.config=software.amazon.msk.auth.iam.IAMLoginModule required;|sasl.client.callback.handler.class=software.amazon.msk.auth.iam.IAMClientCallbackHandler
|
||||
- FINERACT_EXTERNAL_EVENTS_KAFKA_PRODUCER_EXTRA_PROPERTIES:linger.ms=10|batch.size=16384|security.protocol=SASL_SSL|sasl.mechanism=AWS_MSK_IAM|sasl.jaas.config=software.amazon.msk.auth.iam.IAMLoginModule required;|sasl.client.callback.handler.class=software.amazon.msk.auth.iam.IAMClientCallbackHandler
|
||||
- FINERACT_EXTERNAL_EVENTS_KAFKA_TOPIC_NAME=external-events
|
||||
- FINERACT_EXTERNAL_EVENTS_KAFKA_TOPIC_REPLICAS=2
|
||||
- SPRING_PROFILES_ACTIVE=test,diagnostics
|
||||
@@ -0,0 +1,177 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
|
||||
# You can replace and test a more recent version of docker compose
|
||||
version: '3.7'
|
||||
services:
|
||||
kafka:
|
||||
image: 'bitnami/kafka:3.5.1-debian-11-r7'
|
||||
ports:
|
||||
- '9092:9092'
|
||||
environment:
|
||||
- KAFKA_CFG_NODE_ID=0
|
||||
- KAFKA_CFG_PROCESS_ROLES=controller,broker
|
||||
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
|
||||
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
|
||||
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@kafka:9093
|
||||
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
|
||||
- ALLOW_PLAINTEXT_LISTENER=yes
|
||||
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092
|
||||
# Backend service
|
||||
fineractpostgresql:
|
||||
image: postgres:15.3
|
||||
volumes:
|
||||
- ./fineract-db/docker/postgresql:/docker-entrypoint-initdb.d/:Z,ro
|
||||
environment:
|
||||
POSTGRES_USER: root
|
||||
POSTGRES_PASSWORD: skdcnwauicn2ucnaecasdsajdnizucawencascdca
|
||||
FINERACT_DB_USER: postgres
|
||||
FINERACT_DB_PASS: skdcnwauicn2ucnaecasdsajdnizucawencascdca
|
||||
FINERACT_TENANTS_DB_NAME: fineract_tenants
|
||||
FINERACT_TENANT_DEFAULT_DB_NAME: fineract_default
|
||||
healthcheck:
|
||||
test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U", "root" ]
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
ports:
|
||||
- "5432:5432"
|
||||
fineract-manager:
|
||||
image: fineract:latest
|
||||
volumes:
|
||||
- ./fineract-provider/build/data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", 'sh', '-c', 'echo -e "Checking for the availability of Fineract server deployment"; while ! nc -z "fineract-server" 8443; do sleep 1; printf "-"; done; echo -e " >> Fineract server has started";' ]
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
ports:
|
||||
- 8443:8443
|
||||
depends_on:
|
||||
fineractpostgresql:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- FINERACT_NODE_ID=1
|
||||
- FINERACT_HIKARI_DRIVER_SOURCE_CLASS_NAME=org.postgresql.Driver
|
||||
- FINERACT_HIKARI_JDBC_URL=jdbc:postgresql://fineractpostgresql:5432/fineract_tenants
|
||||
- FINERACT_HIKARI_USERNAME=postgres
|
||||
- FINERACT_HIKARI_PASSWORD=skdcnwauicn2ucnaecasdsajdnizucawencascdca
|
||||
- FINERACT_HIKARI_MINIMUM_IDLE=3
|
||||
- FINERACT_HIKARI_MAXIMUM_POOL_SIZE=10
|
||||
- FINERACT_HIKARI_IDLE_TIMEOUT=60000
|
||||
- FINERACT_HIKARI_CONNECTION_TIMEOUT=20000
|
||||
- FINERACT_HIKARI_TEST_QUERY=SELECT 1
|
||||
- FINERACT_HIKARI_AUTO_COMMIT=true
|
||||
- FINERACT_SERVER_SSL_ENABLED=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_PREP_STMTS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_PREP_STMT_CACHE_SIZE=250
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_PREP_STMT_CACHE_SQL_LIMIT=2048
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_USE_SERVER_PREP_STMTS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_USE_LOCAL_SESSION_STATE=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_REWRITE_BATCHED_STATEMENTS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_RESULT_SET_METADATA=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_SERVER_CONFIGURATION=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_ELIDE_SET_AUTO_COMMITS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_MAINTAIN_TIME_STATS=false
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_LOG_SLOW_QUERIES=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_DUMP_QUERIES_IN_EXCEPTION=true
|
||||
- FINERACT_DEFAULT_TENANTDB_HOSTNAME=fineractpostgresql
|
||||
- FINERACT_DEFAULT_TENANTDB_PORT=5432
|
||||
- FINERACT_DEFAULT_TENANTDB_UID=postgres
|
||||
- FINERACT_DEFAULT_TENANTDB_PWD=skdcnwauicn2ucnaecasdsajdnizucawencascdca
|
||||
- FINERACT_DEFAULT_TENANTDB_CONN_PARAMS=
|
||||
- FINERACT_DEFAULT_TENANTDB_TIMEZONE=Asia/Kolkata
|
||||
- FINERACT_DEFAULT_TENANTDB_IDENTIFIER=default
|
||||
- FINERACT_DEFAULT_TENANTDB_NAME=fineract_default
|
||||
- FINERACT_DEFAULT_TENANTDB_DESCRIPTION=Default Demo Tenant
|
||||
- JAVA_TOOL_OPTIONS="-Xmx1G"
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_JMS_ENABLED=false
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_SPRING_EVENTS_ENABLED=false
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_ENABLED=true
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_BOOTSTRAP_SERVERS=kafka:9092
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_TOPIC_NAME=job-topic
|
||||
- FINERACT_MODE_BATCH_MANAGER_ENABLED=true
|
||||
- FINERACT_MODE_BATCH_WORKER_ENABLED=false
|
||||
- LOAN_COB_CHUNK_SIZE=10
|
||||
- LOAN_COB_PARTITION_SIZE=10
|
||||
- FINERACT_EXTERNAL_EVENTS_ENABLED=true
|
||||
- FINERACT_EXTERNAL_EVENTS_KAFKA_ENABLED=true
|
||||
- FINERACT_EXTERNAL_EVENTS_KAFKA_BOOTSTRAP_SERVERS=kafka:9092
|
||||
- FINERACT_EXTERNAL_EVENTS_KAFKA_TOPIC_NAME=external-events
|
||||
- SPRING_PROFILES_ACTIVE=test,diagnostics
|
||||
fineract-worker:
|
||||
image: fineract:latest
|
||||
volumes:
|
||||
- ./fineract-provider/build/data:/data
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 2
|
||||
healthcheck:
|
||||
test: ["CMD", 'sh', '-c', 'echo -e "Checking for the availability of Fineract server deployment"; while ! nc -z "fineract-server" 8443; do sleep 1; printf "-"; done; echo -e " >> Fineract server has started";' ]
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
ports:
|
||||
- "8444-8445:8443"
|
||||
depends_on:
|
||||
fineractpostgresql:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- FINERACT_NODE_ID=1
|
||||
- FINERACT_HIKARI_DRIVER_SOURCE_CLASS_NAME=org.postgresql.Driver
|
||||
- FINERACT_HIKARI_JDBC_URL=jdbc:postgresql://fineractpostgresql:5432/fineract_tenants
|
||||
- FINERACT_HIKARI_USERNAME=postgres
|
||||
- FINERACT_HIKARI_PASSWORD=skdcnwauicn2ucnaecasdsajdnizucawencascdca
|
||||
- FINERACT_HIKARI_MINIMUM_IDLE=3
|
||||
- FINERACT_HIKARI_MAXIMUM_POOL_SIZE=10
|
||||
- FINERACT_HIKARI_IDLE_TIMEOUT=60000
|
||||
- FINERACT_HIKARI_CONNECTION_TIMEOUT=20000
|
||||
- FINERACT_HIKARI_TEST_QUERY=SELECT 1
|
||||
- FINERACT_HIKARI_AUTO_COMMIT=true
|
||||
- FINERACT_SERVER_SSL_ENABLED=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_PREP_STMTS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_PREP_STMT_CACHE_SIZE=250
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_PREP_STMT_CACHE_SQL_LIMIT=2048
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_USE_SERVER_PREP_STMTS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_USE_LOCAL_SESSION_STATE=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_REWRITE_BATCHED_STATEMENTS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_RESULT_SET_METADATA=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_SERVER_CONFIGURATION=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_ELIDE_SET_AUTO_COMMITS=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_MAINTAIN_TIME_STATS=false
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_LOG_SLOW_QUERIES=true
|
||||
- FINERACT_HIKARI_DS_PROPERTIES_DUMP_QUERIES_IN_EXCEPTION=true
|
||||
- FINERACT_DEFAULT_TENANTDB_HOSTNAME=fineractpostgresql
|
||||
- FINERACT_DEFAULT_TENANTDB_PORT=5432
|
||||
- FINERACT_DEFAULT_TENANTDB_UID=postgres
|
||||
- FINERACT_DEFAULT_TENANTDB_PWD=skdcnwauicn2ucnaecasdsajdnizucawencascdca
|
||||
- FINERACT_DEFAULT_TENANTDB_CONN_PARAMS=
|
||||
- FINERACT_DEFAULT_TENANTDB_TIMEZONE=Asia/Kolkata
|
||||
- FINERACT_DEFAULT_TENANTDB_IDENTIFIER=default
|
||||
- FINERACT_DEFAULT_TENANTDB_NAME=fineract_default
|
||||
- FINERACT_DEFAULT_TENANTDB_DESCRIPTION=Default Demo Tenant
|
||||
- JAVA_TOOL_OPTIONS="-Xmx1G"
|
||||
- FINERACT_MODE_BATCH_MANAGER_ENABLED=false
|
||||
- FINERACT_MODE_BATCH_WORKER_ENABLED=true
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_JMS_ENABLED=false
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_SPRING_EVENTS_ENABLED=false
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_ENABLED=true
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_BOOTSTRAP_SERVERS=kafka:9092
|
||||
- FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_TOPIC_NAME=job-topic
|
||||
- FINERACT_EXTERNAL_EVENTS_ENABLED=true
|
||||
- FINERACT_EXTERNAL_EVENTS_KAFKA_ENABLED=true
|
||||
- FINERACT_EXTERNAL_EVENTS_KAFKA_BOOTSTRAP_SERVERS=kafka:9092
|
||||
- FINERACT_EXTERNAL_EVENTS_KAFKA_TOPIC_NAME=external-events
|
||||
- SPRING_PROFILES_ACTIVE=test,diagnostics
|
||||
@@ -21,7 +21,7 @@ version: '3.7'
|
||||
services:
|
||||
# Backend service
|
||||
fineractpostgresql:
|
||||
image: postgres:14.6
|
||||
image: postgres:15.3
|
||||
volumes:
|
||||
- ./fineract-db/docker/postgresql:/docker-entrypoint-initdb.d/:Z,ro
|
||||
restart: always
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ version: '3.7'
|
||||
services:
|
||||
# Backend service
|
||||
fineractmysql:
|
||||
image: mariadb:10.10
|
||||
image: mariadb:11.0
|
||||
volumes:
|
||||
- ./fineract-db/server_collation.cnf:/etc/mysql/conf.d/server_collation.cnf
|
||||
- ./fineract-db/docker:/docker-entrypoint-initdb.d:Z,ro
|
||||
@@ -29,7 +29,7 @@ services:
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: skdcnwauicn2ucnaecasdsajdnizucawencascdca
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "--password=skdcnwauicn2ucnaecasdsajdnizucawencascdca" ]
|
||||
test: ["CMD", "healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized"]
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
ports:
|
||||
|
||||
@@ -66,6 +66,22 @@
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "lastRepaymentDate",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "lastRepaymentAmount",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"name": "id",
|
||||
"type": [
|
||||
"null",
|
||||
"int"
|
||||
"long"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -27,6 +27,30 @@
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "externalOwnerId",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "settlementDate",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "purchasePriceRatio",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "status",
|
||||
@@ -724,6 +748,30 @@
|
||||
"null",
|
||||
"org.apache.fineract.avro.loan.v1.DelinquencyRangeDataV1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "overpaidOnDate",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "lastClosedBusinessDate",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "chargedOff",
|
||||
"type": [
|
||||
"null",
|
||||
"boolean"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+31
-15
@@ -4,24 +4,16 @@
|
||||
"type": "record",
|
||||
"fields": [
|
||||
{
|
||||
"default": null,
|
||||
"name": "id",
|
||||
"type": [
|
||||
"null",
|
||||
"long"
|
||||
]
|
||||
"name": "loanId",
|
||||
"type": "long"
|
||||
},
|
||||
{
|
||||
"name": "loanAccountNo",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "accountNo",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "externalId",
|
||||
"name": "loanExternalId",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
@@ -34,6 +26,30 @@
|
||||
"null",
|
||||
"org.apache.fineract.avro.loan.v1.DelinquencyRangeDataV1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "charges",
|
||||
"type": {
|
||||
"type": "array",
|
||||
"items": "org.apache.fineract.avro.loan.v1.LoanChargeDataRangeViewV1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "currency",
|
||||
"type": "org.apache.fineract.avro.generic.v1.CurrencyDataV1"
|
||||
},
|
||||
{
|
||||
"name": "amount",
|
||||
"doc": "Contains installments total, fee, interest, principal and penalty amount summaries",
|
||||
"type": "org.apache.fineract.avro.loan.v1.LoanAmountDataV1"
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "delinquentDate",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "LoanAccountStayedLockedDataV1",
|
||||
"namespace": "org.apache.fineract.avro.loan.v1",
|
||||
"type": "record",
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"type": "long"
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "externalId",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "accountNo",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "LoanAccountsStayedLockedDataV1",
|
||||
"namespace": "org.apache.fineract.avro.loan.v1",
|
||||
"type": "record",
|
||||
"fields": [{
|
||||
"name": "loanAccounts",
|
||||
"type": {
|
||||
"type": "array",
|
||||
"items": "org.apache.fineract.avro.loan.v1.LoanAccountStayedLockedDataV1"
|
||||
}
|
||||
}]
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "LoanAmountDataV1",
|
||||
"namespace": "org.apache.fineract.avro.loan.v1",
|
||||
"type": "record",
|
||||
"fields": [
|
||||
{
|
||||
"default": null,
|
||||
"name": "totalAmount",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "principalAmount",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "interestAmount",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "feeAmount",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "penaltyAmount",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -242,6 +242,38 @@
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "chargedOffOnDate",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "chargedOffByUsername",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "chargedOffByFirstname",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "chargedOffByLastname",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "LoanChargeDataRangeViewV1",
|
||||
"namespace": "org.apache.fineract.avro.loan.v1",
|
||||
"type": "record",
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"type": "long"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "currency",
|
||||
"type": "org.apache.fineract.avro.generic.v1.CurrencyDataV1"
|
||||
},
|
||||
{
|
||||
"name": "amount",
|
||||
"type": "bigdecimal"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -232,6 +232,30 @@
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "externalLoanId",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "externalOwnerId",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "submittedOnDate",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
{
|
||||
"name": "LoanOwnershipTransferDataV1",
|
||||
"namespace": "org.apache.fineract.avro.loan.v1",
|
||||
"type": "record",
|
||||
"fields": [
|
||||
{
|
||||
"name": "loanId",
|
||||
"type": "long"
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "loanExternalId",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "type",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "transferExternalId",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "submittedDate",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "assetOwnerExternalId",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "currency",
|
||||
"type": [
|
||||
"null",
|
||||
"org.apache.fineract.avro.generic.v1.CurrencyDataV1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "totalOutstandingBalanceAmount",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "outstandingPrincipalPortion",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "outstandingFeePortion",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "outstandingPenaltyPortion",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "outstandingInterestPortion",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "overPaymentPortion",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "unrecognizedIncomePortion",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "unpaidChargeData",
|
||||
"type": [
|
||||
"null",
|
||||
{
|
||||
"type": "array",
|
||||
"items": "org.apache.fineract.avro.loan.v1.UnpaidChargeDataV1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "transferStatus",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "transferStatusReason",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "settlementDate",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "purchasePriceRatio",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,32 +4,16 @@
|
||||
"type": "record",
|
||||
"fields": [
|
||||
{
|
||||
"default": null,
|
||||
"name": "id",
|
||||
"type": [
|
||||
"null",
|
||||
"long"
|
||||
]
|
||||
"name": "loanId",
|
||||
"type": ["long"]
|
||||
},
|
||||
{
|
||||
"name": "loanAccountNo",
|
||||
"type": ["string"]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "accountNo",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "externalId",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "dueDate",
|
||||
"name": "loanExternalId",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
@@ -44,19 +28,15 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "totalLoanAmountDue",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
"name": "installment",
|
||||
"type": ["org.apache.fineract.avro.loan.v1.RepaymentDueDataV1"]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "repaymentDue",
|
||||
"name": "pastDueAmount",
|
||||
"type": [
|
||||
"null",
|
||||
"org.apache.fineract.avro.loan.v1.RepaymentDueDataV1"
|
||||
"org.apache.fineract.avro.loan.v1.RepaymentPastDueDataV1"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -306,6 +306,126 @@
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "totalMerchantRefund",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "totalMerchantRefundReversed",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "totalPayoutRefund",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "totalPayoutRefundReversed",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "totalGoodwillCredit",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "totalGoodwillCreditReversed",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "totalChargeAdjustment",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "totalChargeAdjustmentReversed",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "totalChargeback",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "totalCreditBalanceRefund",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "totalCreditBalanceRefundReversed",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "totalRepaymentTransaction",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "totalRepaymentTransactionReversed",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "chargeOffReasonId",
|
||||
"type": [
|
||||
"null",
|
||||
"long"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "chargeOffReason",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -147,6 +147,14 @@
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "externalOwnerId",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "transfer",
|
||||
@@ -216,6 +224,26 @@
|
||||
"items": "org.apache.fineract.avro.loan.v1.LoanTransactionRelationDataV1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "unpaidCharges",
|
||||
"doc": "Only used for Charge-off transaction",
|
||||
"type": [
|
||||
"null",
|
||||
{
|
||||
"type": "array",
|
||||
"items": "org.apache.fineract.avro.loan.v1.UnpaidChargeDataV1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "reversedOnDate",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -11,6 +11,14 @@
|
||||
"int"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "installmentDueDate",
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "principalAmountDue",
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "RepaymentPastDueDataV1",
|
||||
"namespace": "org.apache.fineract.avro.loan.v1",
|
||||
"type": "record",
|
||||
"fields": [
|
||||
{
|
||||
"default": null,
|
||||
"name": "totalAmount",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "principalAmount",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "interestAmount",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "feeAmount",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": null,
|
||||
"name": "penaltyAmount",
|
||||
"type": [
|
||||
"null",
|
||||
"bigdecimal"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "UnpaidChargeDataV1",
|
||||
"namespace": "org.apache.fineract.avro.loan.v1",
|
||||
"type": "record",
|
||||
"fields": [
|
||||
{
|
||||
"name": "chargeId",
|
||||
"type": "long"
|
||||
},
|
||||
{
|
||||
"name": "chargeName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "outstandingAmount",
|
||||
"type": "bigdecimal"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2,6 +2,6 @@ This is the source of the official Apache Fineract Java Client library.
|
||||
|
||||
It is mostly autogenerated using **Swagger Codegen**, but includes a number of hand-written utility classes to aid in its usage.
|
||||
|
||||
There is some [documentation about it here](https://github.com/apache/fineract/blob/develop/fineract-doc/src/docs/en/05_client.adoc).
|
||||
There is some [documentation about it here](https://github.com/apache/fineract/blob/develop/fineract-doc/src/docs/en/chapters/sdk/client.adoc).
|
||||
|
||||
Please contribute improvements to this (a submodule of Apache Fineract) if this client library has gaps for what you need it for.
|
||||
|
||||
@@ -16,22 +16,20 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
plugins {
|
||||
id 'org.openapi.generator' version '6.6.0'
|
||||
}
|
||||
description = 'Fineract Client'
|
||||
|
||||
apply plugin: 'org.openapi.generator'
|
||||
|
||||
apply from: 'dependencies.gradle'
|
||||
|
||||
// enable when all tests are migrated
|
||||
tasks.cucumber.onlyIf {false}
|
||||
|
||||
// TODO: @vidakovic we should publish this lib to Maven Central; do in separate PR
|
||||
|
||||
openApiMeta {
|
||||
generatorName = 'Fineract'
|
||||
packageName = 'org.apache.fineract.client'
|
||||
outputFolder = "$buildDir/meta".toString()
|
||||
// trick to make sure fineract.yaml is generated first
|
||||
// trick to make sure fineract.json is generated first
|
||||
}
|
||||
|
||||
openApiValidate {
|
||||
|
||||
@@ -17,10 +17,13 @@
|
||||
* under the License.
|
||||
*/
|
||||
dependencies {
|
||||
// project(':fineract-provider')
|
||||
// this needs to stay on exactly this version because the OpenAPI Generator
|
||||
// only handles javax annotations, not jakarta ones
|
||||
implementation 'jakarta.annotation:jakarta.annotation-api:1.3.5'
|
||||
|
||||
|
||||
implementation(
|
||||
'jakarta.annotation:jakarta.annotation-api',
|
||||
'io.swagger:swagger-annotations',
|
||||
'io.swagger.core.v3:swagger-annotations-jakarta',
|
||||
'com.squareup.retrofit2:retrofit',
|
||||
'com.squareup.retrofit2:adapter-java8',
|
||||
'com.squareup.retrofit2:adapter-rxjava2', // TODO https://github.com/OpenAPITools/openapi-generator/issues/7758
|
||||
@@ -30,6 +33,7 @@ dependencies {
|
||||
'com.google.code.findbugs:jsr305',
|
||||
'com.squareup.okhttp3:logging-interceptor',
|
||||
)
|
||||
|
||||
// org.apache.oltu.oauth2 is used in org.apache.fineract.client.auth.OAuthOkHttpClient (only; can be excluded by consumers not requiring OAuth)
|
||||
implementation('org.apache.oltu.oauth2:org.apache.oltu.oauth2.client') {
|
||||
exclude group: 'org.apache.oltu.oauth2', module: 'org.apache.oltu.oauth2.common'
|
||||
|
||||
+6
-6
@@ -53,7 +53,7 @@ public interface DocumentsApiFixed {
|
||||
* @return Call<PostEntityTypeEntityIdDocumentsResponse>
|
||||
*/
|
||||
@retrofit2.http.Multipart
|
||||
@POST("{entityType}/{entityId}/documents")
|
||||
@POST("v1/{entityType}/{entityId}/documents")
|
||||
Call<PostEntityTypeEntityIdDocumentsResponse> createDocument(@retrofit2.http.Path("entityType") String entityType,
|
||||
@retrofit2.http.Path("entityId") Long entityId, @retrofit2.http.Part okhttp3.MultipartBody.Part file,
|
||||
@retrofit2.http.Part("name") String name, @retrofit2.http.Part("description") String description);
|
||||
@@ -69,7 +69,7 @@ public interface DocumentsApiFixed {
|
||||
* documentId (required)
|
||||
* @return Call<DeleteEntityTypeEntityIdDocumentsResponse>
|
||||
*/
|
||||
@DELETE("{entityType}/{entityId}/documents/{documentId}")
|
||||
@DELETE("v1/{entityType}/{entityId}/documents/{documentId}")
|
||||
Call<DeleteEntityTypeEntityIdDocumentsResponse> deleteDocument(@retrofit2.http.Path("entityType") String entityType,
|
||||
@retrofit2.http.Path("entityId") Long entityId, @retrofit2.http.Path("documentId") Long documentId);
|
||||
|
||||
@@ -85,7 +85,7 @@ public interface DocumentsApiFixed {
|
||||
* documentId (required)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@GET("{entityType}/{entityId}/documents/{documentId}/attachment")
|
||||
@GET("v1/{entityType}/{entityId}/documents/{documentId}/attachment")
|
||||
Call<ResponseBody> downloadFile(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId,
|
||||
@retrofit2.http.Path("documentId") Long documentId);
|
||||
|
||||
@@ -101,7 +101,7 @@ public interface DocumentsApiFixed {
|
||||
* documentId (required)
|
||||
* @return Call<GetEntityTypeEntityIdDocumentsResponse>
|
||||
*/
|
||||
@GET("{entityType}/{entityId}/documents/{documentId}")
|
||||
@GET("v1/{entityType}/{entityId}/documents/{documentId}")
|
||||
Call<GetEntityTypeEntityIdDocumentsResponse> getDocument(@retrofit2.http.Path("entityType") String entityType,
|
||||
@retrofit2.http.Path("entityId") Long entityId, @retrofit2.http.Path("documentId") Long documentId);
|
||||
|
||||
@@ -115,7 +115,7 @@ public interface DocumentsApiFixed {
|
||||
* entityId (required)
|
||||
* @return Call<List<GetEntityTypeEntityIdDocumentsResponse>>
|
||||
*/
|
||||
@GET("{entityType}/{entityId}/documents")
|
||||
@GET("v1/{entityType}/{entityId}/documents")
|
||||
Call<List<GetEntityTypeEntityIdDocumentsResponse>> retrieveAllDocuments(@retrofit2.http.Path("entityType") String entityType,
|
||||
@retrofit2.http.Path("entityId") Long entityId);
|
||||
|
||||
@@ -138,7 +138,7 @@ public interface DocumentsApiFixed {
|
||||
* @return Call<PutEntityTypeEntityIdDocumentsResponse>
|
||||
*/
|
||||
@retrofit2.http.Multipart
|
||||
@PUT("{entityType}/{entityId}/documents/{documentId}")
|
||||
@PUT("v1/{entityType}/{entityId}/documents/{documentId}")
|
||||
Call<PutEntityTypeEntityIdDocumentsResponse> updateDocument(@retrofit2.http.Path("entityType") String entityType,
|
||||
@retrofit2.http.Path("entityId") Long entityId, @retrofit2.http.Path("documentId") Long documentId,
|
||||
@retrofit2.http.Part okhttp3.MultipartBody.Part file, @retrofit2.http.Part("name") String name,
|
||||
|
||||
@@ -36,21 +36,21 @@ import retrofit2.http.PUT;
|
||||
*/
|
||||
public interface ImagesApi {
|
||||
|
||||
@POST("{entityType}/{entityId}/images")
|
||||
@POST("v1/{entityType}/{entityId}/images")
|
||||
@retrofit2.http.Multipart
|
||||
Call<Void> create(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId,
|
||||
@retrofit2.http.Part okhttp3.MultipartBody.Part file);
|
||||
|
||||
@GET("{entityType}/{entityId}/images")
|
||||
@GET("v1/{entityType}/{entityId}/images")
|
||||
Call<ResponseBody> get(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId,
|
||||
@retrofit2.http.Query("maxWidth") Integer maxWidth, @retrofit2.http.Query("maxHeight") Integer maxHeight,
|
||||
@retrofit2.http.Query("output") String output);
|
||||
|
||||
@PUT("{entityType}/{entityId}/images")
|
||||
@PUT("v1/{entityType}/{entityId}/images")
|
||||
@retrofit2.http.Multipart
|
||||
Call<Void> update(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId,
|
||||
@retrofit2.http.Part okhttp3.MultipartBody.Part file);
|
||||
|
||||
@DELETE("{entityType}/{entityId}/images")
|
||||
@DELETE("v1/{entityType}/{entityId}/images")
|
||||
Call<Void> delete(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId);
|
||||
}
|
||||
|
||||
+2
-2
@@ -51,14 +51,14 @@ public interface RunReportsApi {
|
||||
* isSelfServiceUserReport (optional, default to false)
|
||||
* @return Call<GetReportNameResponse>
|
||||
*/
|
||||
@GET("runreports/{reportName}")
|
||||
@GET("v1/runreports/{reportName}")
|
||||
Call<RunReportsResponse> runReportGetData(@retrofit2.http.Path("reportName") String reportName,
|
||||
@QueryMap Map<String, String> parameters, @retrofit2.http.Query("isSelfServiceUserReport") Boolean isSelfServiceUserReport);
|
||||
|
||||
/**
|
||||
* Run Report which returns a response such as a PDF, CSV, XLS or XSLX file.
|
||||
*/
|
||||
@GET("runreports/{reportName}")
|
||||
@GET("v1/runreports/{reportName}")
|
||||
Call<ResponseBody> runReportGetFile(@retrofit2.http.Path("reportName") String reportName, @QueryMap Map<String, String> parameters,
|
||||
@retrofit2.http.Query("isSelfServiceUserReport") Boolean isSelfServiceUserReport);
|
||||
|
||||
|
||||
+7
-5
@@ -19,6 +19,7 @@
|
||||
package org.apache.fineract.client.util;
|
||||
|
||||
import java.io.IOException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Response;
|
||||
|
||||
@@ -27,6 +28,7 @@ import retrofit2.Response;
|
||||
*
|
||||
* @author Michael Vorburger.ch
|
||||
*/
|
||||
@Slf4j
|
||||
public class CallFailedRuntimeException extends RuntimeException {
|
||||
|
||||
private final Call<?> call;
|
||||
@@ -46,17 +48,17 @@ public class CallFailedRuntimeException extends RuntimeException {
|
||||
|
||||
private static String message(Call<?> call, Response<?> response) {
|
||||
StringBuilder sb = new StringBuilder("HTTP failed: " + call.request() + "; " + response);
|
||||
if (response.message() != null && !response.message().isEmpty()) {
|
||||
sb.append("; message: " + response.message());
|
||||
if (null != response.message() && !response.message().isEmpty()) {
|
||||
sb.append("; message: ").append(response.message());
|
||||
}
|
||||
String errorBody;
|
||||
try {
|
||||
errorBody = response.errorBody().string();
|
||||
errorBody = response.errorBody() != null ? response.errorBody().string() : null;
|
||||
if (errorBody != null) {
|
||||
sb.append("; errorBody: " + errorBody);
|
||||
sb.append("; errorBody: ").append(errorBody);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// Ignore.
|
||||
log.error("Exception during creating the {} message:", CallFailedRuntimeException.class.getSimpleName(), e);
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import java.security.NoSuchAlgorithmException;
|
||||
import java.security.SecureRandom;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.time.Duration;
|
||||
import javax.net.ssl.HostnameVerifier;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
@@ -43,6 +44,7 @@ import org.apache.fineract.client.services.AuditsApi;
|
||||
import org.apache.fineract.client.services.AuthenticationHttpBasicApi;
|
||||
import org.apache.fineract.client.services.BatchApiApi;
|
||||
import org.apache.fineract.client.services.BusinessDateManagementApi;
|
||||
import org.apache.fineract.client.services.BusinessStepConfigurationApi;
|
||||
import org.apache.fineract.client.services.CacheApi;
|
||||
import org.apache.fineract.client.services.CashierJournalsApi;
|
||||
import org.apache.fineract.client.services.CashiersApi;
|
||||
@@ -51,6 +53,7 @@ import org.apache.fineract.client.services.ChargesApi;
|
||||
import org.apache.fineract.client.services.ClientApi;
|
||||
import org.apache.fineract.client.services.ClientChargesApi;
|
||||
import org.apache.fineract.client.services.ClientIdentifierApi;
|
||||
import org.apache.fineract.client.services.ClientSearchV2Api;
|
||||
import org.apache.fineract.client.services.ClientTransactionApi;
|
||||
import org.apache.fineract.client.services.ClientsAddressApi;
|
||||
import org.apache.fineract.client.services.CodeValuesApi;
|
||||
@@ -62,6 +65,8 @@ import org.apache.fineract.client.services.DelinquencyRangeAndBucketsManagementA
|
||||
import org.apache.fineract.client.services.DocumentsApiFixed;
|
||||
import org.apache.fineract.client.services.EntityDataTableApi;
|
||||
import org.apache.fineract.client.services.EntityFieldConfigurationApi;
|
||||
import org.apache.fineract.client.services.ExternalAssetOwnersApi;
|
||||
import org.apache.fineract.client.services.ExternalEventConfigurationApi;
|
||||
import org.apache.fineract.client.services.ExternalServicesApi;
|
||||
import org.apache.fineract.client.services.FetchAuthenticatedUserDetailsApi;
|
||||
import org.apache.fineract.client.services.FixedDepositAccountApi;
|
||||
@@ -77,7 +82,9 @@ import org.apache.fineract.client.services.InterestRateChartApi;
|
||||
import org.apache.fineract.client.services.InterestRateSlabAKAInterestBandsApi;
|
||||
import org.apache.fineract.client.services.JournalEntriesApi;
|
||||
import org.apache.fineract.client.services.ListReportMailingJobHistoryApi;
|
||||
import org.apache.fineract.client.services.LoanAccountLockApi;
|
||||
import org.apache.fineract.client.services.LoanChargesApi;
|
||||
import org.apache.fineract.client.services.LoanCobCatchUpApi;
|
||||
import org.apache.fineract.client.services.LoanCollateralApi;
|
||||
import org.apache.fineract.client.services.LoanDisbursementDetailsApi;
|
||||
import org.apache.fineract.client.services.LoanProductsApi;
|
||||
@@ -150,7 +157,7 @@ import retrofit2.Retrofit;
|
||||
import retrofit2.converter.scalars.ScalarsConverterFactory;
|
||||
|
||||
/**
|
||||
* Fineract Client Java SDK API entry point. Use this instead of the {@link ApiClient}.
|
||||
* Fineract Client Java SDK API entry point.
|
||||
*
|
||||
* @author Michael Vorburger.ch
|
||||
*/
|
||||
@@ -177,12 +184,15 @@ public final class FineractClient {
|
||||
public final AuthenticationHttpBasicApi authentication;
|
||||
public final BatchApiApi batches;
|
||||
public final BusinessDateManagementApi businessDateManagement;
|
||||
public final BusinessStepConfigurationApi businessStepConfiguration;
|
||||
public final CacheApi caches;
|
||||
public final CashierJournalsApi cashiersJournal;
|
||||
public final CashiersApi cashiers;
|
||||
public final CentersApi centers;
|
||||
public final ChargesApi charges;
|
||||
public final ClientApi clients;
|
||||
|
||||
public final ClientSearchV2Api clientSearchV2;
|
||||
public final ClientChargesApi clientCharges;
|
||||
public final ClientIdentifierApi clientIdentifiers;
|
||||
public final ClientsAddressApi clientAddresses;
|
||||
@@ -196,6 +206,7 @@ public final class FineractClient {
|
||||
public final DelinquencyRangeAndBucketsManagementApi delinquencyRangeAndBucketsManagement;
|
||||
public final EntityDataTableApi entityDatatableChecks;
|
||||
public final EntityFieldConfigurationApi entityFieldConfigurations;
|
||||
public final ExternalEventConfigurationApi externalEventConfigurationApi;
|
||||
public final ExternalServicesApi externalServices;
|
||||
public final FetchAuthenticatedUserDetailsApi userDetails;
|
||||
public final FixedDepositAccountApi fixedDepositAccounts;
|
||||
@@ -212,6 +223,7 @@ public final class FineractClient {
|
||||
public final JournalEntriesApi journalEntries;
|
||||
public final ListReportMailingJobHistoryApi reportMailings;
|
||||
public final LoanChargesApi loanCharges;
|
||||
public final LoanCobCatchUpApi loanCobCatchUpApi;
|
||||
public final LoanCollateralApi loanCollaterals;
|
||||
public final LoanProductsApi loanProducts;
|
||||
public final LoanReschedulingApi loanSchedules;
|
||||
@@ -278,10 +290,15 @@ public final class FineractClient {
|
||||
public final UsersApi users;
|
||||
public final WorkingDaysApi workingDays;
|
||||
|
||||
public final ExternalAssetOwnersApi externalAssetOwners;
|
||||
public final LoanAccountLockApi loanAccountLockApi;
|
||||
|
||||
private FineractClient(OkHttpClient okHttpClient, Retrofit retrofit) {
|
||||
this.okHttpClient = okHttpClient;
|
||||
this.retrofit = retrofit;
|
||||
|
||||
loanAccountLockApi = retrofit.create(LoanAccountLockApi.class);
|
||||
externalAssetOwners = retrofit.create(ExternalAssetOwnersApi.class);
|
||||
glClosures = retrofit.create(AccountingClosureApi.class);
|
||||
accountingRules = retrofit.create(AccountingRulesApi.class);
|
||||
accountNumberFormats = retrofit.create(AccountNumberFormatApi.class);
|
||||
@@ -291,12 +308,15 @@ public final class FineractClient {
|
||||
authentication = retrofit.create(AuthenticationHttpBasicApi.class);
|
||||
batches = retrofit.create(BatchApiApi.class);
|
||||
businessDateManagement = retrofit.create(BusinessDateManagementApi.class);
|
||||
businessStepConfiguration = retrofit.create(BusinessStepConfigurationApi.class);
|
||||
externalEventConfigurationApi = retrofit.create(ExternalEventConfigurationApi.class);
|
||||
caches = retrofit.create(CacheApi.class);
|
||||
cashiersJournal = retrofit.create(CashierJournalsApi.class);
|
||||
cashiers = retrofit.create(CashiersApi.class);
|
||||
centers = retrofit.create(CentersApi.class);
|
||||
charges = retrofit.create(ChargesApi.class);
|
||||
clients = retrofit.create(ClientApi.class);
|
||||
clientSearchV2 = retrofit.create(ClientSearchV2Api.class);
|
||||
clientCharges = retrofit.create(ClientChargesApi.class);
|
||||
clientIdentifiers = retrofit.create(ClientIdentifierApi.class);
|
||||
clientAddresses = retrofit.create(ClientsAddressApi.class);
|
||||
@@ -326,6 +346,7 @@ public final class FineractClient {
|
||||
journalEntries = retrofit.create(JournalEntriesApi.class);
|
||||
reportMailings = retrofit.create(ListReportMailingJobHistoryApi.class);
|
||||
loanCharges = retrofit.create(LoanChargesApi.class);
|
||||
loanCobCatchUpApi = retrofit.create(LoanCobCatchUpApi.class);
|
||||
loanCollaterals = retrofit.create(LoanCollateralApi.class);
|
||||
loanProducts = retrofit.create(LoanProductsApi.class);
|
||||
loanSchedules = retrofit.create(LoanReschedulingApi.class);
|
||||
@@ -454,6 +475,11 @@ public final class FineractClient {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder readTimeout(Duration timeout) {
|
||||
okBuilder.readTimeout(timeout);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Skip Fineract API host SSL certificate verification. DO NOT USE THIS when invoking a production server's API!
|
||||
* This is intended for https://localhost:8443/ testing of development servers with self-signed certificates,
|
||||
@@ -528,7 +554,6 @@ public final class FineractClient {
|
||||
* Obtain the internal Retrofit Builder. This method is typically not required to be invoked for simple API
|
||||
* usages, but can be a handy back door for non-trivial advanced customizations of the API client.
|
||||
*
|
||||
* @return the {@link ApiClient} which {@link #build()} will use.
|
||||
*/
|
||||
public retrofit2.Retrofit.Builder getRetrofitBuilder() {
|
||||
return retrofitBuilder;
|
||||
@@ -538,7 +563,6 @@ public final class FineractClient {
|
||||
* Obtain the internal OkHttp Builder. This method is typically not required to be invoked for simple API
|
||||
* usages, but can be a handy back door for non-trivial advanced customizations of the API client.
|
||||
*
|
||||
* @return the {@link ApiClient} which {@link #build()} will use.
|
||||
*/
|
||||
public okhttp3.OkHttpClient.Builder getOkBuilder() {
|
||||
return okBuilder;
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.google.gson.JsonParseException;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.internal.bind.util.ISO8601Utils;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonToken;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import io.gsonfire.GsonFireBuilder;
|
||||
import java.io.IOException;
|
||||
@@ -35,8 +36,12 @@ import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
import okhttp3.RequestBody;
|
||||
import okhttp3.ResponseBody;
|
||||
import org.apache.fineract.client.models.ExternalId;
|
||||
import org.apache.fineract.client.util.adapter.ExternalIdAdapter;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import retrofit2.Converter;
|
||||
import retrofit2.Retrofit;
|
||||
import retrofit2.converter.gson.GsonConverterFactory;
|
||||
@@ -51,12 +56,14 @@ public class JSON {
|
||||
private final SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter();
|
||||
private final OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter();
|
||||
private final LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter();
|
||||
private final ExternalIdAdapter externalIdAdapter = new ExternalIdAdapter();
|
||||
|
||||
public JSON() {
|
||||
gson = new GsonFireBuilder().createGsonBuilder().registerTypeAdapter(Date.class, dateTypeAdapter)
|
||||
.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter)
|
||||
.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter)
|
||||
.registerTypeAdapter(LocalDate.class, localDateTypeAdapter).create();
|
||||
.registerTypeAdapter(LocalDate.class, localDateTypeAdapter).registerTypeAdapter(ExternalId.class, externalIdAdapter)
|
||||
.create();
|
||||
}
|
||||
|
||||
public Gson getGson() {
|
||||
@@ -208,25 +215,28 @@ public class JSON {
|
||||
@Override
|
||||
public Date read(JsonReader in) throws IOException {
|
||||
try {
|
||||
switch (in.peek()) {
|
||||
case NULL:
|
||||
in.nextNull();
|
||||
return null;
|
||||
default:
|
||||
String date = in.nextString();
|
||||
try {
|
||||
if (dateFormat != null) {
|
||||
return dateFormat.parse(date);
|
||||
}
|
||||
return ISO8601Utils.parse(date, new ParsePosition(0));
|
||||
} catch (ParseException e) {
|
||||
throw new JsonParseException(e);
|
||||
}
|
||||
if (Objects.requireNonNull(in.peek()) == JsonToken.NULL) {
|
||||
in.nextNull();
|
||||
return null;
|
||||
}
|
||||
String date = in.nextString();
|
||||
return parseDate(date);
|
||||
} catch (IllegalArgumentException e) {
|
||||
throw new JsonParseException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private Date parseDate(String date) {
|
||||
try {
|
||||
if (null != dateFormat) {
|
||||
return dateFormat.parse(date);
|
||||
}
|
||||
return ISO8601Utils.parse(date, new ParsePosition(0));
|
||||
} catch (ParseException e) {
|
||||
throw new JsonParseException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The following is not from the generated JSON class, but from the original generated ApiClient.
|
||||
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.apache.fineract.client.util.adapter;
|
||||
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
import org.apache.fineract.client.models.ExternalId;
|
||||
|
||||
public class ExternalIdAdapter extends TypeAdapter<ExternalId> {
|
||||
|
||||
@Override
|
||||
public void write(JsonWriter out, ExternalId value) throws IOException {
|
||||
if (value != null && Boolean.FALSE.equals(value.getEmpty())) {
|
||||
out.value(value.getValue());
|
||||
} else {
|
||||
out.nullValue();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExternalId read(JsonReader in) throws IOException {
|
||||
ExternalId result = new ExternalId().empty(true);
|
||||
switch (in.peek()) {
|
||||
case NULL:
|
||||
in.nextNull();
|
||||
return result;
|
||||
default:
|
||||
String value = in.nextString();
|
||||
return new ExternalId().empty(false).value(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
|
||||
public class FineractClientTechnicalTest {
|
||||
|
||||
@Test
|
||||
@Disabled // TODO remove Ignore once https://issues.apache.org/jira/browse/FINERACT-1221 is fixed
|
||||
@Disabled("remove Ignore once https://issues.apache.org/jira/browse/FINERACT-1221 is fixed")
|
||||
void testInvalidOperations() {
|
||||
FineractClient.Builder builder = FineractClient.builder().baseURL("http://test/").tenant("default").basicAuth("mifos", "password");
|
||||
builder.getRetrofitBuilder().validateEagerly(true); // see FINERACT-1221
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
description = 'Fineract Core'
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
compileJava.doLast {
|
||||
def mainSS = sourceSets.main
|
||||
def source = mainSS.java.classesDirectory.get()
|
||||
copy {
|
||||
from file("src/main/resources/jpa/core/persistence.xml")
|
||||
into "${source}/META-INF/"
|
||||
}
|
||||
javaexec {
|
||||
description = 'Performs EclipseLink static weaving of entity classes'
|
||||
def target = source
|
||||
main 'org.eclipse.persistence.tools.weaving.jpa.StaticWeave'
|
||||
args '-persistenceinfo', source, '-classpath', sourceSets.main.runtimeClasspath, source, target
|
||||
classpath sourceSets.main.runtimeClasspath
|
||||
}
|
||||
delete {
|
||||
delete "${source}/META-INF/persistence.xml"
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
providedRuntime // needed for Spring Boot executable WAR
|
||||
providedCompile
|
||||
compile() {
|
||||
exclude module: 'hibernate-entitymanager'
|
||||
exclude module: 'hibernate-validator'
|
||||
exclude module: 'activation'
|
||||
exclude module: 'bcmail-jdk14'
|
||||
exclude module: 'bcprov-jdk14'
|
||||
exclude module: 'bctsp-jdk14'
|
||||
exclude module: 'c3p0'
|
||||
exclude module: 'stax-api'
|
||||
exclude module: 'jaxb-api'
|
||||
exclude module: 'jaxb-impl'
|
||||
exclude module: 'jboss-logging'
|
||||
exclude module: 'itext-rtf'
|
||||
exclude module: 'classworlds'
|
||||
}
|
||||
runtime
|
||||
}
|
||||
|
||||
apply from: 'dependencies.gradle'
|
||||
|
||||
// Configuration for the modernizer plugin
|
||||
// https://github.com/andygoossens/gradle-modernizer-plugin
|
||||
modernizer {
|
||||
ignoreClassNamePatterns = [
|
||||
'.*AbstractPersistableCustom',
|
||||
'.*EntityTables',
|
||||
'.*domain.*'
|
||||
]
|
||||
}
|
||||
|
||||
// If we are running Gradle within Eclipse to enhance classes with OpenJPA,
|
||||
// set the classes directory to point to Eclipse's default build directory
|
||||
if (project.hasProperty('env') && project.getProperty('env') == 'eclipse') {
|
||||
sourceSets.main.java.outputDir = new File(rootProject.projectDir, "fineract-core/bin/main")
|
||||
}
|
||||
|
||||
if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) {
|
||||
sourceSets {
|
||||
test {
|
||||
java {
|
||||
exclude '**/core/boot/tests/**'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
dependencies {
|
||||
|
||||
// Never use "compile" scope, but make all dependencies either 'implementation', 'runtimeOnly' or 'testCompile'.
|
||||
// Note that we never use 'api', because Fineract at least currently is a simple monolithic application ("WAR"), not a library.
|
||||
// We also (normally should have) no need to ever use 'compileOnly'.
|
||||
|
||||
implementation(
|
||||
project(path: ':fineract-avro-schemas')
|
||||
)
|
||||
|
||||
// implementation dependencies are directly used (compiled against) in src/main (and src/test)
|
||||
implementation(
|
||||
'org.springframework.boot:spring-boot-starter-web',
|
||||
'org.springframework.boot:spring-boot-starter-security',
|
||||
'org.springframework.boot:spring-boot-starter-validation',
|
||||
'org.springframework.boot:spring-boot-starter-batch',
|
||||
'org.springframework.batch:spring-batch-integration',
|
||||
'jakarta.ws.rs:jakarta.ws.rs-api',
|
||||
'org.glassfish.jersey.media:jersey-media-multipart',
|
||||
'org.apache.avro:avro',
|
||||
|
||||
'com.google.guava:guava',
|
||||
'com.google.code.gson:gson',
|
||||
|
||||
'org.apache.commons:commons-lang3',
|
||||
|
||||
'com.jayway.jsonpath:json-path',
|
||||
|
||||
'com.github.spotbugs:spotbugs-annotations',
|
||||
'io.swagger.core.v3:swagger-annotations-jakarta',
|
||||
|
||||
'com.squareup.retrofit2:converter-gson',
|
||||
|
||||
'org.springdoc:springdoc-openapi-starter-webmvc-ui',
|
||||
'org.mapstruct:mapstruct',
|
||||
|
||||
'io.github.resilience4j:resilience4j-spring-boot2',
|
||||
'org.apache.httpcomponents:httpcore',
|
||||
)
|
||||
implementation ('org.springframework.boot:spring-boot-starter-data-jpa') {
|
||||
exclude group: 'org.hibernate'
|
||||
}
|
||||
implementation('org.eclipse.persistence:org.eclipse.persistence.jpa') {
|
||||
exclude group: 'org.eclipse.persistence', module: 'jakarta.persistence'
|
||||
}
|
||||
implementation('org.springframework.boot:spring-boot-starter-jersey') {
|
||||
exclude group: 'org.glassfish.hk2.external', module: 'aopalliance-repackaged'
|
||||
exclude group: 'org.glassfish.hk2', module: 'hk2-runlevel'
|
||||
exclude group: 'org.hibernate.validator', module: 'hibernate-validator'
|
||||
exclude group: 'jakarta.activation', module: 'jakarta.activation-api'
|
||||
}
|
||||
implementation('org.dom4j:dom4j') {
|
||||
exclude group: 'javax.xml.bind'
|
||||
}
|
||||
implementation ('jakarta.xml.bind:jakarta.xml.bind-api') {
|
||||
exclude group: 'jakarta.activation'
|
||||
}
|
||||
implementation ('org.springframework.boot:spring-boot-starter-data-jpa') {
|
||||
exclude group: 'org.hibernate'
|
||||
}
|
||||
implementation('org.eclipse.persistence:org.eclipse.persistence.jpa') {
|
||||
exclude group: 'org.eclipse.persistence', module: 'jakarta.persistence'
|
||||
}
|
||||
runtimeOnly('org.glassfish.jaxb:jaxb-runtime') {
|
||||
exclude group: 'com.sun.activation'
|
||||
}
|
||||
|
||||
// runtimeOnly dependencies are things that Fineract code has no direct compile time dependency on, but which must be present at run-time
|
||||
runtimeOnly(
|
||||
'org.apache.bval:org.apache.bval.bundle',
|
||||
|
||||
// Although fineract (at the time of writing) doesn't have any compile time dep. on httpclient,
|
||||
// it's useful to have this for the Spring Boot TestRestTemplate http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-rest-templates-test-utility
|
||||
'org.apache.httpcomponents:httpclient'
|
||||
)
|
||||
|
||||
compileOnly 'org.projectlombok:lombok'
|
||||
annotationProcessor 'org.projectlombok:lombok'
|
||||
annotationProcessor 'org.mapstruct:mapstruct-processor'
|
||||
|
||||
implementation 'ch.qos.logback.contrib:logback-json-classic'
|
||||
implementation 'ch.qos.logback.contrib:logback-jackson'
|
||||
implementation 'org.codehaus.janino:janino'
|
||||
|
||||
implementation 'org.apache.commons:commons-math3'
|
||||
|
||||
implementation 'io.github.classgraph:classgraph'
|
||||
// testCompile dependencies are ONLY used in src/test, not src/main.
|
||||
// Do NOT repeat dependencies which are ALREADY in implementation or runtimeOnly!
|
||||
//
|
||||
testImplementation( 'io.github.classgraph:classgraph')
|
||||
testImplementation ('org.springframework.boot:spring-boot-starter-test') {
|
||||
exclude group: 'com.jayway.jsonpath', module: 'json-path'
|
||||
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
|
||||
exclude group: 'jakarta.activation'
|
||||
exclude group: 'javax.activation'
|
||||
exclude group: 'org.skyscreamer'
|
||||
}
|
||||
implementation ('org.mnode.ical4j:ical4j') {
|
||||
exclude group: 'commons-logging'
|
||||
exclude group: 'javax.activation'
|
||||
exclude group: 'com.sun.mail', module: 'javax.mail'
|
||||
}
|
||||
implementation ('org.quartz-scheduler:quartz') {
|
||||
exclude group: 'com.zaxxer', module: 'HikariCP-java7'
|
||||
}
|
||||
testImplementation ('org.mockito:mockito-inline')
|
||||
implementation('org.apache.avro:avro')
|
||||
implementation(
|
||||
project(path: ':fineract-avro-schemas')
|
||||
)
|
||||
}
|
||||
+13
-15
@@ -27,22 +27,22 @@ import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.ws.rs.Consumes;
|
||||
import jakarta.ws.rs.DELETE;
|
||||
import jakarta.ws.rs.GET;
|
||||
import jakarta.ws.rs.POST;
|
||||
import jakarta.ws.rs.PUT;
|
||||
import jakarta.ws.rs.Path;
|
||||
import jakarta.ws.rs.PathParam;
|
||||
import jakarta.ws.rs.Produces;
|
||||
import jakarta.ws.rs.QueryParam;
|
||||
import jakarta.ws.rs.core.Context;
|
||||
import jakarta.ws.rs.core.MediaType;
|
||||
import jakarta.ws.rs.core.UriInfo;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.fineract.accounting.closure.data.GLClosureData;
|
||||
import org.apache.fineract.accounting.closure.service.GLClosureReadPlatformService;
|
||||
@@ -55,12 +55,10 @@ import org.apache.fineract.infrastructure.core.serialization.ApiRequestJsonSeria
|
||||
import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSerializer;
|
||||
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
|
||||
import org.apache.fineract.organisation.office.service.OfficeReadPlatformService;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Path("/glclosures")
|
||||
@Path("/v1/glclosures")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Tag(name = "Accounting Closure", description = "An accounting closure indicates that no more journal entries may be logged (or reversed) in the system, either manually or via the portfolio with an entry date prior to the defined closure date\n"
|
||||
+ "\n" + "Field Descriptions\n" + "closingDate\n" + "The date for which the accounting closure is defined\n" + "officeId\n"
|
||||
+ "The identifer of the branch for which accounting has been closed\n" + "comments\n"
|
||||
+6
-6
@@ -18,15 +18,15 @@
|
||||
*/
|
||||
package org.apache.fineract.accounting.closure.domain;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.Table;
|
||||
import jakarta.persistence.UniqueConstraint;
|
||||
import java.time.LocalDate;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.UniqueConstraint;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
+1
-2
@@ -32,11 +32,10 @@ import org.apache.fineract.infrastructure.core.exception.InvalidJsonException;
|
||||
import org.apache.fineract.infrastructure.core.serialization.AbstractFromApiJsonDeserializer;
|
||||
import org.apache.fineract.infrastructure.core.serialization.FromApiJsonDeserializer;
|
||||
import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
|
||||
import org.apache.fineract.portfolio.loanaccount.guarantor.command.GuarantorCommand;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* Implementation of {@link FromApiJsonDeserializer} for {@link GuarantorCommand}'s.
|
||||
* Implementation of {@link FromApiJsonDeserializer}
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
+26
-4
@@ -37,7 +37,10 @@ public final class AccountingConstants {
|
||||
public enum CashAccountsForLoan {
|
||||
|
||||
FUND_SOURCE(1), LOAN_PORTFOLIO(2), INTEREST_ON_LOANS(3), INCOME_FROM_FEES(4), INCOME_FROM_PENALTIES(5), LOSSES_WRITTEN_OFF(
|
||||
6), TRANSFERS_SUSPENSE(10), OVERPAYMENT(11), INCOME_FROM_RECOVERY(12), GOODWILL_CREDIT(13);
|
||||
6), TRANSFERS_SUSPENSE(10), OVERPAYMENT(11), INCOME_FROM_RECOVERY(12), GOODWILL_CREDIT(13), INCOME_FROM_CHARGE_OFF_INTEREST(
|
||||
14), INCOME_FROM_CHARGE_OFF_FEES(15), CHARGE_OFF_EXPENSE(16), CHARGE_OFF_FRAUD_EXPENSE(
|
||||
17), INCOME_FROM_CHARGE_OFF_PENALTY(18), INCOME_FROM_GOODWILL_CREDIT_INTEREST(
|
||||
19), INCOME_FROM_GOODWILL_CREDIT_FEES(20), INCOME_FROM_GOODWILL_CREDIT_PENALTY(21);
|
||||
|
||||
private final Integer value;
|
||||
|
||||
@@ -75,7 +78,10 @@ public final class AccountingConstants {
|
||||
|
||||
FUND_SOURCE(1), LOAN_PORTFOLIO(2), INTEREST_ON_LOANS(3), INCOME_FROM_FEES(4), INCOME_FROM_PENALTIES(5), //
|
||||
LOSSES_WRITTEN_OFF(6), INTEREST_RECEIVABLE(7), FEES_RECEIVABLE(8), PENALTIES_RECEIVABLE(9), //
|
||||
TRANSFERS_SUSPENSE(10), OVERPAYMENT(11), INCOME_FROM_RECOVERY(12), GOODWILL_CREDIT(13);
|
||||
TRANSFERS_SUSPENSE(10), OVERPAYMENT(11), INCOME_FROM_RECOVERY(12), GOODWILL_CREDIT(13), INCOME_FROM_CHARGE_OFF_INTEREST(
|
||||
14), INCOME_FROM_CHARGE_OFF_FEES(15), CHARGE_OFF_EXPENSE(16), CHARGE_OFF_FRAUD_EXPENSE(17), INCOME_FROM_CHARGE_OFF_PENALTY(
|
||||
18), INCOME_FROM_GOODWILL_CREDIT_INTEREST(
|
||||
19), INCOME_FROM_GOODWILL_CREDIT_FEES(20), INCOME_FROM_GOODWILL_CREDIT_PENALTY(21);
|
||||
|
||||
private final Integer value;
|
||||
|
||||
@@ -125,7 +131,15 @@ public final class AccountingConstants {
|
||||
"penaltyToIncomeAccountMappings"), CHARGE_ID(
|
||||
"chargeId"), INCOME_ACCOUNT_ID(
|
||||
"incomeAccountId"), INCOME_FROM_RECOVERY(
|
||||
"incomeFromRecoveryAccountId");
|
||||
"incomeFromRecoveryAccountId"), INCOME_FROM_CHARGE_OFF_INTEREST(
|
||||
"incomeFromChargeOffInterestAccountId"), INCOME_FROM_CHARGE_OFF_FEES(
|
||||
"incomeFromChargeOffFeesAccountId"), CHARGE_OFF_EXPENSE(
|
||||
"chargeOffExpenseAccountId"), CHARGE_OFF_FRAUD_EXPENSE(
|
||||
"chargeOffFraudExpenseAccountId"), INCOME_FROM_CHARGE_OFF_PENALTY(
|
||||
"incomeFromChargeOffPenaltyAccountId"), INCOME_FROM_GOODWILL_CREDIT_INTEREST(
|
||||
"incomeFromGoodwillCreditInterestAccountId"), INCOME_FROM_GOODWILL_CREDIT_FEES(
|
||||
"incomeFromGoodwillCreditFeesAccountId"), INCOME_FROM_GOODWILL_CREDIT_PENALTY(
|
||||
"incomeFromGoodwillCreditPenaltyAccountId");
|
||||
|
||||
private final String value;
|
||||
|
||||
@@ -154,7 +168,15 @@ public final class AccountingConstants {
|
||||
"transfersInSuspenseAccount"), INCOME_ACCOUNT_ID(
|
||||
"incomeAccount"), INCOME_FROM_RECOVERY(
|
||||
"incomeFromRecoveryAccount"), LIABILITY_TRANSFER_SUSPENSE(
|
||||
"liabilityTransferInSuspenseAccount");
|
||||
"liabilityTransferInSuspenseAccount"), INCOME_FROM_CHARGE_OFF_INTEREST(
|
||||
"incomeFromChargeOffInterestAccount"), INCOME_FROM_CHARGE_OFF_FEES(
|
||||
"incomeFromChargeOffFeesAccount"), CHARGE_OFF_EXPENSE(
|
||||
"chargeOffExpenseAccount"), CHARGE_OFF_FRAUD_EXPENSE(
|
||||
"chargeOffFraudExpenseAccount"), INCOME_FROM_CHARGE_OFF_PENALTY(
|
||||
"incomeFromChargeOffPenaltyAccount"), INCOME_FROM_GOODWILL_CREDIT_INTEREST(
|
||||
"incomeFromGoodwillCreditInterestAccount"), INCOME_FROM_GOODWILL_CREDIT_FEES(
|
||||
"incomeFromGoodwillCreditFeesAccount"), INCOME_FROM_GOODWILL_CREDIT_PENALTY(
|
||||
"incomeFromGoodwillCreditPenaltyAccount");
|
||||
|
||||
private final String value;
|
||||
|
||||
+12
-14
@@ -27,18 +27,18 @@ import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.ws.rs.Consumes;
|
||||
import jakarta.ws.rs.DELETE;
|
||||
import jakarta.ws.rs.GET;
|
||||
import jakarta.ws.rs.POST;
|
||||
import jakarta.ws.rs.PUT;
|
||||
import jakarta.ws.rs.Path;
|
||||
import jakarta.ws.rs.PathParam;
|
||||
import jakarta.ws.rs.Produces;
|
||||
import jakarta.ws.rs.core.Context;
|
||||
import jakarta.ws.rs.core.MediaType;
|
||||
import jakarta.ws.rs.core.UriInfo;
|
||||
import java.util.List;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.fineract.accounting.financialactivityaccount.data.FinancialActivityAccountData;
|
||||
import org.apache.fineract.accounting.financialactivityaccount.service.FinancialActivityAccountReadPlatformService;
|
||||
@@ -50,12 +50,10 @@ import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
|
||||
import org.apache.fineract.infrastructure.core.serialization.ApiRequestJsonSerializationSettings;
|
||||
import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSerializer;
|
||||
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Path("/financialactivityaccounts")
|
||||
@Path("/v1/financialactivityaccounts")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Tag(name = "Mapping Financial Activities to Accounts", description = "Organization Level Financial Activities like Asset and Liability Transfer can be mapped to GL Account. Integrated accounting takes these accounts into consideration when an Account transfer is made between a savings to loan/savings account and vice-versa\n"
|
||||
+ "\n" + "Field Descriptions\n" + "financialActivityId\n" + "The identifier of the Financial Activity\n" + "glAccountId\n"
|
||||
+ "The identifier of a GL Account ( Ledger Account) which shall be used as the default account for the selected Financial Activity")
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user