Spring Boot Tutorial With Project |Part 1
We’ll learn everything there is to know about the Spring Boot framework for Java developers.
We’ll build a spring boot project in this tutorial that has CRUD (Create, Read/Retrieve, Update, Delete) APIs. We’re going to connect to a real database and use three layers in this system, and we’ll see how it works.
For those who want to use Java to create back-end or full-stack apps, Spring Boot is an excellent framework.
Now we are ready to create an application which consists of various Entity , various variable and inter-relation between them.
Project Architecture
Controller -> Service -> Repository ->Database
Our REST APIs will be in the controller. Business logic will be present in the Service Layer. Repository(DAO) layer will have logic to communicate with the database.
Now that we have a project structure, let’s construct a package. We’ll develop layers for the controller , entity, services, and repositories.
In this tutorial we are learning an Blog Application which based on web and for that we are using java language ,Springboot as a framework and for database connectivity we have Mysql. Now lets with the basic creating Architectureof application for that we start with entites for application User,Post,Role,Category,Comment will be our 5 entity for our project. Which have there own variables in it and they connected with each other with help of some relation.
Our first entity will be User which consists of id , name , e-mail, password and about user .
Our second entity will be Category which consists of CategoryId and category description .This entity will help us to know about the blog category which help user to distinguish what category user is in interseted to read articles/blogs.
Next entity is Post which help user to upload any post related to his/her content he wants to publish on application. It consists of title , content, imageName, addedDate which help us to maintain record of user and its content uploaded by them on application.
Next entity will be Role which is based on role based in application such as admin, premium user ,non-premium user. Role enitiy consists of id and name.
Next enitity will be comment which are based on post an user is posting it can have Multiple comments to maintain that we have created an seperate entity which have unique id based on post and content written in it.
I have build this in an particular package on our project to avoid any confusion.
Blog Application ER model .
We will start developing project further in next part .If you like to read these kind of tutorial and have common interest in similar projects then we can grow our network and can work for more real time projects.
For more details connect with me on my Linkedin account!
THANKS!!!!