Build App
./gradlew build
Run App
./gradlew bootRun
Run Test
./gradlew test
POST /account/v1/create
data-raw: owner [String]
{
"owner": "Burkay Durdu",
"accountNumber": "1746589712",
"createdAt": "2021-08-11T23:32:23.944977"
}
POST /account/v1/credit/{accountNumber}
data-raw: amount [Double]
{
"status": "OK",
"approvalCode": null
}
POST /account/v1/debit/{accountNumber}
data-raw: amount [Double]
{
"status": "OK",
"approvalCode": null
}
POST /account/v1/phoneBillPayment/{accountNumber}
data-raw:
amount [Double],
operator: [String],
phoneNumber: [String]operator: [VODAFONE, TURKCELL, TURK_TELEKOM]
{
"status": "OK",
"approvalCode": null
}
GET /account/v1/{accountNumber}
...
{
"accountNumber": "1746589712",
"owner": "Burkay Durdu",
"balance": 2800.0,
"createdAt": "2021-08-11T23:32:23.944977",
"transactions": [
{
"id": "d6cc52e2-511b-4dec-8b37-dd57087a301f",
"amount": 1451.5,
"createdAt": "2021-08-11T23:32:32.661976",
"type": "DepositTransaction"
},
{
"id": "19186b5d-2014-4d23-b534-e9c552dae2ce",
"amount": 51.5,
"createdAt": "2021-08-12T00:06:30.322633",
"type": "WithdrawalTransaction"
},
{
"id": "35aeaab6-b6f7-4e66-ae31-7094ea3124c3",
"amount": 51.5,
"createdAt": "2021-08-12T00:07:36.656753",
"type": "PhoneBillPaymentTransaction",
"operator": "TURKCELL",
"phoneNumber": "05418436167"
}
]
}
For further reference, please consider the following sections:
- Official Gradle documentation
- Spring Boot Gradle Plugin Reference Guide
- Create an OCI image
- Spring Web
- Spring Data JPA
- JDBC API
- Spring Boot DevTools
The following guides illustrate how to use some features concretely:
- Building a RESTful Web Service
- Serving Web Content with Spring MVC
- Building REST services with Spring
- Accessing Data with JPA
- Accessing Relational Data using JDBC with Spring
- Managing Transactions
These additional references should also help you: