Spring Boot CRUD Tutorial with IntelliJ IDEA, MySQL, JPA, Hibernate, Thymeleaf and Bootstrap

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024
  • In this Spring Boot video tutorial, you will learn how to use IntelliJ IDEA for developing a Java web application based on Spring framework in which you will learn to implement the User module with CRUD operations (Create, Retrieve, Update & Delete).
    Technologies: Spring Boot Web, Spring Data JPA & Hibernate, MySQL Database, Thymeleaf, HTML5 & Bootstrap, JUnit 5 & AssertJ, Spring Data JPA Test.
    Software programs: Java Development Kit (OpenJDK), IntelliJ IDEA Ultimate, MySQL Community Server, MySQL Workbench
    Spring Boot E-Commerce Ultimate Course: www.udemy.com/... - Code Real-life Shopping Website with Java and Spring Boot. Full-stack Development. Hands-on Practices. Job-ready Skills.
    Timestamps
    0:08 - What you will learn
    0:53 - User Interface Design - Manage Users
    1:49 - Overview Class Diagram
    3:57 - Create and Set Up Spring Boot Project
    10:38 - Configure Datasource Properties
    12:52 - Code Home Page
    22:40 - Use Bootstrap for Project
    28:57 - Code Data Access Layer for User Module
    38:27 - Code Unit Tests for Data Access Layer
    56:07 - Code Users Listing Page
    1:09:35 - Code Add User Function
    1:32:39 - Code Edit/Update User Function
    1:43:26 - Code Delete User Function

