Spring Security Tutorial with Login Example (Spring Boot + Spring Security + MySQL)

Поделиться
HTML-код
  • Опубликовано: 20 сен 2024
  • In this video, we'll go through the Spring Security Implementation with MySql
    GitHub Link: bit.ly/368PUWm
    Other Video:
    -----------------------------------------------------------------------
    Implementing JWT (JSON Web Tokens) with Spring Security in Springboot App - • Implementing JWT (JSON...
    OAuth2 Spring Security using Facebook in Spring Boot - • OAuth2 Spring Security...
    Go / Golang Full Course for Beginners - • Golang Tutorial for Be...
    What is Kubernetes | Explained in detail with Architecture - • What is Kubernetes | E...
    Kubernetes Components you need to know in 10 minutes - • Kubernetes Components ...
    Kubernetes Commands with Example - kubectl - • Kubernetes Commands wi...
    Kubernetes YAML Configuration | Deployment and Service - • Kubernetes YAML Config...
    How to Deploy Quarkus App in Docker - • How to Deploy Quarkus ...
    Follow us on :
    --------------------------------------------------------
    Website: www.dailycodebu...
    Facebook: / dailycodebuffer
    Twitter: / dailycodebuffer
    Instagram: / dailycodebuffer
    GitHub: github.com/dai...
    My Laptop :
    ------------------------------------------------------
    ASUS ROG Zephyrus G14, 14" - amzn.to/3tMb1I6
    ASUS ROG Zephyrus G14, 14" (US) - amzn.to/3xa6X6m
    Audio Gear :
    ------------------------------------------------------
    Maono AU-A04 Condenser Microphone : amzn.to/32FOpwI
    Maono AU-A04 Condenser Microphone (US) :amzn.to/3awzUj7
    Secondary Audio :
    ------------------------------------------------------
    Maono AU-100 Condenser Clip On Lavalier Microphone : amzn.to/3sGIbYd
    Recommended Books:
    ------------------------------------------------------
    Mastering Spring Boot 2.0 (Kindle): amzn.to/3tHJV4L
    Mastering Spring Boot 2.0 (US) : amzn.to/3tHNUy5
    Building Microservices(Kindle) : amzn.to/3gsA1jL
    Building Microservices(US) : amzn.to/3dDnfNn
    Spring Boot in Action : amzn.to/2Qo6YTM
    Spring Boot in Action (US) : amzn.to/32DkeX9
    Spring Microservices in Action : amzn.to/3gsA3rT
    Spring Microservices in Action(US): amzn.to/32G3Hl7
    Music:
    -------------------------------------------------------
    Hear the Noise (Sting): www.youtube.co...
    “Sound effects obtained from www.zapsplat.com“
    #SpringSecurity #DailyCodeBuffer

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

  • @DailyCodeBuffer
    @DailyCodeBuffer  3 года назад +5

    Follow me on Twitter: twitter.com/DailyCodeBuffer

  • @farawayskies
    @farawayskies 2 года назад +18

    Thank you so much for producing a video that is less than 30min and filled with incredibly useful information to create our own real-world application. Spring Boot has been a really hard thing for a noobie like me to comprehend. These smaller videos to just comprehend small sections of the framework really helps. I've been spending over a week looking for this information.

  • @laponiec
    @laponiec 3 года назад +21

    Just managed to watch the first 5 mins, and I am already giving you thumbs up for explaining how to get rid of that login page, a thing that other tutorial hasn'r explained in almost 2 hrs long video. Thank you very much.

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

      Thank you so much

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

      I'm also read comment like before watching i will update after completing i understand or not

  • @prawintowin
    @prawintowin 3 года назад +5

    Excellent!!! Please make a video on Oauth implementation.

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

    does WebSecurityConfigurerAdapter exist nowadays?

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

    Great explanation man, I'm following all your videos.

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

    Killer Tutorrial . Best Tutorial on YT

  • @jenishajenika5975
    @jenishajenika5975 11 месяцев назад +2

    thank you ,in 2023 SpringwebsecutrityAdaptor class is deprecated so, it too hard to implement ... can you explain that on another video

    • @TechwithKB
      @TechwithKB 11 месяцев назад +1

      Yeah I've noted that too

  • @Jigsaw927
    @Jigsaw927 Год назад +3

    I'm following your tutorial but am stuck at 7:51, with the latest spring security it claims that WebSecurityConfigurationAdapter is deprecated. For 2023, what should I use instead? Thanks for the video!

    • @3r3bu5x9
      @3r3bu5x9 Год назад

      same
      if you find any tutorial with uses the latest spring security please provide a link

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

      @SecurityFilterChain Annonation is used with configure instade We security configurationAdapter

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

      Instead*

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

      That is literally all you have to do, if you want news about Spring changes follow Dan Vega

  • @JavaJourneys
    @JavaJourneys Год назад +2

    Can you make an updated version of this vedeo

  • @a.m.jyotiprakashsahu5754
    @a.m.jyotiprakashsahu5754 2 года назад +1

    WebSecurityConfigurerAdapter is deprecated. what to do?

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

    can you please remake a video on this topic with spring recent release. because WebSecurityConfigurerAdapter depricated. thank you.

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

    Awesome explanations for new learners of Spring framework. Really helpful content!!

  • @nogamenolife1135
    @nogamenolife1135 2 года назад +1

    Hi can you please implement this with mongoDB + JWT + Authentication + OAuth please login and registration

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

    Very nice flow n presentation , content...jst love your tutorials👍

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

    I see a lot of potential in you... You are the best tutor for Spring Boot... Keep up the work bro...

  • @ManojVG-l2l
    @ManojVG-l2l Год назад

    u made security so simple, thanks for the video

  • @goutham_gsm
    @goutham_gsm 3 месяца назад

    Very simple and great explanation.

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

    please enable transcription to the video

  • @Arkainebe
    @Arkainebe 6 месяцев назад

    Thank you man. Very well explained.

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

    You explain well. Thank you. And congrats.

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

    Thank you very much, bro! I am a beginner in Spring and it was very helpful instruction for me. Good luck!

  • @n.risliazis4332
    @n.risliazis4332 3 года назад

    simple and clear explanation. thank you.

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

    spring security jwt and ldap..please

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

    this error appears on console while trying to run....Encoded password does not look like BCrypt......what to do?

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

    Hey, can you please make a vedio on calling a microservice which is implemented with spring security from another microservice and also best practices to be followed

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

      @Daily Code Buffer yes please

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

    Which is the best way to create a secure microservice architecture? Something like this video or using JWT? Another question is: is it safe to send credentials in the body or in the headers?

  • @AmitVerma-rc1ex
    @AmitVerma-rc1ex 3 года назад +1

    multitennant based microservice ( one microservice ( or one app operating) on multiple databases and separate database for each client ) would be greatly beneficial as a tutorial, please implement it

  • @ahmettachmuradov8630
    @ahmettachmuradov8630 3 года назад +3

    great explanation, great approach and easily understandable. Thanks very much.

  • @hamidmohammadi8570
    @hamidmohammadi8570 2 месяца назад

    Great 👍 Thank you.
    How about client-server application?

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

    Perfect explanation. Thank you.

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

    Thank's a lot for the tuto! Very well done

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

    Crisp and clear! Thanks 😊

  • @dmitriydmitriy7270
    @dmitriydmitriy7270 11 месяцев назад

    Thank you for a very informative tutorial!

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

    Wow. Thanks man. You're just awesome

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

    Big fan of your tutorials..looking forward for new ones if possible pls include devops full course tutorials

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

    Thank you for that video, very undestandable

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

    Hi! Thank you so much for the video. I have been following various videos but I am stuck with a badcredentialsexception. Any suggestions on how to fix?

  • @sohailzahid9265
    @sohailzahid9265 2 года назад +1

    Good job man.

  • @AnkitKumar-jg1yh
    @AnkitKumar-jg1yh 2 года назад

    Thankyou so much for making such an useful tutorial.

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

    thanks a lot!!! so nice reverb

  • @jittukadu8628
    @jittukadu8628 Месяц назад

    thanks, buddy, I was stuck authentication provider.

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

    I'm getting error in postman 401 unauthorized similar to 403 forbidden like that... How can I resolve it... I followed all steps what u said

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

    Awesome video,please make a video on spring security using oauth2

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

    thanks man, i really like the tutorial

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

    Thank you . easy to understand.

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

    Excellent Explanation

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

    bro hats off .. but how to do postmapping? please explain for postmapping

  • @vk5503
    @vk5503 2 года назад +1

    please do the vedio with okta token security

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

    Awesome Video! Thank you

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

    perfect video. Thanks so much

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

    this is great,but i wonder how can it connect to Android app?could you make a example course?

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

    Thanks for this tutorial bro,awesome...

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

    This works well on getmapping request, will the same security configuration work for postmapping as well ?

  • @MukeshGupta-zr7yc
    @MukeshGupta-zr7yc 2 года назад

    I checked the api using postman it it showing error

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

    Hi bro,How to use different userdetail service to different endpoints. I have /student/login should use studentuserdetailservice , /staff/login should use staffuserdetailservice.

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

    You make it seem so easy...thanks a lot Shabbir....keep it up...could u plz make a video...Google And Microsoft Calendar API integration using Spring boot Oauth2 and MYsql and also in that Social login integration please make ASAP ........which involves MYSQL also how to test it ......Thanks...JaZaaaKallaah Khair

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

    Can you teach the whole course shabbir, please let me know ...

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

    it worked! thank you so much!!

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

    Hey there, lots of love for your great tutorials. Can you make a tutorial on Azure App based services with spring boot. Thanks in advance

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

    I am facing an issue with security,
    I need to esign a doc with aadhar on another website , while returning back from there if I came back within 30 to 40 sec , it came back to same user , otherwise it sends to anonymous user.

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

    Awesome work.
    Quick question. In the class WebSecurityConfiguration the @Autowired field is of type UserDetailsService and not CustomUserDetailsService.
    I know it's working and sometime Spring uses some black magic, so my guess is that the framework sees on it's classpath the CustomUserDetailsService and passes that instance?

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

    Sir I've to add "ROLE_" before my role in DB, not able to access directly by admin or user role

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

    good job ! Thanks for the tutorial

  • @a.m.jyotiprakashsahu5754
    @a.m.jyotiprakashsahu5754 2 года назад

    WebSecurityConfigurerAdapter is deprecated now on spring security version 5.7. Please make a video on latest version.

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

    Great tutorial !!!

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

    Table not created what should I do

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

    when I implement the method loadUserByUsername in CustomUserDetailsService class the variable comes as String s not String username. what should I do? Like this loadUserByUsername(String s)

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

    Great tutorial, keep on with the good work! Maybe you can help me with my one question: I accidentally mistyped the method 'findByUsername' in the UserRepository and could not start the app. Where exactly is this method defined? I looked at the interface hierarchy and could not find any method called like this. Thanks in advance!

    • @DailyCodeBuffer
      @DailyCodeBuffer  2 года назад +2

      That is format defined by Spring Data JPA. Based in the name of field we can just declare the methods

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

    Seriously excellent sir

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

    Can anybody tell me why Im getting bad credentials even if the credentials are correct?

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

    Best video ever

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

    very nice and helpful that video thanks alot

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

    Good content..also good that keyboard noise is lower than voice.. Some other videos on some other channels its way too irritating to hear mechanical keyboard noise...

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

      Thank you and sorry about that

    • @vb5969
      @vb5969 2 года назад +1

      @@DailyCodeBuffer i dont mean your videos... 🙂

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

      I also have fee videos where I have used Mechanical keyboard 😜

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

    My English is so bad , but somehow i still understand everything u said
    Thumbs up for you man

  • @026_arhmarehman8
    @026_arhmarehman8 Год назад

    Thank you, It works!!!

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

    Hello Brother, I case of any doubt or question how can I connect to you. ? Please confirm ... Thanku

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

      Message me on twitter or comment here.
      I will try to help

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

    Bro pls make registration page also.. login page was not working when I entered password hash value directly into SQL.

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

    Hi,
    I have a problem here, Suppose I am entering the correct username but the wrong password, still the system allowing user to enter the home. if I want to authenticate from both username and password how can we do that?

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

    Hey, I tried implementing the code but for correct user name and password I am getting 500 that is internal server error. Can you please help?

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

    Spring Boot + Spring Security +my sql +react how to do that one

  • @cobalt79R
    @cobalt79R 2 года назад +1

    Thanks for this awesome tutorial! Just a little question: If we have lots of roles with many endpoints, Do we use @PreAuthorize annotation instead of hasAuthority() methods in security config in order to make it cleaner?

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

    Fantastic job.

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

    Can you help me doing the same login using MSAL4J

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

    How does logout work on this? And can I have specific url for login? Like /admin/login and get session id as response?

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

    How do I download the project from GitHub? I don't see any option for download

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

    i need a doubt from controller part with mapping procedure quesry

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

    Bro, u are always precise and to the point.
    A big thumbs up from me 👍

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

    If I use a custom login page running on another port and trying to access this port I am getting cors error even though I allowed all ports Can anyone help me with this please .

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

    nice job bro it helpfull but if you you don't mind can you creat a custom login system using Angular and spring security

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

    Just watched your video and it's awesome, the problem is, I keep on getting this error code:
    Description:
    Parameter 0 of constructor in com.java.ph3.halinamarket.adapter.CustomUserDetails required a bean of type 'com.java.ph3.halinamarket.models.User' that could not be found.
    Action:
    Consider defining a bean of type 'com.java.ph3.halinamarket.models.User' in your configuration.
    can you help me please :(

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

    @DailyCodeBuffer How is it taking the password from the password we have provided in the client (angular or postman)? is that happening in WebSecurityConfiguration class where we are setting the password to get DAO provider?

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

    Awesome and the most time saving tutorial on SpringBoot Security and Login.
    Please add a deep dive video on after login session management. SpringBoot Session Management and session related security practices

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

    One video required only outh implementation industry standards please please please 🙏

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

      Will plan for it, thanks for suggestions 🙏

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

    Thank you!

  • @dreb.7760
    @dreb.7760 2 года назад

    Thank you so much!

  • @БоронбайКасымов
    @БоронбайКасымов 3 года назад

    good job!!!

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

    Thank you so much.

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

    Skillful

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

    Thank you.