-
Java - 1.8.x
-
Maven - 3.x.x
-
Mysql - 5.x.x
1. Clone the application
git clone https://github.com/eaingaran/devops-app.git
2. Create Mysql database
bash create database notes
3. Change mysql username and password as per your installation
-
open
src/main/resources/application.properties
-
change
spring.datasource.username
andspring.datasource.password
as per your mysql installation
4. Build and run the app using maven
mvn package
java -jar target/devops-app-1.0.0.jar
Alternatively, you can run the app without packaging it using -
mvn spring-boot:run
The app will start running at http://localhost:8080.
The app defines following CRUD APIs.
GET /api/notes
POST /api/notes
GET /api/notes/{noteId}
PUT /api/notes/{noteId}
DELETE /api/notes/{noteId}
You can test them using postman or any other rest client.
This is a simple DataOps attempt using Liquibase..
mvn liquibase:update
mvn liquibase:updateSQL
mvn liquibase:rollback -DrollbackCount=1
mvn liquibase:rollbackSQL -DrollbackCount=1
mvn liquibase:futureRollbackSQL
mvn liquibase:generateChangeLog -Dliquibase.diffTypes=data -DoutputChangeLogFile=output.xml