http://test-example-memo.elasticbeanstalk.com/
- Maven 3 (
brew install maven
) - Java 8 (download site)
- Spring Boot (part of maven build, no install necessary)
- Postgres SQL (On cloud, no install necessary)
- build and test
mvn clean install
- run server
java -jar target/rest-0.0.1-SNAPSHOT.jar
- Visit http://localhost:8080/api to see supported API. It has inbuilt REST client for testing the endpoints. Click on Try it Out! when done with ready with Request Params.
- This application is being built using Spring-Boot Java Stack(Inbuilt TomCat. No Installation needed).
- This application is being built with TDD approach. Unit & Integration tests were considered during Test Driven development.
- Intgeration Tests deals with live data base while Unit Tests deals with Mocks and Embedded DB.
- REST Endpoints supports JSON and XML content response types.
Its recommended to test the endpoints using http://localhost:8080/api. For REST Based clients.
- Get Memos (GET) http://localhost:8080/api/data/1/memo?page=1&limit=10
- Get Memo by Id (GET) http://localhost:8080/api/data/1/memo/1
- Create Memo (POST) http://localhost:8080/api/data/1/memo
Accept: application/json
Content-Type: application/json
{
"title": "Some title",
"author": "Some author",
"text": "Some text"
}
- Update Memo (PUT) http://localhost:8080/api/data/1/memo/1
Accept: application/json
Content-Type: application/json
{
"id" : 1,
"title": "Some title",
"author": "Some author",
"text": "Some text"
}
- Delete Memo (DELETE) http://localhost:8080/api/data/1/memo/1
- Install IntelliJ Ultimate. IT can provide a license.
- Install Lombok and Sprint Boot plugins (IntelliJ > Preferences > Plugins)
- Install checkstyle-idea plugins (IntelliJ > Preferences > Plugins)
- To run/debug the app from IDE, select MemoBootApplication class, right-click and run or debug.
- Code Compile.
mvn clean compile
- Run CheckStyle
mvn clean checkstyle:checkstyle
- Run FindBugs
mvn clean compile findbugs:check
- Run Unit Test
mvn clean test
- Run Integration Test
mvn clean verify
- Make Build
mvn clean install
- Introduce code coverage tool like Jacoco to maintain code coverage.
- Add Jmeter profile to src/test/jmeter and configure the job in the pipeline.