This project is a template for a Spring Boot application, designed to streamline the setup and deployment process. It includes a basic structure for a RESTful API, integration with Maven for build automation, and instructions for running the application locally. The code base has been built on the Model View Controller Architecture.
If anyone simply wants to start building api, simply copy down the source code and follow the following steps.
1. Configure incoming Object Type in the ```src/java/com/{project-name}/dto/``` folder.
2. Configure the API Configuration in the ```src/java/com/{project-name}/controller/``` in the Api Controller.
3. Write down Any Tests for any business logic in the ```test/java/com/{project-name}/ service/``` folder.
4. Write down the logic for the Service in ```src/java/com/{project-name}/service/``` folder.
All the above code samples have been provided.
Any issues have been record in the issues section of the repo.
/{project-name}
├── src
│ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ └── cloudmersive
│ │ │ └── controller
│ │ │ | └── ApiController.java ## Configure all HTTP Request here
│ │ │ └── service ## Add all Buisness logic Transformations here
│ │ │ └── dto ## Configure, Incoming JSON Format for Controllers
| | │
│ │ └── resources
│ │ └── application-dev.properties ## Configure Springboot Profile Environment Variales
│ └── test
│ ├── java
│ │ └── com
│ │ └── cloudmersive
│ │ └── service ## All the tests for all the buisness logic transformations
│ └── resources
├── .gitignore
├── pom.xml ## Maven Config
└── README.md ## You Should read this
Run the following command docker-compose --profile dev up --build --watch .
Run docker compose --profile test up --watch, which will launch the server in hot reload mode
Will have to check container logs, to review the tests of the results.
Note : You cannot query the API in this mode, this is specifically designed for CI/CD purposes to ensure that it can be ensured that all tests are passing.
Simply docker-compose --profile prod up, after copying down the source code, and ensuring that docker is installed on the production server.
Technically Docker & Docker compose handles all this for us.
- Build with all the latest Changes using Maven
maven clean package - Launch the Springboot Server
java -jar target/cloudmersive-interview-1.0-SNAPSHOT.jar
If you change the name of the project, make sure to also change it from the pom.xml file.
Copy down the XML info, into the pom.xml file, and then let the container rebuilt. In dev and test mode, it will automatically rebuild.
Currently the repo is set to use JUnit Framework to unit test the code base.