Spring Boot User Registration and Login Tutorial with MySQL Database, Bootstrap and HTML5
Vložit
- čas přidán 5. 09. 2024
- In this video, I'd like to guide you guys through the process of developing a Java web application based on Spring framework using Spring Boot. You will learn how to develop user sign up (registration) module and user authentication (login) module with Spring Security.
Technologies: Spring Web MVC, Spring Data JPA & Hibernate, Spring Security, Thymeleaf, Bootstrap (webjars), JUnit Jupiter & AssertJ, MySQL database.
Software programs: Java Development Kit (JDK), Spring Tool Suite IDE (STS), MySQL database server & MySQL Workbench.
Here are the steps you will see in order to build a Spring Boot web application with user registration and login:
- Create Project & Configure Dependencies
- Configure Data source & Create Database
- Code Entity class & Repository interface
- Write Unit Test (test create user)
- Code Spring MVC Controller class
- Code Registration Form & use Bootstrap
- Code Custom UserDetails and UserDetailsService classes
- Configure Spring Security for authentication
- Code List Users page & Logout
Take Spring Boot E-Commerce Ultimate Course to Learn to Build a complete shopping website using Java, Spring Boot, Thymeleaf, Bootstrap, jQuery and MySQL database: www.udemy.com/...
Nice knowledgefull vedio, please keep your thumbnails appealing and engaging, you have good content.
Thank you, I will.
Wow interesting !! before fully watching this video am commenting !! you are always great !! you know how perfectly teach others !!!
Thank you so much 😀
Good stuff. WebSecurityConfigurerAdapter does not exist anymore in latest Spring, so you should update this tutorial.
check out my update in this video: czcams.com/video/cwcfHwA9-nw/video.html - and in this one: czcams.com/video/7HQ-x9aoZx8/video.html
thank bro,very very help ful videos,please keep on posting videos ,thank you very much bro,love your videos
It's my pleasure. Thanks for watching :)
Great! Tks so much! (nếu có tiếng Việt thì sẽ tốt hơn cho người mới bắt đầu)
you're welcome!
Great Tutorial! Just wondering do you have a Tutorial or explanation for recovering forgotten passwords? Thanks
yes, I have. Check that video here: czcams.com/video/znF8QMWWDlE/video.html
@@CodeJava thank you
the functionality of spring security is been changes now
Right. Check my update here: www.codejava.net/frameworks/spring-boot/fix-websecurityconfigureradapter-deprecated
can you please make a video on OTP login in spring boot.
check this video: czcams.com/video/uceE4RILLwc/video.html
Hi , can you help with this eror please : (java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration) , its show when I run the Test method. Thanks
While creating web security config class, I can’t find the web security configurer adapter interface . How to get that in interfaces.
it is removed in new version of Spring Security. Check out my updates in the written tutorial: www.codejava.net/frameworks/spring-boot/user-registration-and-login-tutorial
very nice
Thanks. Glad it's helpful.
After clicking finish I am getting error in application that springframework is not imported
can you share the error in detailed (full exception)???
sir can you make a simple video that is deploy a spring boot website
which is make in thymleaf and spring boot
i search all youtube but i not found a video according my requirment
nowdays I make a website using spring boot in templates i use thymleaf
plz can you help me for deploy a project
you can deploy your Spring Boot app with Heroku or AWS. Check my video:
czcams.com/video/OrpRybZjDSY/video.html and this one: czcams.com/video/TixLbON3TR8/video.html
my testing keeps on failing saying this.srepo(the object of student repository is null)
java.lang.NullPointerException: Cannot invoke "com.example.Project1.repository.StudentRepository.save(Object)" because "this.Srepo" is null
at com.example.Project1.test.StudentRepositoryTest.testCreateStudent
missing @Autowired annotation for the Srepo variable?
I have done with register_sucess.html but it was not showing in webpage
Its shows like whitepage error
it seems that you get 404 or 500 error. Can you share the detailed error so I can know the exact reason?
@@CodeJava Actually i was getting error in CustomerUserDetails class and from there i was not able to run application.
i was getting as repo.save is null and having null pointer exception
Hi, I have failed in my Junit Test, would you please help me to fixt it.
can you describe the error in detailed? with full exception stack.
sir I didn't found the project can you please suggest me where it is?
you can get the code on GitHub here: github.com/codejava-official/spring-boot3-registration-login
WebsecurityConfigureAdapter is not working in eclipse
check out my solution here: www.codejava.net/frameworks/spring-boot/fix-websecurityconfigureradapter-deprecated
Hello! While creating a new Spring Starter Project, the only two Java versions are 21 and 17. Is this okay to continue?
that's okay, as Java 21 is the current LTS (Long Term Support) release.
Thanks! I paused the project right before creating the second test in the test class to validate email and all entries from db are gone/dropped and I am not prompted to sign in Local host 8080. Should I modify pom.xml again or how can I resume the project? @@CodeJava
why i don't have bootstrap-4.3.1.jar ?
did you add the dependency for Bootstrap and Web JARS. This video may help: czcams.com/video/PF66wvgiF90/video.html
I fixed the error three days ago
But anyway, thank you for guiding me
hii there how can i convert the front end to vaadin?
I don't know Vaadin.
Hi I am getting this error while running the tests.
20:58:04.307 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils -- Could not detect default configuration classes for test class [com.moviereview.Movie.Review.login.UserRepositoryTests]: UserRepositoryTests does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
20:58:04.717 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper -- Found @SpringBootConfiguration com.moviereview.Movie.Review.MovieReviewApplication for test class com.moviereview.Movie.Review.login.UserRepositoryTests
20:58:04.908 [main] INFO org.springframework.boot.devtools.restart.RestartApplicationListener -- Restart disabled due to context in which it is running
check the package structure of the test class. Make sure it is in the same package hierarchy as the main class so Spring configuration will be loaded. Otherwise you need to use the @Import(Class) annotation.
how i can define my login template ?
follow this video: czcams.com/video/RhIXP5tjHkk/video.html
Sir do this have JWT token?
no, it doesn't. For JWT authentication, kindly check this video: czcams.com/video/S7jV6di6Pl0/video.html
Restaurant project model video was upload
what do you mean?
Could you please upload it in git gub this entire file
you can get the full project code in this article: www.codejava.net/frameworks/spring-boot/user-registration-and-login-tutorial
want to download this project
you can download the project attached in this article: www.codejava.net/frameworks/spring-boot/user-registration-and-login-tutorial
please can you share your code as a zip file . thanks a lot
you can get the code in the written article at www.codejava.net/frameworks/spring-boot/user-registration-and-login-tutorial
Wow terrific English accent you had . I didn't even understand anything you say dude. Can't you pronounce the words clearly
sorry to hear that, I will improve my accent in future videos.
are you Vietnamese ?
yes, I am. And welcome to my channel !
this is old video
Right. This video is restored from the old version which is removed by CZcams for ridiculous reason.
bảo sao cứ nghe ra accent như người Việt, hóa ra mình không sai ^^
kaka, có dễ nghe hơn english accent ko?
@@CodeJava dễ nghe hơn Eng accent anh ạ.. cơ mà cái 1:06:08 cái WebSecurityConfigurerAdapter của em không có, phải làm sao đây
Hi
Why i get an error on this line?
Welcome [[${#request.userPrincipal.principal.fullName}]]
check the class that implements UserDetails interface. It must declare getter getFullName().
@@CodeJava Thank you for replying i cannot get it to work i stil have teh same error