Home Spring boot Spring Boot Project using Mysql Database

Spring Boot Project using Mysql Database

18 min read
0
1
1,437

This Spring Boot tutorial will teach you how to do basic database functions that are CREATE RETIEVE UPDATE and DELETE . using Mysql Database. The INSERT, SELECT, UPDATE and DELETE statements can be used in any database system, because this is support by all relational database systems.

We will learn how to INSERT, SELECT, UPDATE and DELETE in database by writing code to manage the Employee table in the database named gcompany student table consist of following columns id,ename,mobile,salary

 

The package structure, you must following the standard package structure of spring boot and spring framework.for the example i have created the project name gcompany

 

when you create the spring boot application by default gCompanyApplication.java is created

First you must Create the package com.example.gcompany.service . inside the package you have to create the class

EmployeeService.java

after that you have to Create the package com.example.gcomany.controller . inside the package you have to create the class

EmployeeController.java

First you must Create the package com.example.gcompany.repository inside the package you have to create the class

EmployeeRepository.java

First you must Create the package com.example.gcompany.domain inside the package you have to create the class

Employee.java

after that you have to create the index.html page inside the src/main/resources inside the package you have a templates folder inside the folder you must create index.html page

inside the folder create the another file new.html

 

Load More Related Articles
Load More By admin
Load More In Spring boot

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also

Sales Transaction Management in Java Mysql

The set of one or more sql statements that are executed as a single unit called as transac…