File tree Expand file tree Collapse file tree 3 files changed +22
-17
lines changed Expand file tree Collapse file tree 3 files changed +22
-17
lines changed Original file line number Diff line number Diff line change 3232
3333 - name : Wait for MySQL to be ready
3434 run : |
35- echo "Waiting for MySQL to be ready..."
36- for i in {1..10}; do
37- if mysqladmin ping -h 127.0.0.1 --silent; then
38- echo "MySQL is ready!"
39- break
40- fi
41- echo "MySQL not ready yet. Retrying in 5 seconds..."
42- sleep 5
35+ until mysqladmin ping -h 127.0.0.1 --silent; do
36+ echo "Waiting for MySQL to be ready..."
37+ sleep 2
4338 done
4439
4540 - name : Set up JDK 17
4944 java-version : ' 17'
5045
5146 - name : Build with Gradle
52- run : ./gradlew build
47+ run : ./gradlew build
48+
49+ - name : Run skeletonBatch
50+ run : ./gradlew skeletonBatch:bootRun
51+
52+ - name : Run dbAndCsvBatch to Export Data to CSV
53+ run : ./gradlew dbAndCsvBatch:bootRun --args="--spring.profiles.active=local --spring.batch.job.name=DB_TO_CSV"
54+
55+ - name : Run dbAndCsvBatch to Import Data from CSV
56+ run : ./gradlew dbAndCsvBatch:bootRun --args="--spring.profiles.active=local --spring.batch.job.name=CSV_TO_DB"
Original file line number Diff line number Diff line change 33 url : jdbc:mysql://localhost:3306/sampledb
44 username : sampleuser
55 password : samplepassword
6- jpa :
7- hibernate :
8- ddl-auto : none
9- show-sql : true
6+ driver-class-name : com.mysql.cj.jdbc.Driver
7+ batch :
8+ job :
9+ names : DB_TO_CSV
Original file line number Diff line number Diff line change 1- version : " 3.8"
2-
31services :
42 mysql :
53 image : mysql:latest
6- container_name : mysql-container
4+ container_name : mysql-container-dev
75 ports :
86 - " 3306:3306"
97 environment :
@@ -18,4 +16,7 @@ services:
1816 interval : 10s
1917 timeout : 5s
2018 retries : 5
21- restart : always
19+ restart : always
20+ networks :
21+ default :
22+ name : springboot3batchstarter_default
You can’t perform that action at this time.
0 commit comments