Spring Boot, MySQL, JPA, Hibernate Restful CRUD API Tutorial

Поделиться
HTML-код
  • Опубликовано: 12 янв 2025

Комментарии • 93

  • @JavaGuides
    @JavaGuides  4 года назад +6

    Spring Boot REST API Exception Handling at ruclips.net/video/xWnU6x5BxyA/видео.html
    Spring Boot Rest API Validation with Hibernate Validator at ruclips.net/video/pjA9Pc7aTic/видео.html

    • @vishalakshin1840
      @vishalakshin1840 4 года назад +1

      I am a beginner of spring boot, Please arrange the playlist from basics and topic wise so that we can follow the playlist.

    • @JavaGuides
      @JavaGuides  4 года назад +1

      @@vishalakshin1840 please check spring boot for beginners playlist on my youtube channel. It has ordered videos and I made it for spring boot beginners.

  • @igoerche
    @igoerche 2 года назад

    Mister! I started several weeks ago with your tutorials and now want to thank you from the bottom of my heart for all your help! Its so great to have you! Thank you very very much!

  • @SureshBabu-jq9su
    @SureshBabu-jq9su 3 года назад

    I am a beginner and was able to create rest API in first go itself. Great Explanation. Thank you so much

  • @JavaGuides
    @JavaGuides  4 года назад

    Free course - Angular + Spring Boot CRUD Full Stack Application at ruclips.net/p/PLGRDMO4rOGcNzi3CpBWsCdQSzbjdWWy-f
    Free Course - ReactJS + Spring Boot CRUD Full Stack Application
    at ruclips.net/p/PLGRDMO4rOGcNLnW1L2vgsExTBg-VPoZHr

  • @qamarislam274
    @qamarislam274 4 года назад +5

    Thanks for this nice tutorial. Those who are facing the issue of not getting error message from ResourceNotFound exception, just add the following line in your .properties file:
    server.error.include-message = always
    It is changed behavior in Spring Boot 2.3.0

  • @JITENDRAPAL21
    @JITENDRAPAL21 3 года назад +1

    Covered full CRUD in a nice way. Great !!!!!!!

    • @ayushkumarsone4401
      @ayushkumarsone4401 3 года назад

      {
      "timestamp": "2021-05-19T13:04:08.834+00:00",
      "status": 404,
      "error": "Not Found",
      "message": "",
      "path": "/api/users/"
      } please help

    • @johndoedoejohn
      @johndoedoejohn 3 года назад

      @@ayushkumarsone4401 add this into application.properties file
      server.error.include-message=always
      _
      Then check if message is passed into () -> new UserNotFoundExceotion(->here

  • @siamakd
    @siamakd 4 года назад

    Learning throught your training course is like finding a Gold ! You are genius man! Excelent Job!

  • @wlodekkkr-refactoring
    @wlodekkkr-refactoring 4 года назад +2

    Very nice and very simple tutorial for beginners. Very well explained and easy to follow. Thank You!

  • @aanchalsathyanarayanan9223
    @aanchalsathyanarayanan9223 4 года назад +2

    Really useful video and the explanation was very clear which helped a lot! Its very helpful for any newbie like me! Thanks for this video.

    • @JavaGuides
      @JavaGuides  4 года назад +1

      I am glad that you found this video tutorial useful

  • @randhirverma8042
    @randhirverma8042 4 года назад +1

    hey Ramesh, Thanks for this video, I have waited long for this

  • @jilanishaik8791
    @jilanishaik8791 Год назад

    Super explanation and Thank you so much ,Ramesh

  • @someshsahu4638
    @someshsahu4638 Год назад +1

    very nice explanation sir thankyou so much 🙏🏼🙏🏼🙏🏼, i am your new subscriber, and i really loves your videos

    • @parthpatidar976
      @parthpatidar976 Год назад

      How to resolve this error??
      {
      "timestamp": "2023-04-28T07:25:31.041+00:00",
      "status": 500,
      "error": "Internal Server Error",
      "message": "not-null property references a null or transient value : com.example.demo.model.Employee.firstname",
      "path": "/api/employees"
      here is the code:
      package com.example.demo.model;
      import jakarta.persistence.Column;
      import jakarta.persistence.Entity;
      import jakarta.persistence.GeneratedValue;
      import jakarta.persistence.GenerationType;
      import jakarta.persistence.Id;
      import jakarta.persistence.Table;
      @Entity
      @Table(name="employees")
      public class Employee {
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      public long id;

      @Column(name = "first_name",nullable=false)
      public String firstname;

      @Column(name="last_name")
      public String lastname;

      @Column(name="email")
      public String email;

      public Employee(long id, String firstname, String lastname, String email) {
      super();
      this.id = id;
      this.firstname = firstname;
      this.lastname = lastname;
      this.email = email;
      }
      public long getId() {
      return id;
      }
      public void setId(long id) {
      this.id = id;
      }
      public String getFirstname() {
      return firstname;
      }
      public void setFirstname(String firstname) {
      this.firstname = firstname;
      }
      public String getLastname() {
      return lastname;
      }
      public void setLastname(String lastname) {
      this.lastname = lastname;
      }
      public String getEmail() {
      return email;
      }
      public void setEmail(String email) {
      this.email = email;
      }


      }

  • @ariannehernandez9680
    @ariannehernandez9680 4 года назад +1

    great tutorial! JPA is working.

  • @javatechnology24
    @javatechnology24 4 года назад

    Very nicely explained with great presentation. Very useful with lots of spring boot information.

  • @ralphhuzz31
    @ralphhuzz31 3 года назад +8

    If your messages doesnt appear on the Exception just add this into application.properties file
    server.error.include-message=always

  • @denahornsby3043
    @denahornsby3043 3 года назад +2

    Thank you. Could you kindly say what you are clicking in the pop up boxes? Not sure how you were getting pop up boxes sometimes or what you were clicking. On the first page you can not see what was added as its up above the view. Maybe something like "Im going to click ...." for the auto loads would of been very helpful. With that this video is something I needed and I appreciate what you have done here. Just that one addition for the UI would of made it like so much easier to follow. Thank you.

  • @mahendranr8934
    @mahendranr8934 2 года назад

    👍Great work of knowledge sharing🙏

  • @johndoedoejohn
    @johndoedoejohn 3 года назад +1

    Amazing video, thanks a lot Ramesh! :)
    @Everyone - Please leave thumbs ups after watching, guy is sharing this valuable knowledge for you so you can watch it for free.

  • @ramagarimidi
    @ramagarimidi 4 года назад

    Very helpful and useful. Thank you!

  • @koushikmaruvada5927
    @koushikmaruvada5927 3 года назад

    hey Ramesh, it was a neat and clean explanation even a beginner can understand, can you please explain the testing phase as well.

  • @prudhvialagola9677
    @prudhvialagola9677 3 года назад

    what a tutorial superrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr

  • @stephanihova808
    @stephanihova808 4 года назад +1

    Hi! Best video. I would like to know how to manage the pagination (previous and next) for the display of data.
    Thank you Java Guide!

  • @marciocostadeoliveira2271
    @marciocostadeoliveira2271 3 года назад

    Thanks, Java Guides!

  • @tannubajpai4782
    @tannubajpai4782 3 года назад

    thnx u for for ur serives
    keep it up bro

  • @kishorkamlu392
    @kishorkamlu392 4 года назад

    Very good explanation. Thanks bro.

  • @thanos9704
    @thanos9704 3 года назад

    Best tutorial broooo

  • @mcskrishna
    @mcskrishna 4 года назад

    Very good. Thanks

  • @sreedharbabu4969
    @sreedharbabu4969 3 года назад

    This really good. could you also provide sample spring batch example

  • @vishalakshin1840
    @vishalakshin1840 4 года назад

    Hi Ramesh, please arrange the playlist order in topic-wise as on the website.

  • @shivanishivu32
    @shivanishivu32 3 года назад

    Getting error mentioned below. Can you please help?
    com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.

  • @ChanoTSG
    @ChanoTSG 4 года назад

    you are the best.......

  • @ayushkumarsone4401
    @ayushkumarsone4401 3 года назад

    Sir help me WHat should I do ?
    {
    "timestamp": "2021-05-19T13:04:08.834+00:00",
    "status": 404,
    "error": "Not Found",
    "message": "",
    "path": "/api/users/"
    }

    • @JavaGuides
      @JavaGuides  3 года назад

      Pass id in URL. which REST api, you are calling?

    • @ayushkumarsone4401
      @ayushkumarsone4401 3 года назад

      @@JavaGuides sir post localhost:8080/api/users

    • @JavaGuides
      @JavaGuides  3 года назад

      @@ayushkumarsone4401 share the request JSON

    • @ayushkumarsone4401
      @ayushkumarsone4401 3 года назад

      Now it is working .. Downloaded your file from github... and did copy paste it is working...

    • @JavaGuides
      @JavaGuides  3 года назад

      @@ayushkumarsone4401 okay 👍

  • @manojhargude7192
    @manojhargude7192 3 года назад

    Parameter 0 of constructor in com.springboot.blog.security.CustomUserDetailsService required a bean of type 'com.springboot.blog.repository.UserRepository' that could not be found.
    The injection point has the following annotations:
    - @org.springframework.beans.factory.annotation.Autowired(required=true)
    Action:
    Consider defining a bean of type 'com.springboot.blog.repository.UserRepository' in your configuration.
    Can anyone help me with this bean configuration issue

  • @ascar66
    @ascar66 4 года назад

    Thank you Sir, everything is pretty clear

  • @shyamsoni5389
    @shyamsoni5389 3 года назад

    Extremly helpful videos. Can you make one video on O-auth google or facebook authentication with react js/ boot application ?

  • @PrinceJeniFX
    @PrinceJeniFX Год назад

    please which app do you use for your screen recording
    ?

  • @vyshnavivyshu4975
    @vyshnavivyshu4975 2 года назад

    How to write if for id column as uuid type

  • @bhaskarvallapu1285
    @bhaskarvallapu1285 4 года назад +1

    Iam getting first name and last name values inserted as null

  • @hemanthcse1
    @hemanthcse1 4 года назад

    Hi
    i am getting this error while creating new user,
    can anyone help me out
    "error performing isolated work; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: error performing isolated work"
    Thanks in advance

  • @vasilisnikolaou4633
    @vasilisnikolaou4633 4 года назад

    Great tutorial..but what about hateoas? I think it's one of the architectural constraints when building restful apis.

    • @JavaGuides
      @JavaGuides  4 года назад

      I will plan to create video tutorial on hateoas with continuation of this tutorial.

  • @warehouseofhospitality
    @warehouseofhospitality 3 года назад

    private UserRepository userRepository; what is the grammer in Java?

  • @raviravi-gg5ck
    @raviravi-gg5ck 3 года назад

    how to do bean validation

  • @irckdwrld
    @irckdwrld 3 года назад

    Thanks for the nice tutorial. I've one doubt regarding why we are using spring.jpa.properties.hibernate.dialect property?

    • @JavaGuides
      @JavaGuides  3 года назад +1

      dialect property hibernate uses to identify the underlying database and generates the SQL queries.

    • @irckdwrld
      @irckdwrld 3 года назад

      @@JavaGuides Thank you so much for clarifying this quickly, you're the best :)

  • @punamrupanavar6785
    @punamrupanavar6785 4 года назад

    I am getting Error while connecting to DB " java.sql.SQLException: Access denied for user ''@'localhost' (using password: NO)"

    • @JavaGuides
      @JavaGuides  4 года назад

      Configure database username and password as per your MySQL installation in application.properties file.

  • @sherazdaawataza2869
    @sherazdaawataza2869 2 года назад

    Very good Please Speak loudly very low volume

  • @victor8888
    @victor8888 4 года назад

    i have an error in console. im using gradle instead of mavan----
    Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]

    • @victor8888
      @victor8888 4 года назад

      I got a response in postman
      {
      "timestamp": "2020-06-30T09:00:34.310+00:00",
      "status": 405,
      "error": "Method Not Allowed",
      "message": "",
      "path": "/api/users"
      }

    • @JavaGuides
      @JavaGuides  4 года назад +1

      @@victor8888 select POST http method in postman

    • @victor8888
      @victor8888 4 года назад

      @@JavaGuides its working fine now. I had made a mistake in entity class I do not create a default super constructor. thnx for your amazing tutorial. :)

    • @victor8888
      @victor8888 4 года назад

      now my data save in DB but I now I want to add swagger in my application. have you any suggestion for me because I'm new for swagger my friend.

    • @JavaGuides
      @JavaGuides  4 года назад +1

      @@victor8888 check out my website for swagger API documentation tutorial or I have uploaded video as well ( video voice is little low but you can check out)

  • @vijaykumar-wu9jc
    @vijaykumar-wu9jc 4 года назад

    I followed same steps am getting error as
    Error:Could not find or load main class caused by java.lang.ClassNotFoundException
    Pls help me make one video on this how to resolve this issue in STS

    • @JavaGuides
      @JavaGuides  4 года назад

      Are you able build maven project successful?

  • @SurajSoni-qs8st
    @SurajSoni-qs8st 4 года назад

    to {GET [/api/username]}: There is already 'userController' bean method
    Caused by: java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'userController' method
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'userController' method
    com.springweb.controller.UserController#getallUsers()
    got 3 types of error please resolve it

  • @DLuffy-ASL
    @DLuffy-ASL 3 года назад

    Hibernate Validator not working in spring Boot ...what to do?

    • @JavaGuides
      @JavaGuides  3 года назад

      To use hibernate validator, Starting with spring Boot 2.3, we need to explicitly add the spring-boot-starter-validation dependency:

      org.springframework.boot
      spring-boot-starter-validation

    • @DLuffy-ASL
      @DLuffy-ASL 3 года назад

      Thank you so much

  • @anantjain1263
    @anantjain1263 4 года назад

    Hey ramesh exception is not working I am not getting any message or anything

    • @JavaGuides
      @JavaGuides  4 года назад

      Spring Boot REST API Exception Handling at ruclips.net/video/xWnU6x5BxyA/видео.html

  • @ngoquangtruong3849
    @ngoquangtruong3849 4 года назад

    you are building api with spring boot use 3 layer architecture, right?

    • @JavaGuides
      @JavaGuides  4 года назад +1

      This is a simple Spring boot CRUD project and doesn't have business logic so I haven't created a service layer. If you want to create a service layer then check out my same another video tutorial at ruclips.net/video/Koe7oC1Sq0c/видео.html.

  • @saddamkhalid1091
    @saddamkhalid1091 4 года назад

    i have an error in Jpa repository how can i resolve?

    • @JavaGuides
      @JavaGuides  4 года назад

      Provide error details?

    • @saddamkhalid1091
      @saddamkhalid1091 4 года назад

      @@JavaGuides In userRepository when you extend jparepository so jparepository give me an error of configuring build path

  • @asuvanikumar
    @asuvanikumar 4 года назад

    Where is service layer??

    • @JavaGuides
      @JavaGuides  4 года назад +2

      This is simple Spring boot project and don't have business logic so I haven't created service layer. If you want to create service layer then check out my same another video tutorial at ruclips.net/video/Koe7oC1Sq0c/видео.html.

  • @SantoLucasST
    @SantoLucasST 3 года назад

    ok? great

  • @kirankumarkondapally237
    @kirankumarkondapally237 9 месяцев назад

    while running getting error as
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Unknown access type record could you help us ..The version of STS iam using as Spring Tool Suite4 Version 4.22.0.Release17