File tree Expand file tree Collapse file tree 2 files changed +11
-26
lines changed Expand file tree Collapse file tree 2 files changed +11
-26
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ Spring Boot 3 と Spring Batch 5 を使用した、すぐに使えるバッチ
17
17
* Docker Desktop
18
18
* Gradle 8.5+(gradlewを使用する場合は不要)
19
19
20
-
21
20
> 💡 JDK 21が必要ですが、Gradleのツールチェーン機能により、ローカルにインストールされていなくても自動的にダウンロードされます。
22
21
23
22
## 🚀 クイックスタート
@@ -27,28 +26,21 @@ Spring Boot 3 と Spring Batch 5 を使用した、すぐに使えるバッチ
27
26
# リポジトリのクローン
28
27
git clone https://github.com/kinto-technologies/SpringBoot3BatchStarter.git
29
28
30
- # スケルトンバッチのビルドと実行
31
- cd skeletonBatch
32
- ../gradlew
33
- java -jar build/libs/skeletonBatch-* .jar
29
+ # スケルトンバッチの実行
30
+ ./gradlew :skeletonBatch:bootRun
34
31
```
35
32
36
33
### 2️⃣ DBとCSVのバッチを試す
37
34
38
35
``` bash
39
- # MySQLコンテナの起動
40
- cd ..
36
+ # MySQL 起動
41
37
docker compose up -d
42
38
43
- # ビルドと実行
44
- cd dbAndCsvBatch
45
- ../gradlew
46
-
47
- # DB→CSV出力の実行
48
- java -jar build/libs/dbAndCsvBatch-* .jar --spring.batch.job.name=DB_TO_CSV --spring.profiles.active=local
39
+ # DB to CSV 実行
40
+ ./gradlew :dbAndCsvBatch:bootRun --args=" --spring.batch.job.name=DB_TO_CSV --spring.profiles.active=local"
49
41
50
- # CSV→DB登録の実行
51
- java -jar build/libs/ dbAndCsvBatch- * .jar --spring.batch.job.name=CSV_TO_DB --spring.profiles.active=local
42
+ # CSV to DB 実行
43
+ ./gradlew : dbAndCsvBatch:bootRun --args= " -- spring.batch.job.name=CSV_TO_DB --spring.profiles.active=local"
52
44
```
53
45
54
46
---
Original file line number Diff line number Diff line change @@ -46,27 +46,20 @@ Both components are built with industry best practices and utilize the latest Sp
46
46
# Clone repository
47
47
git clone https://github.com/kinto-technologies/SpringBoot3BatchStarter.git
48
48
49
- # Build and run skeleton batch
50
- cd skeletonBatch
51
- ../gradlew
52
- java -jar build/libs/skeletonBatch-* .jar
49
+ # Build and Run
50
+ ./gradlew :skeletonBatch:bootRun
53
51
```
54
52
55
53
### 2️⃣ Try DB and CSV Batch
56
54
``` bash
57
55
# Start MySQL container
58
- cd ..
59
56
docker compose up -d
60
57
61
- # Build and run
62
- cd dbAndCsvBatch
63
- ../gradlew
64
-
65
58
# Run DB to CSV export
66
- java -jar build/libs/ dbAndCsvBatch- * .jar --spring.batch.job.name=DB_TO_CSV --spring.profiles.active=local
59
+ ./gradlew : dbAndCsvBatch:bootRun --args= " -- spring.batch.job.name=DB_TO_CSV --spring.profiles.active=local"
67
60
68
61
# Run CSV to DB import
69
- java -jar build/libs/ dbAndCsvBatch- * .jar --spring.batch.job.name=CSV_TO_DB --spring.profiles.active=local
62
+ ./gradlew : dbAndCsvBatch:bootRun --args= " -- spring.batch.job.name=CSV_TO_DB --spring.profiles.active=local"
70
63
```
71
64
72
65
## 📁 Project Structure
You can’t perform that action at this time.
0 commit comments