How do you do a spring boot with CRUD? Spring Boot, MySQL, JPA, Hibernate Restful CRUD API Example
HTML-код
- Опубликовано: 18 окт 2024
- #springbootcrudoperations #crud
Which are valid annotations to perform CRUD operations in Spring REST API?
How do you do a spring boot with CRUD?
Hi Friends,
In this video we going to create complete springboot application with all CRUD Operations . We are using below dependencies
1. Spring Web
2. MySql connector driver
3. Spring data Jpa
We have used mysql , hibernate and data jpa in this example.
hello World Springboot rest API : • #springboot #restapi S...
How to write rest api to return java bean and list video url : • #springboot #restapi #...
How to connect springboot application to database : • #springboot #mysql How...
#springbootcrudexample #springboot #sjprogrammingsolutions
For more videos please subscibe to the channle.
Thank you All !!
Thank You for this video lecture ,it helped me a lot to understand the basic idea of springboot and its connection with DB .
Very good video . This type of video I was searching for long time which explains a complete project in such a nice way. Thank you
It's really Great Session Mam...The way you explain all this line by line with full explanation it's really Great mam🥳🙏😇👍
mam,this vedio is so helpful for me.Thanks a lot mam
This was a great tutorial, highly appreciate it!
However in Employeecontroller you should not set the Id in the updateEmp method as it is the Primary Key.
Awesome mam, your way of teaching is amazing, simple, and easy to understand. I really liked it.🥳🙏😇👍
Hello Sujit, thank you !
Mamm which sts version you are using I am not getting spring boot 2.6.3 in my sts
Hello , I was using Version: 4.16.1.RELEASE
there is an error due to java --> jakarta persistence API.. how to use jakarta?
Mam can you please share the list. what dependencies you are added in Pom.Xml
Hello Prakash , This are the dependencies i have added .
Spring data JPA
Spring web
Mysql connector
@@SJProgrammingSolutions thank you Mam
hey , I am getting 500 internal error ""Consider defining a bean of type 'com.rest.api.service.EmployeeService' in your configuration."" this what should I do. I did exact same thing
Did you added @Service annotation?
Had the same, drives me crazy and didn't get it working, but i did circumvent the problem by just ignoring the EmployeeService interface:
@RestController
@RequestMapping("/emp")
public class Employeecontroller {
@Autowired
EmployeeRepository repo;
@PostMapping("/save")
public Employee saveEmployee(@RequestBody Employee emp) {
return repo.save(emp);
}
}
can you please share the code file
Mam I got a error exception during pool initialization
Hello , please share screenshot of exception on Instagram id : sjprogramming
@@SJProgrammingSolutions yes mam I already did plz check
can you share the solution?
@@santosh2048 don't ask her it's been a 3 month still she won't gave me reply I took screenshot shot also n share with her insta I'd but they didn't give a damm better you can go stack over flow site nd find the solution don't waste your time here
I have got an issue - Error creating bean with name 'employeeRepository' defined in com.example.repository.EmployeeRepository defined in @EnableJpaRepositories declared on MySqlExampleApplication: Not a managed type: class com.example.entity.Employee
How to solve this ?
Hi Madam.. Thank you for uploading this video. But I am having error with description : "Field employeeService in com.demoprojectCrudOperations.controller.EmployeeController required a bean of type 'com.demoprojectCrudOperations.service.EmployeeService' that could not be found. " Did exactly what you explained. Please suggest the resolution.
Hello Vishnu, did you added @Autowired on employeesService ? Please check and if still you are getting error then share the screenshot of error on sjprogrammingsolutions@gmail.com mail will check . Thank you
Hi mam i sent my error in ur instagram. Can u check and suggest me how to fix this
I have followed same code u did. But i got error
Done, Thank you.
Hi mam
I am facing this issue can you pls help.
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
[2m2023-03-17T01:15:21.918+05:30[0;39m [31mERROR[0;39m [35m18836[0;39m [2m---[0;39m [2m[ restartedMain][0;39m [36mo.s.b.d.LoggingFailureAnalysisReporter [0;39m [2m:[0;39m
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
Action:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
Hello Suraj, It seems you have not configured spring.datasource.url property in your application.properties file