To develop Muzix Application and perform the basic CRUD Operations and store in the H2 Database
Open the Postman and perform the various CRUD Operations in postman and check the H2 Database to check if the data is stored Consistently
*[Java] - The Programming Language used
*[Spring-Boot] - The web framework used
*[H2DB] - The database framework used
*[Maven] - Dependency Management
*[Postman] - To test the Api
Tasks to be Done
-
Complete all the endpoints for CRUD operations on Muzix2.
-
Use h2-console to view in-memory data3.
-
Add an endpoint to search trackByName. Understand @Query and parameter passing to@Query
-
Generate API documentation using Swagger 25.
-
Create custom exceptions TrackNotFoundException, TrackAlreadyExistsException in acom.stack....exceptions package. Perform appropriate exception handling and propagationBack.
-
Running Logic on Startup in Spring. Create seed data to pre-fill the database with trackinformation whenever the application starts. Use both approaches:Approach 1: ApplicationListenerApproach 2: CommandLineRunner (Find out how it differs from ApplicationRunner)
-
Global exception using Controller advice
-
Remove all hard coded data from the application code to application.propertiesa)by using @Value.b)by using @PropertySourcec)by using Environment(https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/core/env/Environment.html)
-
Add @Lombok
This is a Maven project with: Java version:11.0.1 and Spring Boot: 2.1.2
In this Project i have completed all the CRUD operations on Tracks. Database used is H2DB. Custom Exceptions are also included. Swagger for api documenting in spring is also included. Lombok is used to minimize domain entity code. Seed data to Pre fill DB on spring startup is included. Have used H2 console to view the data in database. Completed the logic to find track by name.
-
Clone the folder Muzix-Rest-H2DB to your local machine
-
Navigate to Muzix-Rest-H2DB folder
cd Muzix-Rest-H2DB -
Open it to the IntelliJ Idea and wait for the dependencies to be downloaded
-
Change the H2 Database in the application properties file
-
Now execute the TrackMain.java file
-
Open the Postman and Perform the various CRUD Operations
-
Open the H2 console and check the database, tables and data inserted into it through the various CRUD operations of the Rest Api
Thats It