Connecting with Database using JPA | Spring Boot Rest API tutorial | Spring boot tutorial

Sdílet
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.

Komentáře • 112

  • @shoiabalam2170
    @shoiabalam2170 Před 8 měsíci +1

    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.

  • @AkashVerma-hi3uq
    @AkashVerma-hi3uq Před 2 lety

    Thank you so much for this amazing tutorial.

  • @GopalDas-sw6ym
    @GopalDas-sw6ym Před rokem

    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....

  • @rahemanrf5775
    @rahemanrf5775 Před rokem +1

    Thank you brother it worked..!

  • @ManojKumar-tj4lg
    @ManojKumar-tj4lg Před rokem

    Thank you Sir, very helpfull videos

  • @rohandxt17
    @rohandxt17 Před 2 lety +6

    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

  • @mohammadshahul9026
    @mohammadshahul9026 Před 2 lety

    Now i am so happy for not using fake service Thanks

  • @gulshanrajput5956
    @gulshanrajput5956 Před 3 lety

    superb content

  • @abhinavborkar6296
    @abhinavborkar6296 Před rokem

    Superb bro😮

  • @Vinu-Arts
    @Vinu-Arts Před 10 měsíci

    Thank you so much sir..............

  • @sameerkadgaye3745
    @sameerkadgaye3745 Před 3 lety

    Thank you sir

  • @piyushthakur2019
    @piyushthakur2019 Před 10 měsíci

    sir u are amazing

  • @prashantrajput8471
    @prashantrajput8471 Před 2 lety +3

    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

    • @sunnykakrani7830
      @sunnykakrani7830 Před 2 lety +1

      bookrepository is an interface and its implementation class object will be created by IOC Container . I think

  • @suficst6941
    @suficst6941 Před 2 lety

    VERY NICE SIR

  • @nainitalhills4280
    @nainitalhills4280 Před rokem

    If we have any id having data type as String still while writing entities wr will mention as ID as a primary key?

  • @biswabijayeechandrasekhara4506

    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....

  • @krishnaxettrt7625
    @krishnaxettrt7625 Před 3 lety

    thanks sir

  • @adityajaiswal5603
    @adityajaiswal5603 Před 7 měsíci

    Good one

  • @pawansingh-xo1iz
    @pawansingh-xo1iz Před 2 lety +7

    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

  • @akadeadahot7067
    @akadeadahot7067 Před rokem

    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

  • @rajanpokhrel7825
    @rajanpokhrel7825 Před 3 lety +2

    Hello Durgesh,
    You made a change in @GetMapping getBooks(--). But you did the post in postman and got the 201 Created Status(19-23)

  • @anshul90100
    @anshul90100 Před 2 lety

    please make tutorial with Redis Cache, It will be too helpful

  • @tushar351
    @tushar351 Před 3 lety

    what if i want to store one jsp form data to multiple entity class!??

  • @gulshanrajput5956
    @gulshanrajput5956 Před 3 lety

    sir am waiting for the make the project via spring boot for fast development

  • @pankajsharma-rf1ov
    @pankajsharma-rf1ov Před 3 lety

    sir please deal with query with multiple databases in spring boot

  • @danishchaush3000
    @danishchaush3000 Před 3 lety

    Sir can you make video same curd operation using visual Studio code ide but all the jar files should be ofline

  • @prashantbhawsar7186
    @prashantbhawsar7186 Před 2 lety

    great++++++

  • @miitthakar9117
    @miitthakar9117 Před rokem +2

    Sir why are we not marking the bookRepository as @Component as we @autowire it in bookService ?

    • @poojarath7087
      @poojarath7087 Před 26 dny

      yes , i made @Repository in BookRepository class , otherwise i was getting some error in service class

  • @neerajpandey8499
    @neerajpandey8499 Před 3 lety

    Sir how to get default page while launching the application.... without changing the url manually.....

  • @funnyvideorocks
    @funnyvideorocks Před 3 lety

    Sir i have many problem to install my sql on my windows 8 32 bit .

  • @anshuakansha2976
    @anshuakansha2976 Před 2 lety

    how to decide which maven dependency to add

  • @shashankingle22
    @shashankingle22 Před 3 lety

    Sir please start MongoDB lecture series

  • @manojbhale6081
    @manojbhale6081 Před 3 lety

    Sir plz spring transaction pr video bnaiye

  • @user-dg6zm7yn1x
    @user-dg6zm7yn1x Před 7 měsíci

    Sir, I am not getting @Entity and @GeneratedValue annotations im my IDE, How to get it?

  • @akhilgupta6926
    @akhilgupta6926 Před 2 lety

    Sir I want to create custom primary key using JPA in spring boot

  • @asynccoder7675
    @asynccoder7675 Před rokem +2

    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 🤧

  • @yogesh7569
    @yogesh7569 Před 10 měsíci

    Hello sir, do you know how to configure connection with druid database

  • @susmithanadar4034
    @susmithanadar4034 Před rokem +1

    How do you have so vast knowledge on so many technologies?

    • @mohdarsalan7195
      @mohdarsalan7195 Před 4 měsíci

      ma'em could you please help me in this regards ?

  • @AbidHussain-vo9cw
    @AbidHussain-vo9cw Před 3 lety +1

    why you created the findById method sir! isn't it the default method of CrudRepository interface?

    • @rahulprasad7400
      @rahulprasad7400 Před 2 lety

      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

  • @RanveerSingh-yz3fv
    @RanveerSingh-yz3fv Před 3 lety

    sir is this ths end of spring boot?

  • @omkaramrutdash6704
    @omkaramrutdash6704 Před 2 lety

    please did this with h2 memory database

  • @santoshyadav11111
    @santoshyadav11111 Před rokem

    java.lang.IllegalArgumentException: Entity must not be null show error please tell me sir how to solve this problem

  • @ritikrstgi
    @ritikrstgi Před 5 měsíci +1

    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.

    • @poojarath7087
      @poojarath7087 Před 26 dny

      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 .

  • @harshshub
    @harshshub Před měsícem

    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.

  • @sscode3809
    @sscode3809 Před 10 měsíci

    Hey if your database value not inserted than you use the your Book repository interface @Repository annotation than problems is solve try this....👈🌟

  • @ashishsenapati3901
    @ashishsenapati3901 Před 3 lety +1

    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..

    • @national3737
      @national3737 Před 3 lety

      mere m white label error arhi h

    • @priyankchaturvedi7296
      @priyankchaturvedi7296 Před 3 lety

      add method ka requestmapping ("/book") check karo , mera ye hai
      tumhara dekhlo controller me jakr then postman me post select kro

  • @rahulprasad7400
    @rahulprasad7400 Před 2 lety

    @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

    • @user-ts4ul7xc8f
      @user-ts4ul7xc8f Před rokem +1

      CrudRepository have FindById of type Optional but we need of type Book

    • @BGMICLASHES
      @BGMICLASHES Před 8 měsíci +1

      Bro it’s a custom finder method please watch the previous video

  • @shadovekiller8688
    @shadovekiller8688 Před rokem

    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

    • @BGMICLASHES
      @BGMICLASHES Před 8 měsíci +1

      See I think it’s not possible because we can’t cast parent class obj into child class

  • @user-tj2su6my2e
    @user-tj2su6my2e Před 9 měsíci

    Make sure you are not autowiring static variable it will fail.

  • @ishusuryavanshi8435
    @ishusuryavanshi8435 Před 3 lety

    sir next video kb aayge

  • @mayankrajput5458
    @mayankrajput5458 Před 2 lety

    why did we make find book by id in the repository and not in service??

    • @poojarath7087
      @poojarath7087 Před 26 dny

      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 .

  • @RohitYadav-yl9jr
    @RohitYadav-yl9jr Před 3 lety +1

    U explained very well.....thank u......
    But i hv question how do we handle with 2 db.

    • @GajananaGanjigatti
      @GajananaGanjigatti Před 2 lety

      you have to add @Configuration and have two separate configuration for each dbs

  • @nishanthedaoo8937
    @nishanthedaoo8937 Před 3 lety

    Hello sir,
    Yaha par photos ko kaise upload kare ?
    Thank you sir

  • @mdmobashermoin6531
    @mdmobashermoin6531 Před 3 lety

    Sir database connection m problem ho rha h help kryega ?

  • @hrushikeshshinde9527
    @hrushikeshshinde9527 Před 6 měsíci

    What is mean by iterable

  • @harshitgupta2872
    @harshitgupta2872 Před rokem

    here you are not taking Optional when using findById() function

  • @sachinkumarrajput5450
    @sachinkumarrajput5450 Před 2 lety

    Agar update mai aise I'd update krege to database mai faltu entries badh jayegi

  • @shubhamjain5369
    @shubhamjain5369 Před 3 lety

    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

    • @pritamsamanta9298
      @pritamsamanta9298 Před 3 lety

      use @Repository annotation on top of BookRepository class

    • @grandselenium296
      @grandselenium296 Před 2 lety +1

      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."

    • @Him857
      @Him857 Před 2 lety

      @Service bhi use kro ge toh obj ban jaaye ga

  • @premtanmay1857
    @premtanmay1857 Před 5 měsíci

    sir can you upload this raw code

  • @rashmimaulekhi2962
    @rashmimaulekhi2962 Před 3 lety +1

    In application.properties this line needs to be added-->spring.jpa.hibernate.ddl-auto=create, else error is coming that table not found

    • @sunnykosle8865
      @sunnykosle8865 Před 3 lety

      hy i am sunny kosle i am getting some problem can you please fix my bugs

  • @Yash_Jain06
    @Yash_Jain06 Před 3 měsíci

    Why someone will buy your source code, while other youtube are giving free and you are asking student to pay for source code, Teacher.

  • @RanveerSingh-yz3fv
    @RanveerSingh-yz3fv Před 3 lety

    sir source code kha mile ...kisi ko pta h toh plz btaae

  • @himanshuvaishya9164
    @himanshuvaishya9164 Před 9 měsíci

    sir update karne ke bad entry duplicate ban ja rahi hai ..aur kisika ho rah h aisa

    • @neerajgarg9096
      @neerajgarg9096 Před 8 měsíci

      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...

    • @aabhasjain96
      @aabhasjain96 Před 7 měsíci

      make sure ke URL me jo id hai aur body me jo id hai vo dono same ho

  • @aniketverma3615
    @aniketverma3615 Před 11 měsíci

    SIR MERE CODE TABLE NAHI BAN RAHI

  • @travis3366
    @travis3366 Před rokem

    what is 3307 here?

  • @umeshwalunjkar7682
    @umeshwalunjkar7682 Před 7 měsíci

    Worst IDE VS code ...I am not able to code properly

  • @kvnagendra5354
    @kvnagendra5354 Před 2 lety

    Bro im dislikin it. Only bcz of many ads

  • @tusharbaranwal7661
    @tusharbaranwal7661 Před rokem

    Sir I got the error (required a bean of type com.tushar.myappvs.dao.boorepository )that could not be found

  • @rambabukumar2730
    @rambabukumar2730 Před 2 lety +1

    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 .

  • @mdrehan4all
    @mdrehan4all Před rokem +2

    spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect

  • @aakashchavhan905
    @aakashchavhan905 Před 3 měsíci

    Thank you sir