just an suggestion from my side anyone which is very new to inttelij idea please ensure you have lombok plugin installed as you will see errors whenever you use .builder method. Steps to install simply go to file->settings->plugins->search lombok and install it. i was struggling with this.
I have been facing alot of issues while learning spring security but then I came to these playlist and love it. You deserve more subscribers, more views and more likes. Thanks a lot. Btw I connected to you linkedIn too.
Please sir bring some more productive and full covered concept long video(realtime project ) like this .... Would be very helpful for us ... So that we don't have to go to another channel for getting that concept
maza aa gya this is going to be one of the high rated playlist in future crisp and clear ...one question comment on relevence of spring boot in backend please
Those interfaces who has only one abstract and may be multiple static and default methods are called Functional Interface. In Java 8 Functional programming came into the picture.
Hi Lovepreet, Thanks for the tutorial. If I remember correctly, JWT avoids db calls as it is self sufficient. I get that we need user details to process requests, so we're making db call through UserDetailsService in the JWT filter. But with sessions too, we can validate session and get user details in a single call So there's not much improvement here right?
why we storing them in repository? the entire point of jwt is to be stateless correct,🤔it defeats the purpose of storing refresh tokens in db, or you just doing it for demo purpose
Refresh tokens are stateful tokens that needs to be stored because they generally has large ttl like > few days. While JWT are generally of ttl in minutes. You can refer to our Auth service tokenisation video
Bhaiya, resuming this project, wasn't able to continue it because of exams, just a question everything working till the table creation in mySQL 1:37:14 But I never done debugging before also intellij UI giving me a headache , so I am not able to follow the postman thing, so my question is can I move to next video? Ep05 without doing that postman and debugging? thanks
Goto next video, but this is one of the component and if you are not able to code and make it work the app login and signup will not work. Headache toh aayega bro and aate rhega, for me while implementing I do debug for days that in the video gets completed in 15mins
Bro I did't use Mysql in VM, i used it on local machine only, will it cause any problem in future while implementing kafka, docker on local machine only?
when I am trying to establish a ssh connection from my windows machine to ubuntu VM using ( ssh username@ip-addr) , its constantly showing connection timed out and ping command also does shows request timed out . I tried everything from windows firewall configuration to changing port number but it is still not working . what should I do?
This is something we will solve in further videos. But solution is remove ComponentScan annotation from main application class as it is causing problems while creating beans after compiling the code
Yeah yeah you can use that. In my machine it was giving a bit of overhead thats why we switched to linux on aws later and then on local. Keep going with your machine vm only
@@SinghDevHub Bhaiya at 1:38:24 i have added the breakpoints and started the code, but they are not turning green like in your case, but in console its showing that service is started at he port. Also I send the request from postman as well but there its saying 401 Unauthorized. Mysql is running I am also getting the tables in authservice database. Previously I added a doc link in the comment to show you the screen shots, but my comment got deleted
humne TokenController ke upr @controller or Authcontoller ke upr @RestController kyu use kia hai? TokenController ke upr bhi @controller ni hona chahiye?
Bhai aap ne SecurityConfig part me copy paste krke, uske bad explain kiya each component. Mujhe lgta hai ki agar code krte hue explain krte, usme kuch gltiya hota, usko resolve krte hue sikhte to or bhi achhe se samajh aata. Just a request for upcoming videos.
Noted bro. Bhai video bhut long horhi thi and camera overheat ho chuka tha isliye config copy paste kra. By the way ye sab maine hi code kra hai so copy pasted from mycode only which I tested before the video 🙏🙏
Bro what is the exception. Read the error, is mysql working fine with your service if yes turn on the spring debug in application properties and see the error coming and to debug more put debug points and see where it is failing
@SinghDevHub yes mysql is connected successfully, I have used docker instead of VMware but I think token generate nhi ho rha thik se ya usse related koi problem h
Jwt create krte hain jab refresh token expire nahi hua. Which means login page nahi dikhaya jayega. But agr dono expire hogye hain toh login page dikhaya jayega and dono generate kre jayenge. Generation toh always random unique UUID se hi hogi na bro
@@SinghDevHub so just a final clarification We have access token and refreshtoken with us and access token is a jwt token and refreshtoken is a random uuid If my above understanding is correct Can refreshtoken be also made a jwt because I have seen people do this in node js because in doing so the logic of creating expiration date for refresh token is handled by jwtservice And also I am doing this in mongodb for a seperate project so should I create a seperate table for refresh token or let it be string in user model
@@tarunkavipurapu6127 whole idea about storing refresh token is to validate it even after few days. as JWT will be stored on the client side and stateless for the server, and it needs to be passed over request always. Whenever our container/task will go down it will not have the context of JWT but will have refresh token persisted in the DB
@@SinghDevHub so refresh token is random uuid and acesstoken is jwt I was confused because in node we mostly make both of them as jwt hence it is not needed to store expiration date for refresh token as that logic is handled by jwt. Also I am following authentication with mongodb as db should I make refreshtoken as separate table or make it a property of existing user table Thank you for taking your time and replying
@@SinghDevHub thanks a lot for taking your time and replying man can you just give me hint on how to model database in mongodb to store the tokens and user info
Bhaiya, 18:00 in CustomUserDetails while importing: import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; I am getting Cannot resolve symbol 'core' also, except getPassword and getUsername all other @Overrides saying--->Method does not override method from its superclass I tried to solve the error but it is not resolving please help
@@SinghDevHub Thank You so much it worked...took me some time but it worked while running ./gradlew clean build it gave errors indicating that the getGreeting() method cannot be found in the App class. Quite weird, but anyways I just defined it in App class and ran the build command again and it worked!
Bhai mera ek doubt tha mai Agar ham virtual threads ke sath @Async use kare to kya perfomance gain milega? I was trying something with virtual threads I am not sure if Should use them for a project Kindly help
Virtual threads are indeed good but I haven't explored them in detail yet. They effect on scale when your service is running on high rps but for personal projects i dont think it will impact anything. You can use virtual threads and use clock timing to check the time it is taking to execute a request with virtual threads and without it. make 50-100 requests per second from Jmeter or Postman and then notice the average time. You'll know how much is the performace gain
Bro ye aage jaake solve krdiya hai, problem is just remove krdo @componentScan from the main application. It took days of mine to debug this little shitty mistake. reason is there in our latest video named "making our services production ready"
Bhaiya u are going too fast and do not paste it, do it by coding slowly explaining the stuffs. As some of us being fresher don't have that deep knowledge. There's no issue being the vdo too long as dedicated ones will see entirely. But i want that our base is super strong so that it will help long run
Bhai basic cheezen paste krenge toh hi project complete hoga. Ek ek line code krunga toh 3 hrs ki video bnegi. And put efforts from your side too bhai. Ek ek line explain whi krta hoon jo advanced hai. If else explain nahi krskge
just an suggestion from my side anyone which is very new to inttelij idea please ensure you have lombok plugin installed as you will see errors whenever you use .builder method. Steps to install simply go to file->settings->plugins->search lombok and install it. i was struggling with this.
Thanks for this bro 💯
Itna zyada kuch seekhne ko mila, aisa kuch hai hi nhi YT par. Thank you
🙏🙏🙏🙏🙏
I have been facing alot of issues while learning spring security but then I came to these playlist and love it. You deserve more subscribers, more views and more likes. Thanks a lot. Btw I connected to you linkedIn too.
Thanks man 🫡
@noob_gaming903 bro i need some help.. if u hv completed this project can u help me with some steps
Thank you for the detailed explanation with project 👌
Please sir bring some more productive and full covered concept long video(realtime project ) like this ....
Would be very helpful for us ...
So that we don't have to go to another channel for getting that concept
This video is a real deal bro. Put so much efforts. It is covering up a lot of stuff
Thats is some great stuff u have taught us , do continue this series so that we will be get full idea on remaining concepts great efforts 💯💯
Yo Bro 2 videos coming soon 🚀
maza aa gya this is going to be one of the high rated playlist in future crisp and clear ...one question comment on relevence of spring boot in backend please
Spring boot is used by almost every startup/mnc operating at the large scale (scale of million+ users)
This video is really awesome. Thankyou.
Nice that you found it helpful
love your content!! keep it up
Thanks buddy 🫸👈
why are we making set and storing the User and Role instead we can use the SQL when we need to access that data right?
and also, that set only contain one user related data at any given time right?
Search more about it bro you will know why we need to store the roles and refresh tokens
@@SinghDevHub okay thank you i will
Great video sir 👍
Dekh liya poora?
top-level content
🙏🙏🙏🙏🙏
Another great one
😇
Great video ❤
Those interfaces who has only one abstract and may be multiple static and default methods are called Functional Interface. In Java 8 Functional programming came into the picture.
Yep 👍😊
Hi Lovepreet,
Thanks for the tutorial. If I remember correctly, JWT avoids db calls as it is self sufficient. I get that we need user details to process requests, so we're making db call through UserDetailsService in the JWT filter. But with sessions too, we can validate session and get user details in a single call
So there's not much improvement here right?
I think so yes. Have to revisit as i wrote it long back. But yes possible
Very good👍👍❤❤
why we storing them in repository? the entire point of jwt is to be stateless correct,🤔it defeats the purpose of storing refresh tokens in db, or you just doing it for demo purpose
Refresh tokens are stateful tokens that needs to be stored because they generally has large ttl like > few days. While JWT are generally of ttl in minutes. You can refer to our Auth service tokenisation video
can we use spring security framework for doing the same
Yep yep, if it allows this functionality go for it
next video jldi se upload krye bhai😊😊
Krte hain bro. Kafka Crash course hai next video. Because kafka and rabbimq use hoga aage project me so usko use krna pehle uski video aayegi
@@SinghDevHub wiase kb karnege aap bro
Waiting for new upload 🔥
😇
Bhaiya, resuming this project, wasn't able to continue it because of exams, just a question everything working till the table creation in mySQL 1:37:14
But I never done debugging before also intellij UI giving me a headache , so I am not able to follow the postman thing, so my question is can I move to next video? Ep05 without doing that postman and debugging?
thanks
Goto next video, but this is one of the component and if you are not able to code and make it work the app login and signup will not work. Headache toh aayega bro and aate rhega, for me while implementing I do debug for days that in the video gets completed in 15mins
@@SinghDevHubokay bhaiya, also, if you get time can you post some short videos/ shorts to explain how we do such things? that would be really helpful?
sir what plugin are you using to view those documentations in comments when you control+click anything , its pretty neat
No plugin bro
@@SinghDevHub yes issue fixed on restart my bad , but sometimes it dosent work for some reason , kinda weird , ty
Great content, something to feel confident upon. Sir when will this project end if you can give an approximate timing,it would be great
June july 2024. But along the way bhut kuch milega seekhne ko
@@SinghDevHub That's great sir. Yes Sir, all in for new learnings🔥
Bro I did't use Mysql in VM, i used it on local machine only, will it cause any problem in future while implementing kafka, docker on local machine only?
In future we will also use local machine. So no worries bro
when I am trying to signup in local , it is still giving 401 unauthorized access error on postman
Bro it is answered already in some comment similar to this. Pls refer
when I am trying to establish a ssh connection from my windows machine to ubuntu VM using ( ssh username@ip-addr) , its constantly showing connection timed out and ping command also does shows request timed out . I tried everything from windows firewall configuration to changing port number but it is still not working . what should I do?
Bro we will not use Linux VPS going on
@@SinghDevHub Sorry , I didnt quiet understand you , can you elaborate
@@b.chinrhea You can use local system of yours in furhter video we will not use Virtualmachine
great content , keep making
can I use Maven instead of gradle and follow this playlist
Yes yes both are same most of the times so no worries
when trying to signup , it is giving 401 unauthorized access error on Postman , how will i be able to generate token if it is not able to signup only.
This is something we will solve in further videos. But solution is remove ComponentScan annotation from main application class as it is causing problems while creating beans after compiling the code
🔥🔥
🙏🙏🙏🙏🙏
Bro in previous video, you said to download the Ubuntu server, not desktop so I am using that. Will there be any problem.????
Yeah yeah you can use that. In my machine it was giving a bit of overhead thats why we switched to linux on aws later and then on local. Keep going with your machine vm only
@@SinghDevHub Bhaiya at 1:38:24 i have added the breakpoints and started the code, but they are not turning green like in your case, but in console its showing that service is started at he port. Also I send the request from postman as well but there its saying 401 Unauthorized. Mysql is running I am also getting the tables in authservice database.
Previously I added a doc link in the comment to show you the screen shots, but my comment got deleted
@@rajapandey773 you can raise an issue on github with screen shot attached right.
@@SinghDevHub did bhaiya, please check when you get time. thanks.
when using the jjwt library to extract claims as mentioned in the video it is showing deprecation message. how to resolve this?
By using their updated method. I didn't research around it what is the new method. You can
humne TokenController ke upr @controller or Authcontoller ke upr @RestController kyu use kia hai?
TokenController ke upr bhi @controller ni hona chahiye?
Both works bro. kuch bhi use krlo
Bhai kya mai maven use kr skta hu with eclipse? gradle ke bjai?
Yes yes no issues.
Bhai aap ne SecurityConfig part me copy paste krke, uske bad explain kiya each component.
Mujhe lgta hai ki agar code krte hue explain krte, usme kuch gltiya hota, usko resolve krte hue sikhte to or bhi achhe se samajh aata.
Just a request for upcoming videos.
By the way, aapka content extreme level ka hai. Itna deep concepts samjhate ho ki yehi se sikhke big complex system banaya ja sakta hai.
Thanks bro ❤
Noted bro. Bhai video bhut long horhi thi and camera overheat ho chuka tha isliye config copy paste kra. By the way ye sab maine hi code kra hai so copy pasted from mycode only which I tested before the video 🙏🙏
I'm not able to signup, every time i try to signup using postman request i get "Exception in User Service".....please help
Bro what is the exception. Read the error, is mysql working fine with your service if yes turn on the spring debug in application properties and see the error coming and to debug more put debug points and see where it is failing
@SinghDevHub yes mysql is connected successfully, I have used docker instead of VMware but I think token generate nhi ho rha thik se ya usse related koi problem h
@@varun3286 Put debug points bro and see hokya rha hai,
@@SinghDevHub okay sir
Spring boot microservice ka complete video bna do
Course is not gonna come bro. We focus on learning while building some real stuff
Bro kya refreshToken generate karne keliye JWT ko use nahi karrahe ho kya is it just a random id
Jwt create krte hain jab refresh token expire nahi hua. Which means login page nahi dikhaya jayega. But agr dono expire hogye hain toh login page dikhaya jayega and dono generate kre jayenge. Generation toh always random unique UUID se hi hogi na bro
@@SinghDevHub so just a final clarification
We have access token and refreshtoken with us and access token is a jwt token and refreshtoken is a random uuid
If my above understanding is correct
Can refreshtoken be also made a jwt because I have seen people do this in node js because in doing so the logic of creating expiration date for refresh token is handled by jwtservice
And also I am doing this in mongodb for a seperate project so should I create a seperate table for refresh token or let it be string in user model
@@tarunkavipurapu6127 whole idea about storing refresh token is to validate it even after few days. as JWT will be stored on the client side and stateless for the server, and it needs to be passed over request always. Whenever our container/task will go down it will not have the context of JWT but will have refresh token persisted in the DB
@@SinghDevHub so refresh token is random uuid and acesstoken is jwt I was confused because in node we mostly make both of them as jwt hence it is not needed to store expiration date for refresh token as that logic is handled by jwt.
Also I am following authentication with mongodb as db should I make refreshtoken as separate table or make it a property of existing user table
Thank you for taking your time and replying
@@SinghDevHub thanks a lot for taking your time and replying man can you just give me hint on how to model database in mongodb to store the tokens and user info
Html valu change kaise kare but debugger is lock
Hain??
@@SinghDevHub bta do ji
@@DIZITALHELPER pooch kya rhe ho. Elaborate kro
Bruh UI design kr kronge kya?
Yes bhai try krenge don't worry.
Bhaiya, 18:00
in CustomUserDetails
while importing:
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
I am getting Cannot resolve symbol 'core'
also, except getPassword and getUsername
all other @Overrides
saying--->Method does not override method from its superclass
I tried to solve the error but it is not resolving please help
include lombok implementation, test implementation and compile implementation in build gradle. And try to run ./gradlew clean build
@@SinghDevHub Thank You so much it worked...took me some time but it worked
while running ./gradlew clean build it gave errors indicating that the getGreeting() method cannot be found in the App class.
Quite weird, but anyways I just defined it in App class and ran the build command again and it worked!
Bhai mera ek doubt tha mai
Agar ham virtual threads ke sath @Async use kare to kya perfomance gain milega?
I was trying something with virtual threads I am not sure if Should use them for a project
Kindly help
Virtual threads are indeed good but I haven't explored them in detail yet. They effect on scale when your service is running on high rps but for personal projects i dont think it will impact anything.
You can use virtual threads and use clock timing to check the time it is taking to execute a request with virtual threads and without it. make 50-100 requests per second from Jmeter or Postman and then notice the average time. You'll know how much is the performace gain
Bhai kya mei spring framework aur spring boot intellij community version me sikh sakta hu ? I am beginner please reply
Yes... IntelliJ community is more than enough
401 unauthorized error aa rha hai
Bro ye aage jaake solve krdiya hai, problem is just remove krdo @componentScan from the main application. It took days of mine to debug this little shitty mistake. reason is there in our latest video named "making our services production ready"
It also takes me 3 to 4 days . I searched here and there after I got frustrated and I think I should comment on this video
Can you create backend node js course please???
Focusing on the Backend core using Java as of now.....
Complete ho gya kya project ??
Auth service is completed. And we'll integrate rabbitmq in the next video with auth service
Bro Code git pe dalo na ki drive pe Thanks.
Bhai Git pe meri SSH key add nahi ho rhi. Drive se lelo
Bhaiya u are going too fast and do not paste it, do it by coding slowly explaining the stuffs. As some of us being fresher don't have that deep knowledge. There's no issue being the vdo too long as dedicated ones will see entirely. But i want that our base is super strong so that it will help long run
Bhai basic cheezen paste krenge toh hi project complete hoga. Ek ek line code krunga toh 3 hrs ki video bnegi. And put efforts from your side too bhai. Ek ek line explain whi krta hoon jo advanced hai. If else explain nahi krskge