Connecting with Database using JPA | Spring Boot Rest API tutorial | Spring boot tutorial
Vložit
- čas přidán 28. 08. 2020
- Connecting with Database using JPA | Spring Boot Rest API tutorial | Spring boot tutorial
#springboot #spring boot tutorial
Download Source Code: learncodewithdurgesh.com/cour...
Spring-boot full playlist: • Spring Boot Tutorial i...
Spring MVC playlist: • Spring MVC Tutorial St...
Spring framework playlist: • Spring Framework Tutor...
MySQL in one video: • Learn MySQL in one vid...
Telegram Link for Doubt: t.me/learncodewithdurgesh
Important Videos:
➡️React JS with Project: • 🔥 🔥 Complete React Js ...
➡️Learn JDBC in one video: • JDBC Crash Course in 1...
➡️Learn Python in One Video: • Learn Python in One Vi...
➡️Learn HTML in one video: • Jquery in one video in...
➡️Learn HTML form in one video: • Jquery in one video in...
➡️Learn JavaScript in one videos: • Learn JavaScript in O...
➡️Learn Form Validation using javascript and jquery: • Form Validation using ...
➡️Learn CSS in one video: • Jquery in one video in...
➡️Jquery in one video: • Jquery in one video in...
➡️Kotlin is one video: • Kotlin | Learn Kotlin ...
➡️Complete Python Project - CZcams downloader in one video: • Jquery in one video in...
Important Playlist:
➡️Spring Boot Tutorial with Project : • Spring Boot Tutorial i...
➡️Spring MVC Tutorial: • Spring MVC Tutorial St...
➡️Complete Spring Framework Tutorial: • Spring Framework Tutor...
➡️Hibernate Tutorials: • Hibernate Tutorial for...
➡️E-Commerce Project using Java: • E-Commerce Project usi...
➡️AWS Free Java Hosting Playlist: • AWS Hosting Tutorial |...
➡️Hibernate Tutorial Playlist: • Hibernate Tutorial for...
➡️Learn Technology in One Vides: • Learn in one video : C...
➡️Programming Tips for Programmers: • Coding Tips and Discus...
➡️Complete Python for Beginners: • Complete Python Tutori...
➡️Important Python Projects: • Python Projects in Hindi
➡️Complete Servlet & JSP : • Servlet and Jsp (Serve...
➡️Complete JDBC ( Java Database Connectivity) : • JDBC(Java Database Con...
➡️Complete Java Project : TechBlog: • Full Java Advance Pro...
➡️Java Swing Projects: • Java Projects for begi...
➡️Java Core Concepts: • Java Core Tutorial
➡️Kya aap Jante hai Series: • kya app jante hai : s...
Important Links:
👉Official Website (Source Code): learncodewithdurgesh.com/
👉Telegram Discussion Group: t.me/learncodewithdurgesh
👉Follow me on Instagram: / durgesh_k_t
👉Follow on Facebook / learncodewithdurgesh
Gear that I use:
Gears that I Use:
Lenovo Ideapad S145 AMD Ryzen 5 15.6
amzn.to/33Vvxu2
Mic for Recording
amzn.to/305hgtr
amzn.to/2EyFMfa
Disclaimer:
All videos are for educational purposes and use them wisely. Any video may have a slight mistake, please take decisions based on your research. This video is not forcing anything on you.
bro there are some people they just want to earn money by youtube and some time they don't explain many things and skip. you are not one of them. you are explaining every thing i am understanding everything step by step.
Thank you so much for this amazing tutorial.
Sir ... I am big fan of you... I have learnt basic idea from you and easily how can we write a program. Just sir Awesome.... your style is unique. like a primary key ... not possible anything without you.....Sir please help us to get videos for programming in java for preparing product base company like Google, Microsoft, facebook etc. I am dame sure if I get basic product base company programming's videos then we can clear all rounds. Sir please help.........Thanks from my heart and love u always....
Thank you brother it worked..!
Thank you Sir, very helpfull videos
for mysql default port is 3306 , you have taken 3307 it will throw error on compile time . Happened same with me then i changed to 3306 back
Thanks You for this man!
3306 is the default port number provided by MySQL.
Thanks bro, I was also stuck there
Now i am so happy for not using fake service Thanks
superb content
Superb bro😮
Thank you so much sir..............
Thank you sir
sir u are amazing
Hello sir. one dout here , how the oject of bookrepo is being created and you haven't used any annotation niether @Component ,@Service nor @Repository. Please reply
bookrepository is an interface and its implementation class object will be created by IOC Container . I think
VERY NICE SIR
If we have any id having data type as String still while writing entities wr will mention as ID as a primary key?
Can u pls help me in uploading and downloading PDFs,images to MySQL database using spring boot.....I have tried some methods bt methods are not working and also I am not getting any exceptions for which I am not able to detect the bug in my code....pls help....
thanks sir
Good one
sir i got error while creating the book using POST. It shows me NullPointerException but after using try and catch block data is not saving in the youtube_api's book table
Getting same problem. If anyone know then help me please
at the end data base mai data insert krna hai and retrive bhi toh staic list se achha woh yahi video se sikh lete the hum log and rahi bat other concepts ki woh bhi issi video mai clear ho jate thee.........mia 18 se 22 videos ki bat kr raha hu. please comment on it durgesh sir
Hello Durgesh,
You made a change in @GetMapping getBooks(--). But you did the post in postman and got the 201 Created Status(19-23)
please make tutorial with Redis Cache, It will be too helpful
what if i want to store one jsp form data to multiple entity class!??
sir am waiting for the make the project via spring boot for fast development
sir please deal with query with multiple databases in spring boot
Sir can you make video same curd operation using visual Studio code ide but all the jar files should be ofline
great++++++
Sir why are we not marking the bookRepository as @Component as we @autowire it in bookService ?
yes , i made @Repository in BookRepository class , otherwise i was getting some error in service class
Sir how to get default page while launching the application.... without changing the url manually.....
Sir i have many problem to install my sql on my windows 8 32 bit .
how to decide which maven dependency to add
Sir please start MongoDB lecture series
Sir plz spring transaction pr video bnaiye
Sir, I am not getting @Entity and @GeneratedValue annotations im my IDE, How to get it?
Sir I want to create custom primary key using JPA in spring boot
sir why i am not getting autosuggestion in application.properties file else its working fine in other parts of project please tell me i am a big fan of your 🤧
R u using Spring Suit tool ?
Hello sir, do you know how to configure connection with druid database
How do you have so vast knowledge on so many technologies?
ma'em could you please help me in this regards ?
why you created the findById method sir! isn't it the default method of CrudRepository interface?
Please let me know this ans.
I have the same doubt that CrudRepository is an interface itself by why you have written body of FindById() as we know that we can get this method by CrudRepository itself.
Please ans
sir is this ths end of spring boot?
please did this with h2 memory database
java.lang.IllegalArgumentException: Entity must not be null show error please tell me sir how to solve this problem
Can any one explain why there is need of creating an abstract method findbyId specially in interface while others methods like save, deleteById is method is not declare in interface and my compiler is also shown error.
yes , it is because save() return type is Entity class . deleteById() return type is void . But findById() retrun type is Optional , so basically, we are overriding this method in interface by giving return type as Entity class .
if u give password to my sql then we write in app properties root as a password, if u dont give any password then dont write it it give u error.
Hey if your database value not inserted than you use the your Book repository interface @Repository annotation than problems is solve try this....👈🌟
Sir i am getting empty object though i hv data in database.. It is not showing any error and the statuses are correct.. But it is returning empty objects.. Plz help..
mere m white label error arhi h
add method ka requestmapping ("/book") check karo , mera ye hai
tumhara dekhlo controller me jakr then postman me post select kro
@Durgesh sir ,
Please ap ye doubt clear kro ke apne CrudRepository m FindById () q use keya h apne ?
CrudRepository is an interface and it contains implementation of create,read/retrieve, update and delete then what is the use to just providing body of FindById () in CrudRepository interface.
Anyone please help me here
CrudRepository have FindById of type Optional but we need of type Book
Bro it’s a custom finder method please watch the previous video
I am getting an error under //get all books on line 29 saying Cannot cast from Iterable to List tried multiple times getting the same please help me to get through this issue
See I think it’s not possible because we can’t cast parent class obj into child class
Make sure you are not autowiring static variable it will fail.
sir next video kb aayge
why did we make find book by id in the repository and not in service??
We can make it , but we will have one problem as findById() returns Optional but we need entity class object .So method overriding happened in repository class .
U explained very well.....thank u......
But i hv question how do we handle with 2 db.
you have to add @Configuration and have two separate configuration for each dbs
Hello sir,
Yaha par photos ko kaise upload kare ?
Thank you sir
Sir database connection m problem ho rha h help kryega ?
What is mean by iterable
here you are not taking Optional when using findById() function
Agar update mai aise I'd update krege to database mai faltu entries badh jayegi
sir BookRepository ka object kaise ban skta hai bo to interface hai and BookRepository k upar koi annotation bhi nhi lagayi jabki BookService ko Autowired kiya hai BookController me to BookService k upar apne @component annotation use ki hai ..................Any one help me plz
use @Repository annotation on top of BookRepository class
I think it should work without annotation on Repository interface. Perhaps you have not made the dao package with the right path like com.api.book.dao.BookRepository. That was my problem and after the right path, I didn't get error like "Consider defining a bean of type 'dao.BookRepository' in your configuration."
@Service bhi use kro ge toh obj ban jaaye ga
sir can you upload this raw code
In application.properties this line needs to be added-->spring.jpa.hibernate.ddl-auto=create, else error is coming that table not found
hy i am sunny kosle i am getting some problem can you please fix my bugs
Why someone will buy your source code, while other youtube are giving free and you are asking student to pay for source code, Teacher.
sir source code kha mile ...kisi ko pta h toh plz btaae
sir update karne ke bad entry duplicate ban ja rahi hai ..aur kisika ho rah h aisa
Bhai vo islie ho rha kyunki jo book ki id hai vo auto generated hai toh agr hm kuch b update krte hai to tun book ki id ya toh vo wali id daalo jis book ko update kr rhe ho aur vo id data base me same ho...
Kyunki database me book ki id 1,2,3 bn rhi hai naa ki jo hum de rhe hai jaise 12, 24 ye nhi hai book id ...
Hope so tum smze hoge...
make sure ke URL me jo id hai aur body me jo id hai vo dono same ho
SIR MERE CODE TABLE NAHI BAN RAHI
what is 3307 here?
Worst IDE VS code ...I am not able to code properly
Bro im dislikin it. Only bcz of many ads
Sir I got the error (required a bean of type com.tushar.myappvs.dao.boorepository )that could not be found
500,
"error": "Internal Server Error",
"trace": "java.lang.StackOverflowError
\tat com.ram.api.Controller.MyController.addcourse(MyController.java:38)
\tat com.ram.api.Controller.MyController.
sir i am facing thids error , how can i solve it. please reply me sir .
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
Thank you sir