- Java 11
- Gradle
- SpringBoot
- Spring Web
- Spring Data JPA
- Lombok
- H2 in-memory DB
- Flyway
- Spring Boot Test
- JUnit
- Mockito
- MockMvc
- Swagger API
- Application support H2 in-memory DB.
- DB data is pre-populated by Flyway, SQL scripts can be found here
There are multiple ways to run application
-
the default application.yaml will run profile h2
-
For Lombok, should enalble annotation processing in IntelliJ IDEA
- How to install gradle: https://gradle.org/install/
- Run the command to build the whole project: gradle clean build
- start the application with H2 in-mem DB: java -jar ./build/libs/telecom-demo-0.0.1-SNAPSHOT.jar --spring.profiles.active=h2
There is a relation: (1 customer: N phone numbers)
For getting all phone numbers, it means the data would be very large, so I use pagenation for this API, and only find activated phone numbers
Only find activated phone numbers of this customer
activate this customer's phone number
if you start the application successful, the Swagger API is here: http://localhost:8080/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config