ความคิดเห็น • 427

  • @CodeJava
    @CodeJava  ปีที่แล้ว +7

    Get the sample project on GitHub: github.com/codejava-official/spring-boot-crud-intellij/

  • @jejakagentleman7638
    @jejakagentleman7638 2 ปีที่แล้ว +20

    I dont always comment on TH-cam, but your video is so good for me to understand the basic of thymeleaf and spring boot. I like that you don't edit your contents where there is an error which help others to learn how to resolve those errors. Kudos.

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว +2

      Glad to hear that. I love your comment.

    • @dee.s.4513
      @dee.s.4513 2 ปีที่แล้ว

      @@CodeJava Thank you for your work. However, the font size is way too small. Please zoom in.

  • @prizepig
    @prizepig 2 ปีที่แล้ว +6

    I spent days working on similar tutorials on TH-cam and all of them failed to explain enough to get it actually working. This tutorial was easy to follow and informative and most importantly I was able to finish the whole thing without having to debug it. The most important thing you did here that others failed to do was actually test the database connection before writing hundreds of lines of code only to have it fail when tested. Thanks so much for this video. I learned a lot.

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      I'm happy that you found this video helpful. Watch more my videos: th-cam.com/users/codejava

  • @BigeuleLP
    @BigeuleLP ปีที่แล้ว +2

    Dude you saved my life. Had a project for school and had no idea how to do anything. Watched other tutorials on youtube but they haven't really helped me

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      glad it helped.

  • @interndev386
    @interndev386 3 ปีที่แล้ว +6

    Cảm ơn anh. Hướng dẫn rất chi tiết. Nghe giọng đọc biết ngay anh là người Việt Nam rồi :D hihi

  • @urimandthummim5780
    @urimandthummim5780 2 ปีที่แล้ว +1

    really love Sifu Ha's style. I have followed a couple Sifu Ha's tutorials. Not only learned java, also picked up Sifu's accent. :D

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      Glad you like them!

  • @bayami2142
    @bayami2142 2 ปีที่แล้ว +1

    Man, u helped me a lot bcoz i was struggling to understand the purposes of those annotations, repository, context etc, i had confusion to tell u the truth but now i understand. Thank man, may God bless you

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      Glad it helped!

  • @mannejohnsson2995
    @mannejohnsson2995 2 ปีที่แล้ว +7

    Thank you so much for a great tutorial! Had to re-make the test to be sustainible, but all in all, a really good guide. Thank you and keep up the great work.

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      Glad it was helpful!

    • @urimandthummim5780
      @urimandthummim5780 2 ปีที่แล้ว +2

      set the @Rollback to true, you will be able to repeat the tests

  • @myskilltoonice7623
    @myskilltoonice7623 2 ปีที่แล้ว +7

    @timestamp 19:51 if you cannot find compiler.automake.allow.when.app.running, its because they moved it in newer versions of IntelliJ IDEA...Head over to Settings>Advanced Settings then check "Allow auto-make to start even is developed application is running"...it should be under the Compiler section

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว +1

      Great! Thanks for sharing the tip.

    • @prizepig
      @prizepig 2 ปีที่แล้ว

      Thanks!!

  • @aleisterhumbert832
    @aleisterhumbert832 2 ปีที่แล้ว +4

    There is no word can represent my appreciation to your great great tutorial. Thank you so much bro!

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว +1

      You're very welcome!

  • @quocthai367
    @quocthai367 9 หลายเดือนก่อน +1

    Cảm ơn anh, vì những video rất rất chất lượng ạ, vừa chi tiết vừa dễ hiểu

    • @CodeJava
      @CodeJava  9 หลายเดือนก่อน

      ko có gì em. A rất vui vì em thấy video này hữu ích.

    • @quocthai367
      @quocthai367 9 หลายเดือนก่อน +1

      @@CodeJava Em đang cố gắng theo backend Java spring boot. Hi vọng anh sẽ ra nhiều video chất lượng hơn nữa ạ

  • @TraderCoder
    @TraderCoder ปีที่แล้ว

    for my whole life this will be my 1st youtube comment history ,you save me a on this man , thanks a lot

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      glad you found this video helpful. Watch more about Spring Boot: th-cam.com/video/zDc63OHY_v8/w-d-xo.html

  • @bekjanomirzak224
    @bekjanomirzak224 3 ปีที่แล้ว +3

    Thank you, keep going your videous are really helpful, I keep referencing back this video again and again whenever I forget how to set up my mysql.

    • @CodeJava
      @CodeJava  3 ปีที่แล้ว

      Great to hear that! You're welcome.

  • @ArjunShresthaVlog
    @ArjunShresthaVlog 2 ปีที่แล้ว +1

    My instructor was never teach me like this, that's why I didn't know How to use Test method, but when I watched your video, It was really helpful and understandable .
    I would say Thank you very much. Can you please make one Micro-Services video also?

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      Glad to hear that. I'll publish videos about microservices in near future.

  • @scalpaamericano4588
    @scalpaamericano4588 2 ปีที่แล้ว +1

    This is absolutely thorough. I followed from start to finish building the application. Everything worked as you demonstrated. I thank you very much,

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว +1

      Glad it helped!

  • @adetunjiadeniran2482
    @adetunjiadeniran2482 2 ปีที่แล้ว

    This is first time I am commenting of TH-cam. I want commend you on this video. This is really good and I learned a lot from you video. Thank you.

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      Glad it was helpful!

  • @denizaygun4909
    @denizaygun4909 3 ปีที่แล้ว +11

    I wish you share the source code , it's really hard to go back and find the specific things.

  • @aleksandargrozdanic8626
    @aleksandargrozdanic8626 ปีที่แล้ว

    What a nice video this was! You just saved my time and my project for college. There is just one thing I want to know, because when you do update of user, in my case it does insert of new user, it can't find existing user to merge new data on it, it just inserts new one (which will crash if I dont change email, if it doesnt crash it will create another user). Thanks a lot!

    • @CodeJava
      @CodeJava  ปีที่แล้ว +1

      Glad to hear you found this tutorial helpful. Make sure that you put id field in the form, so it will know when to merge and update the data.

    • @aleksandargrozdanic8626
      @aleksandargrozdanic8626 ปีที่แล้ว

      @@CodeJava Nice! That worked out. But what about JSP files, If I decide to use them instead of HTML, how I can start using it at this point and can I convert HTML ones to JSP ones?

  • @rzinnatov
    @rzinnatov 2 ปีที่แล้ว +3

    Hello! I did everything like you and all the things work properly expect for one: when I use 'edit' -> instead of correcting the entry, it's create another one, and even it falls with an error (cause for the same e-mail on the edit page) id continue counts

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว +1

      make sure you have Id of the user in edit form, as an hidden field. So it will update the user's details - not create a new one.

    • @rzinnatov
      @rzinnatov 2 ปีที่แล้ว +1

      @@CodeJava i got this after open tag

    • @shunpyaetun9143
      @shunpyaetun9143 2 ปีที่แล้ว

      this helps me a lot. tysm

    • @SRHarkreader
      @SRHarkreader ปีที่แล้ว

      ​@@rzinnatov This was a year ago, but did the fix work for you? I confirmed that I had the tag @CodeJava mentioned, but in the users.html file, the two hyperlink tags cannot resolve the id in the expression: ${user.id}. I've burned many hours on this issue. Any suggestions?

  • @De_Bryan
    @De_Bryan 5 หลายเดือนก่อน

    Hi Nam,
    I am enrolled to your course at udemy.
    Would you have a tutorial that uses postman/end points?
    I am working on a backend project that requires no thymeleaf where i have to demonstrate the use of postman.

    • @CodeJava
      @CodeJava  5 หลายเดือนก่อน

      Hi Brian. I published some tutorials that use Postman on my blog here: www.codejava.net/rest-api
      Also on this channel: th-cam.com/video/XLQxfpDmqbM/w-d-xo.html

  • @cinnnamonlamb
    @cinnnamonlamb 8 หลายเดือนก่อน

    Thanks for your great tutorial! It helped me more than 10+ hours courses

    • @CodeJava
      @CodeJava  8 หลายเดือนก่อน

      Glad it helped! If you want to learn more, consider taking my online course here: www.udemy.com/course/spring-boot-e-commerce-ultimate/?referralCode=3A24FAC7220029CEDFD6

  • @efzo
    @efzo ปีที่แล้ว

    This video is so good and straight forward. Nice one. I have a question = why do you use GetMapping for Updating and Deleting, why not use PutMapping and also DeleteMapping?

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      it's because hyperlinks cannot send PUT & DELETE requests. It can send GET requests only. If you wish to, you have to write some additional Javascript code for that.

  • @sumedhtayade821
    @sumedhtayade821 2 ปีที่แล้ว

    Love and Respect for your contribution Dear Sir - From India

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      thank you :)

  • @lhceleguim
    @lhceleguim 4 หลายเดือนก่อน

    Indeed very useful. Thanks a million and keep coding!

    • @CodeJava
      @CodeJava  4 หลายเดือนก่อน

      Glad it helped!

  • @azamatbaitashov663
    @azamatbaitashov663 2 ปีที่แล้ว

    Hi, you are doing great videos. I wanted to ask can you add security for this, with roles I mean user can have multiple roles. So when we want add new user or update user also we could give some role for that user. Thanks!

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      Yes, check this video: th-cam.com/video/p18O0hSmQyM/w-d-xo.html

  • @andreimartinaquino2534
    @andreimartinaquino2534 2 ปีที่แล้ว

    Thank you for this tutorial, all explained clearly. I coded along with your video, it took me 2-3 day so I can digest your explanations 😄☕ confidence booster.
    Do you have another video like this, but using custom queries in the UserRepository?

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      Glad you enjoyed this video.

  • @ky_nguyen_203
    @ky_nguyen_203 ปีที่แล้ว

    Thank you very much, hope the channel grows more and more

  • @rodrigo_dev3346
    @rodrigo_dev3346 2 ปีที่แล้ว

    Agradecido desde America Latina por este excelente tutorial.

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      You're welcome :)

  • @santiagomarrero8152
    @santiagomarrero8152 ปีที่แล้ว

    I found this video so helpfull, thank u so mucho for making it. Also, u can help me with something? I'm having trouble trying to configure my database, I can use mysql, so Im trying with an Oracle 18c database, but I really dont know how to configure it, can you explain it to me? Or recommend another of your tutorials where you work with an oracle database?

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      can you check this video th-cam.com/video/ea0HhETxOIs/w-d-xo.html ?
      and this one: th-cam.com/video/CCqVKz6RRLs/w-d-xo.html

  • @galletasverdes
    @galletasverdes 5 หลายเดือนก่อน

    thanks a lot, i could get clarified all the process, just i have a doubt, how i can implement "findBy" in a costum field, lets say : find by email

    • @CodeJava
      @CodeJava  5 หลายเดือนก่อน

      just declare a method in the repository interface, something like: Option findByEmail(String email); and Spring Data JPA will generate the SQL statement accordingly.

  • @kaiiemsawat2415
    @kaiiemsawat2415 11 หลายเดือนก่อน

    This was good. Thank you.
    Hopefully, one day you would come up with a full project. Or, may be some clone of a web application.
    Event if it could be around 6-8 hours long, I believe people would still happy to follow.
    There are so many projects like that but with MERN. But I don't see any good Java/Spring full stack project out there.

    • @CodeJava
      @CodeJava  11 หลายเดือนก่อน

      you can learn developing a full, complete functional e-commerce website in my course here: www.udemy.com/course/spring-boot-e-commerce-ultimate

  • @ditya3548
    @ditya3548 ปีที่แล้ว

    YOU ARE SUCH A LIFESAVER.

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      glad it helped :)

  • @lordxkronoz
    @lordxkronoz 5 หลายเดือนก่อน

    This tutorial is godlike bro! Thanks!!!

    • @CodeJava
      @CodeJava  5 หลายเดือนก่อน

      Glad it helped! Welcome :)

  • @kryo2923
    @kryo2923 ปีที่แล้ว

    Thanks for your video, that's help me a lot with my project. But there is something that bother me, that the browser seem to not recognise the bootstrap CSS file directory so i can't click on it to check whether or not if the browser could find the bootstrap file. I'm trying to resolve that but the IDE can recognise the file path so i don't know where the problem is ?
    Thanks

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      make sure you tell Spring Security check statics resources by adding this code:
      public void configure(WebSecurity web) throws Exception {
      web.ignoring().antMatchers("/images/**", "/js/**", "/webjars/**");
      }

  • @cerma1
    @cerma1 2 ปีที่แล้ว

    Great tutorial for me as a beginner in Springboot. Thank you

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      Glad it was helpful!

  • @developersa3254
    @developersa3254 8 หลายเดือนก่อน

    Thanks bro it worked ,i have learnt a lot from this tutorial .
    Please do more springboot apps

    • @CodeJava
      @CodeJava  8 หลายเดือนก่อน

      Sure I will. Glad you found this tutorial helpful. Learn more: www.udemy.com/course/spring-boot-e-commerce-ultimate/?referralCode=3A24FAC7220029CEDFD6

  • @levaighetscode6173
    @levaighetscode6173 ปีที่แล้ว

    Thanks for this video, because this is the best tutorial i can find

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      Glad it helped!

  • @tawandabanda7329
    @tawandabanda7329 ปีที่แล้ว

    Thanks a lot for such an informative tutorial. I encountered a bug, the edit functionality is adding a different user with a different userId altogether so its not updating. Kindly look into it

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      make sure you put a hidden field for user ID in the edit form.

  • @ouchariibra4431
    @ouchariibra4431 ปีที่แล้ว

    Great tuto. explained in a way anyone can understand, but i came a across a problem
    java: bad operand types for binary operator '=='
    first type: long
    second type:
    The Delete part
    if (count == null || count == 0)

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      use Long instead of long for the variable count.

  • @brazo98
    @brazo98 3 ปีที่แล้ว

    Hello Nam, I hope you are ok? Nam what do you prefer Spring Tool or IntelliJ? Thx a lot

    • @CodeJava
      @CodeJava  3 ปีที่แล้ว

      I like both STS and IntelliJ. Which IDE does not matter much.

    • @brazo98
      @brazo98 3 ปีที่แล้ว +1

      @@CodeJavaPlease, think of my java shirt as soon as you sell it. Thanks

  • @thosan3090
    @thosan3090 ปีที่แล้ว +1

    Rất hay ạ, cảm ơn anh

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      ko có gì em. Anh có khóa học này: www.udemy.com/course/spring-boot-e-commerce-ultimate

  • @toxicrat9522
    @toxicrat9522 ปีที่แล้ว

    Hi - thank you very much for the Video! Unfortunately I have a Problem with the thymeleaf Expressions in the trainee_form.html - I always get the "cannot resolve" Message. For Example when i call the object th:object="${trainee} or when i call the filed th:field="*{email} - Do you have a solution for this Problem? I spent the last 2 Days trying to figure out a solution but cant find anything...

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      I think you should follow this tutorial first: th-cam.com/video/-IMvhBWwQrc/w-d-xo.html

  • @creativevn2924
    @creativevn2924 2 ปีที่แล้ว

    cảm ơn anh nha , nghe giọng nói tiếng anh là biết ngay anh là người VN rùi !

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      You are welcome ☺️

  • @albertisaev2185
    @albertisaev2185 ปีที่แล้ว

    Thanks from Russia!

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      Welcome! Greetings from Vietnam :)

  • @ramosespann6496
    @ramosespann6496 2 ปีที่แล้ว

    hello nam since you master these topics very well, you can create a video on how to create a CRUD in Spring boot with upload and update of images please, it would help us a lot to those of us who just started

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      I have this video which is somewhat close to what you need: th-cam.com/video/-Xf_fbKQit8/w-d-xo.html
      If you want to learn full CRUD with images, I recommend you take my course on Udemy: www.udemy.com/course/spring-boot-e-commerce-ultimate

  • @konscomputertutorials7473
    @konscomputertutorials7473 ปีที่แล้ว

    Thanks for the lesson . I really learned alot

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      Glad it was helpful!

  • @arifhandoko9922
    @arifhandoko9922 2 ปีที่แล้ว +1

    When I run my Auto Configuration file it doesn't work in Spring-Boot app. There is an error "Error starting ApplicationContext....". How can I fix it?

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      show me the error in detailed

  • @kelvincheekhailoon9596
    @kelvincheekhailoon9596 2 ปีที่แล้ว

    Is it possible to create a CRUD web application in (jsp, servlet) format in IntelliJ IDEA Community Edition , have been looking for this? Any tips or tutorial on this?

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      check out my written article: www.codejava.net/coding/jsp-servlet-jdbc-mysql-create-read-update-delete-crud-example

  • @yigitgunes1519
    @yigitgunes1519 3 ปีที่แล้ว

    Mate you saved my life, Thanks a lot!

    • @CodeJava
      @CodeJava  3 ปีที่แล้ว +1

      Glad it helped!

  • @musoxoshimov4908
    @musoxoshimov4908 ปีที่แล้ว +1

    usefull tutorial thank you bro👍👍👍

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      glad it help. Check out all of my Spring Boot videos here: th-cam.com/video/zDc63OHY_v8/w-d-xo.html

  • @hayavadanstp
    @hayavadanstp 3 ปีที่แล้ว

    Thank You So much for the Video. It helped a lot. The Id is printing 1 and then 3. 2 is not printing

    • @CodeJava
      @CodeJava  3 ปีที่แล้ว +1

      You're welcome! It's because the record id 2 was deleted.

    • @hayavadanstp
      @hayavadanstp 3 ปีที่แล้ว

      @@CodeJava Yes. I've checked my code yesterday. I've got it. Thank You.

  • @rogeliobecerril1306
    @rogeliobecerril1306 ปีที่แล้ว

    Thank you, it has been a great help, greetings from Mexico!

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      Glad it helped! Greetings from Vietnam :)

  • @GameWithTonyYT
    @GameWithTonyYT 2 ปีที่แล้ว

    Can this be followed and complete using the Comunity edition of InteliJ ?

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      No, you must use the Ultimate edition for developing Spring projects.

  • @jasonhuang4333
    @jasonhuang4333 2 ปีที่แล้ว

    Thank you very much for this helpful project!

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      Glad it was helpful!

  • @juliangiraldo2835
    @juliangiraldo2835 2 ปีที่แล้ว

    Nice tutorial, can you give me the plugins you use in intellij ? thankyou!

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      Oh, I don't use any external plugins.

  • @renlucifer1860
    @renlucifer1860 3 ปีที่แล้ว +1

    Could u make a CRUD Web Services App with Spring and React JS or Angular ?

    • @CodeJava
      @CodeJava  3 ปีที่แล้ว +5

      yes, will be in future :)

  • @nquantum
    @nquantum 2 ปีที่แล้ว

    Great tutorial. Thank you so much for this!

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      Glad it was helpful!

  • @abdulazizalmoqbeli3190
    @abdulazizalmoqbeli3190 2 ปีที่แล้ว

    Thank u so much, I benefited a lot.

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      Glad it helped

  • @carloscarmonaalvarez317
    @carloscarmonaalvarez317 2 ปีที่แล้ว

    Muchas gracias por compartir tu conocimiento mi amigo!!!

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      de nada.

  • @92nicu17
    @92nicu17 2 ปีที่แล้ว

    8:21 How do you have a database tab? There is none when I am working. Is it Ultimate only?

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว +1

      yes, the Ultimate edition has more tools

  • @gorbarseghyan2352
    @gorbarseghyan2352 2 ปีที่แล้ว +1

    I dont have the option to add scehmas after connecting to the db, what is the problem?

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      what do you mean you don't see? Just put the following attribute in the application.properties file:
      spring.jpa.hibernate.ddl-auto=update

  • @scalpaamericano4588
    @scalpaamericano4588 2 ปีที่แล้ว

    If ever you have time, could you explain how to save data in uppercase from the user form to the database.

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      I don't understand what you mean. Why 'uppercase'? Could you explain?

    • @scalpaamericano4588
      @scalpaamericano4588 2 ปีที่แล้ว

      @@CodeJava HI, Thanks for coming back to me and sorry for the vagueness of my question. What I mean is when we save i.e First name let's say "Tina" it is saved in database table as "Tina". How would I code on the application to save on the database "TINA". Very much appreciated if ever you have time.

  • @realtimeactivities7794
    @realtimeactivities7794 2 ปีที่แล้ว

    I thank you very much. I'm having a headache when learning about spring boot. But when I see your video like a drowning man grabs a float :D when Udemy has a certain discount I will buy your course :D. By the way, I am a Vietnamese too.

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      Great to hear that. I just created a discount coupon for my course here: www.udemy.com/course/spring-boot-e-commerce-ultimate/?couponCode=SPRINGF
      Wait to see you in my course :)

    • @realtimeactivities7794
      @realtimeactivities7794 2 ปีที่แล้ว

      @@CodeJava Thanks for your support I bought your course. Hopefully in the future, you can expand more courses such as Design pattern in Java, Microservices. I really hope that will be happen.

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว +1

      @@realtimeactivities7794 Thanks, I'm going to publish more courses in 2022.

  • @awebeltube6054
    @awebeltube6054 3 ปีที่แล้ว +2

    Assertions.assertThat(saveduser).isNotNull();is not working in my intelijj that is assertThat is not correct what shall I do

    • @CodeJava
      @CodeJava  3 ปีที่แล้ว +3

      did you try to import the Assertions class from assertj package? AssertJ comes with Spring Boot test by default.

  • @kathlung7366
    @kathlung7366 2 ปีที่แล้ว +1

    34:50 i am following urs, but my at this 34:50 time the way you load program after clicking crudrepositary doest show in my computer, that accept dialogue box doesnot appear please help

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว +1

      did you hold down Ctrl while clicking on the name?

    • @kathlung7366
      @kathlung7366 2 ปีที่แล้ว

      @@CodeJava thankyou pressing ctrl solves

  • @ВасилийОрлов-й7о
    @ВасилийОрлов-й7о 2 ปีที่แล้ว

    Hey! A good job! I just have a problem with editting users. When I change some fields f.e. firstname, lastname and tap the "Save" button some error happened (duplicate account). But when i changed just e-mail everything was good and app create a new person. Can u help or explain this problem?

  • @RiotLee1124
    @RiotLee1124 2 ปีที่แล้ว

    does this work on intellij community edition? or should i buy it

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      it works on IntelliJ ultimate edition only. You can use ultimate edition freely in 30-minute sessions.

  • @De_Bryan
    @De_Bryan 7 หลายเดือนก่อน

    Hi. I watch your spring boot ecommerce tutorial on udemy. Its very educative.
    Could you also share how to add dto in the project?

    • @CodeJava
      @CodeJava  7 หลายเดือนก่อน

      Glad you found this video helpful. Kindly check this video in which you'll see how to create DTOs: th-cam.com/video/y6R3reU1vWE/w-d-xo.html

  • @alxx736
    @alxx736 3 ปีที่แล้ว

    Question regarding to the UPDATE (PUT) method,if the passed ID is wrong or does not exist,Spring/Hibernate will create a new Record.How to deal with this this?

    • @CodeJava
      @CodeJava  3 ปีที่แล้ว +1

      so you need to check the existence of the record by ID, before showing the edit form.

    • @alxx736
      @alxx736 3 ปีที่แล้ว

      @@CodeJava Yes ,thats ok . If we are using DTOS and using some kind of mapper (Custom mapper, Dozer ,Mapstruct ),How is it the more clean way to transform the DTO to an entity when performing and update using the Found entity? Because we will need to update the found entity with DTO values ,except the id ,because the DTO does not have any id set inside the request body , the ID is comming from the Path variable. It will be great if you can make a short video showing the cleanest and more elegant way. The most videos on TH-cam ommit this things,this is real World apps have to deal with all the time . Thanks !!

  • @lucaschagas8588
    @lucaschagas8588 2 ปีที่แล้ว

    Thank you so much bro, you're only the best!

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      You're welcome!

  • @samjr1666
    @samjr1666 2 ปีที่แล้ว

    im using jsp instead of html files and im not able to see database items in my jsp page what would you recommend me? where do i make wrong?

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      If you're using JSP, you need to have tomcat-embed-jasper dependency. Kindly follow this tutorial: www.codejava.net/frameworks/spring-boot/how-to-create-a-spring-boot-web-application-spring-mvc-with-jsp-thymeleaf#JSP

  • @tudorcoman1466
    @tudorcoman1466 2 ปีที่แล้ว

    Great Tutorial!

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว +1

      Glad it was helpful!

  • @tuananhle3388
    @tuananhle3388 ปีที่แล้ว

    Có khoá dạy ở Hà Nội không thầy ơi.

    • @CodeJava
      @CodeJava  ปีที่แล้ว +1

      anh ko dạy trực tiếp em ạ. Em có thể tìm học khóa của anh trên Udemy tại đây: www.udemy.com/user/namhaminh/

  • @VuvaToniKroos
    @VuvaToniKroos ปีที่แล้ว

    thank you so much, it's very helpful for me

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      Glad it helped!

  • @crfm6452
    @crfm6452 2 ปีที่แล้ว +1

    In my show home page method around 22:45 the main controller wont print to console. Any ideas?

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      that means the handler method was not called. Did the home page get displayed?

    • @crfm6452
      @crfm6452 2 ปีที่แล้ว

      @@CodeJava Yes it did

  • @hoangtrunghoa7998
    @hoangtrunghoa7998 ปีที่แล้ว

    Can you show all the plugins need to do this project?

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      I just use IntelliJ Ultimate edition.

  • @dii445-y8t
    @dii445-y8t ปีที่แล้ว

    Great tutorial thank you ❤❤

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      You’re welcome 😊

  • @InesKetata
    @InesKetata 6 หลายเดือนก่อน

    hi , i have a problem in data base the table is not created on my sql i have tried a lot to solve this problem but it's not working , what should i do ?

    • @CodeJava
      @CodeJava  6 หลายเดือนก่อน

      did you set hibernate.ddl-auto=update? refer to this guide: www.codejava.net/frameworks/hibernate/hibernate-forward-engineering-create-tables-from-entity-classes

  • @thanhnguyendiep2261
    @thanhnguyendiep2261 3 หลายเดือนก่อน

    Máy em dùng sql sever express, port 1433, em làm như anh xong lúc run nó báo lỗi java.lang.NullPointerException: Cannot invoke "org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(java.sql.SQLException, String)" because the return value of "org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.sqlExceptionHelper()" is null... thì phải sửa như nào ạ@@

    • @CodeJava
      @CodeJava  3 หลายเดือนก่อน

      có khả năng là phiên bản JDBC driver cho SQL server chưa phù hợp với version của Hibernet hoặc version của SQL Server. Em thử kiểm tra và dùng phiên bản khác xem.

  • @hoanguchuy7120
    @hoanguchuy7120 3 ปีที่แล้ว

    Anh ơi cho em hỏi phần JUnit testAddNew ạ. Em bị NullPointerException ở đối tượng Repo và bắt buộc phải dùng Try Catch để pass Test, anh có thể giải thích tại sao không ạ ?

    • @CodeJava
      @CodeJava  3 ปีที่แล้ว +1

      cho anh xem code test class của em thì mới biết được.

    • @hoanguchuy7120
      @hoanguchuy7120 3 ปีที่แล้ว

      @@CodeJava Em fix được rồi ạ

    • @HaiTruong-dl3ro
      @HaiTruong-dl3ro ปีที่แล้ว

      @hoanguchuy7120 fix sao z người ae, chỉ mình với

  • @hoaimiqng
    @hoaimiqng 2 ปีที่แล้ว +1

    good job anh ơi !!!

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      thank you :)

  • @Naitokalmah
    @Naitokalmah 3 ปีที่แล้ว

    Hi , i would like to thank you immensely for the helpful videos you're providing !
    do you have an idea on how to implement CRUD operations on cascade ?

    • @CodeJava
      @CodeJava  3 ปีที่แล้ว

      yes, watch this video: th-cam.com/video/ctwRpskAeIU/w-d-xo.html

    • @Naitokalmah
      @Naitokalmah 3 ปีที่แล้ว

      @@CodeJava thank you so much for the fast reply , Subscribed ~ !!!
      wouldn't you know it it can be done with Spring Data MongoDB ?

    • @CodeJava
      @CodeJava  3 ปีที่แล้ว +2

      @@Naitokalmah yes, it's possible with Spring Data MongoDB. I'll publish some videos for that.

    • @Naitokalmah
      @Naitokalmah 3 ปีที่แล้ว

      @@CodeJava looking forward to it , notifications bell is ON !

    • @VikramKumar-dq2is
      @VikramKumar-dq2is 3 ปีที่แล้ว

      @@CodeJava please share his udemy course link

  • @MyMojoSoDopeNights
    @MyMojoSoDopeNights 2 ปีที่แล้ว

    Hi, Thank you soo much for this. When i run the first test case, i get this error "Field 'id' doesn't have a default value". Even though i follow all your steps. Please help

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว +1

      make sure the id column in table has auto increment enabled.

    • @MyMojoSoDopeNights
      @MyMojoSoDopeNights 2 ปีที่แล้ว

      @@CodeJava Thank you! i noticed yours did this automatically and i needed to drop and recreate my table. How did you do this automatically

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว +1

      @@MyMojoSoDopeNights set property hibernate.ddl-auto=update in application.properties

    • @MyMojoSoDopeNights
      @MyMojoSoDopeNights 2 ปีที่แล้ว

      @@CodeJava did that but still didn’t work. It’s okay. I don’t want to take too much of your time. Thank you so much for this amazing video again

  • @sidof8065
    @sidof8065 2 ปีที่แล้ว

    Good tuto. Please sir can your show how to insert data in twoo table with thymeleaf.

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      check this video: th-cam.com/video/ctwRpskAeIU/w-d-xo.html

  • @NguyenTruongAnPH
    @NguyenTruongAnPH 2 ปีที่แล้ว

    thanks so much for this tutorial,

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว +1

      You are so welcome!

  • @nibinjohn3867
    @nibinjohn3867 2 ปีที่แล้ว

    When i tried to add org.webjars as gr.oupid, for bootstrap , it says no dependency present and also webjars-locator-core is not present also.How can i add bootstrap then?

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      it's because of IntelliJ doesn't update automatically. You need to reload Maven build file for the changes to take effect.

  • @ShchedrinV
    @ShchedrinV ปีที่แล้ว +1

    Very good

  • @nml4546
    @nml4546 2 ปีที่แล้ว

    Very well done. Thanks.

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      Glad you liked it!

  • @filipstaskiewicz3184
    @filipstaskiewicz3184 ปีที่แล้ว

    my program when editing a row creates a new one instead of editing the one that the id belongs to. How can I fix it? From what I've noticed, my code doesn't go through the catch

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      perhaps you're missing a hidden field for ID in the edit form. Without that, it always creates a new row.

  • @tanvir7781
    @tanvir7781 3 ปีที่แล้ว

    can u provide the github link? and also when I try to update "There was an unexpected error (type=Internal Server Error, status=500).
    An error happened during template parsing (template: "class path resource " this error occurring .

    • @CodeJava
      @CodeJava  3 ปีที่แล้ว

      I guess you specify wrong name for the view returned from the handler method. Anyway, I couldn't help further without full exception/error.

  • @kathlung7366
    @kathlung7366 2 ปีที่แล้ว

    in my case hibernate:create table..... is not show in my console like yours in 36:45 and i think because of this the varchar in mysql is still 225 even though i have specified 45 and also not checking the NN in mysql

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      did you set the property show_sql = true in the application properties file?

    • @kathlung7366
      @kathlung7366 2 ปีที่แล้ว

      @@CodeJava yes, everthing worked just that hybernate doesnot show in consol

    • @Erick-eb2mz
      @Erick-eb2mz 2 ปีที่แล้ว

      ​@@kathlung7366Did you figure out the issue? I am having the same issue and my show_sql is also set to true. The length I have specified or anything else is being applied.

    • @kathlung7366
      @kathlung7366 2 ปีที่แล้ว

      @@Erick-eb2mzno Erick but without that also my final program works, wby?

  • @tq1373
    @tq1373 2 หลายเดือนก่อน

    Chào thầy, thank thầy ạ!

    • @CodeJava
      @CodeJava  2 หลายเดือนก่อน +1

      ko có gì em ạ.

  • @ДенисПилипенко-п7п
    @ДенисПилипенко-п7п 8 หลายเดือนก่อน

    43:48 Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended. Can you help me?

    • @CodeJava
      @CodeJava  8 หลายเดือนก่อน

      kindly check the solution in this StackOverflow thread: stackoverflow.com/questions/54205486/how-to-avoid-sharing-is-only-supported-for-boot-loader-classes-because-bootstra

    • @ДенисПилипенко-п7п
      @ДенисПилипенко-п7п 7 หลายเดือนก่อน

      thank you @@CodeJava

  • @longnguyendragon521
    @longnguyendragon521 ปีที่แล้ว

    Yêu anh nhất đấy

    • @CodeJava
      @CodeJava  ปีที่แล้ว +1

      cảm ơn em

  • @dhrubajyotibharali7176
    @dhrubajyotibharali7176 ปีที่แล้ว

    Can you please tell where I can find that Database Dialog pop-up window I cant able to find it?

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      It's available in Ultimate edition only. Do you use IntelliJ Ultimate?

  • @Jadeung
    @Jadeung ปีที่แล้ว

    Thank you for your video but my maven cant recognize webjar I dont know whats going on

    • @Jadeung
      @Jadeung ปีที่แล้ว +1

      I got it worked by adding dependency manually

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      Glad to hear that.

    • @Jadeung
      @Jadeung ปีที่แล้ว

      Thank you so much for your reply. I got a weird problem, last night after I added boolean enabled in the User class it works fine. But today I running this program again it gives me
      org.springframework.orm.jpa.JpaSystemException: Null value was assigned to a property [class com.mywebapp.myapp.user.User.enabled] of primitive type Error. I dont know what is going on.

  • @ducminhduong7602
    @ducminhduong7602 ปีที่แล้ว

    chú làm hướng dẫn làm RDBMS CRUD được ko ạ?

    • @CodeJava
      @CodeJava  ปีที่แล้ว

      chau xem video nay nhe: th-cam.com/video/1pA64-foiz8/w-d-xo.html

  • @kulgutime5428
    @kulgutime5428 2 ปีที่แล้ว

    very helpful tutorial thank you bro

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว +1

      Glad it helped

  • @kirtankabariya9875
    @kirtankabariya9875 2 ปีที่แล้ว

    Hello I tried to follow this tutorial but was not able to add anything to the database. In your video, when you write the tests to adduser or getallusers it automatically adds it for you. But for me it does not even when I re-run the application
    Please Help!!

    • @CodeJava
      @CodeJava  2 ปีที่แล้ว

      did you specify spring.jpa.hibernate.ddl-auto=update in the application.properties file?

  • @elasingh3151
    @elasingh3151 3 ปีที่แล้ว

    Do you have the github link?
    I'm getting the below error while starting the spring boot application
    java.sql.SQLException: Access denied for user 'User'@'localhost' (using password: YES)

    • @CodeJava
      @CodeJava  3 ปีที่แล้ว

      I don't have exact code, but you can find similar one in this article: www.codejava.net/frameworks/spring/spring-mvc-spring-data-jpa-hibernate-crud-example
      Regarding the error, it means you're using wrong username or password of MySQL. Check for that.