Spring Security in Spring Boot in Hindi | @EnableWebSecurity Annotation
HTML-код
- Опубликовано: 18 окт 2024
- 🟡 Perks: / @engineeringdigest
🟡 Patreon: / engineeringdigest
🟡 Discord: / discord
🟡 Slack: join.slack.com...
🔴 Twitch: / engineeringdigest
🔴 Personal RUclips Channel: / @thevipulvats
🔴 Instagram: / thevipulvats
🔴 Twitter: / thevipulvats
🔴 LinkedIn: / thevipulvats
🔴 Website: engineeringdig...
🟢 Source code: github.com/cho...
🟢 Spring Security 6 config: www.dropbox.co...
🔴 IMPORTANT !!!!!!
If circular dependency comes then add this property in .yml file
spring:
main:
allow-circular-references: true
or spring.main.allow-circular-references=true in .properties file.
If you are using latest version. Check this link: www.dropbox.com/scl/fi/evumibuz22rhekt02jasz/SpringSecurity.java?rlkey=saro7yb5fwyvzy11zrdo5cnum&st=v5c8xesx&dl=0
Sir I tried a lot can please help us
from the beginning, I have used spring boot 3.2.4, while I add the spring-boot-starter-security dependency to the pom.xml, I can't find the WebSecurityConfigurerAdapter, while searching, it's deprecated from 3.0.0. Tried to fix the issues myself, and sorry. Finally, rollback to the least version 2.7.18.
check last link in bio.
@@EngineeringDigest I was stuck in new spring security bcs it was giving me circular dependency issue but I was able to fix it when I again saw the discription. But I found out that it is not a best approach it can cause difficulties in maintaining? Is that right ?
@@hamdanahmed3565 use constructor to initalize final service objects instead of autowired...that might solve the issue
If you are get stuck in this project due to circular dependency just add (spring.main.allow-circular-references = true) this property in application properties file.
Great tutorial with expressive content, thanks for sharing such great article.
Just a comment on the comment you discussed around 22:00 I've already tried a lots of tutorials available on YT. And never get a clear picture in my mind. Just 22 minutes in and things making a lot of sense. Obviously, I'm not a beginner I knew a lot of things but I wasn't able to link them together in such a way that even I can explain to a total noob in such a way that the person understands everything.
Note for Vipul bhai ❤: Please don't discuss any gandgi spreader in our videos, you broke my rhythm. So it's a request to keep doing the wonderful thing that you are doing. 😍😄
Hi Vipul... watching from Boston, Massachusetts. Really great explanation! I specifically love the part where you make it funny. That keeps it lively and with examples you make it very easy....this helps to remember key details.
Thanks a lot :)
Bhai great explanation. Going to watch all your series soon.
And please don't bother abt ppl complaining about your spides, infact these slides help grasp things quickly when we listen and read along. it really helps better rather than just listening. good stuff. Keep it up 👍🏻
Sir You Are Awesome. I Love your way of teaching. I am lucky to have a teacher and brother like you. Thanks. I got selected in Sprinkler and the large part of credit goes to you. Thanks a lot Again. 🥰
WebsecurityconfigurerAdapter is depricated now....make video on current security scenario.....u taught it very well
org.springframework.boot
spring-boot-starter-parent
2.7.18
change ur pom.xml to this
abi k lie ye hi krdo
@@davendrabedwal830 what should be the java version in pom? for 2.8.17 because when i changed the version it cause an error
Hi Sir, I just found a awesome tutorial it's my bad luck to get so late , request you Vipul sir pls keep it up
Best of luck ,dil s ❤
Thanks
Best video of Security till the date! keep posted☺
One of the best RUclips channels ! By watching your videos a 10 year old kid can start coding 🎉
Thanks a ton
merko bhi paise chaiye 🥹
@@aspiring_Sr.dev_Om Kaam karo Paise milenge
Sir keep on ..dont get disappointed by negative comments..ur teaching is awesome.
Thanks sir for your genuine efforts ❤🎉
Your content always up to the mark really love your content 💖
Please complete spring boot series as soon as possible 🙏
21:55 avoid thus kind people sir , i live your teaching style and slides are explained in well manner i mean no hards words in their ,
Once again love you
Hi Vipul ... WebSecurityConfigurerAdapter does not exist in Sping Security 6 (SpringBoot 3 and above), Could you please update this tutorial.
Very well explained , watched full video . It will be a cherry on top if you can provides notes of spring security
Dear sir, I recently discover your channel and I just want to say you are awesome.
Welcome aboard!
Thank you Sir for the efforts to teach in such a basic way. As WebSecurityConfigurerAdapter Interface is Deprecated, how will it impact the existing projects, and Should we use any Deprecated methods?
no
Sir it would be helpful if you can provide the document or article from where you are teaching
thanks a ton sir i know you're what you're teaching is just basics but it is really helpful. i study about the terms you mention from chatGPT. keep mentioning just the terms and overview of it and we can learn the rest from internet
I'm having trouble extending the SpringSecurity class (WebSecurityConfigurerAdapter) due to the error "Cannot resolve symbol 'WebSecurityConfigurerAdapter'." According to Stack Overflow, this class has been removed in the latest Spring Boot library. How can I resolve this and extend the appropriate class for configuring Spring Security in the latest version?
I think it's related to Spring Security versioning problem
@@AnantaAkash.Podder which version your are using ?
you can check out latest version of spring security 6.2 on medium article.
First of all thank you for such great videos. Just wanted to say that spring security has deprecated this WebSecurityConfigurerAdapter 2 years back, and since you are making the videos now it will be helpful if you can update the videos accordingly
Concepts remain same
@@EngineeringDigest okay will try to implement the new way after watching your video. Thanks
sir Perfect spring boot course perfect time pe Mila hai ❤
🤝
hello boss your videos are just awesome and way of teaching is just unmatchable.
i request you to develope a complete project with spring boot backend and vue js frontend plzzz and mainly focus on admin and user roles in that projects. thanks
Bro seriously it feel like podcast maja agya 😊
Sir, make a new video with Spring Boot security latest
no
Since I also got the same issue for 401-unauthorized access while doing post request for a new user, what I did was to set the auth type to no auth and inserted the endpoint in request matchers to make sure that end point becomes authenticated after creating the public controller.
I am facing the same issue can you explain me how to resolve it please.
@@sadhnamall7357 go to postman, -> auth, then change to No Auth
I am getting same issue for PUT request. Can you help on resolving this
@@ayushisinha31 remove the auth.... Postman pr
@@SupremeSidsorry I didn't get you can you please explain what exactly needs to be done
I have been following you for a month, and you are the best teacher.
Thanks for your time, bro. I really appreciate you.
and am 50kth sub guy.
I'm a slow learner and it took me almost 3-4 hours to take notes and do the code. But now everything is clear.
Vipul Sir In my case their was one change needed to be done in the code provided in the description. We need to create "PasswordEncoderConfig" class in the same "config" package and then provide the dependency of PasswordEncoder in the "SpringSecurity" class because I was facing the unresolvable circular reference issue.
check description, you can also add this property for circular dependency.
@@EngineeringDigest Ok
@@EngineeringDigestStill iam getting the error sir. What to do
Sir spring security ko spring boot web me kese configure kare jese apna custom login jsp page banana ho . Please Spring security ka Spring boot web k sath configuration ka ek tutorial bana do . Please sir 🙏
timestamp 8.02. Sir, ConfigurerAdapter is deprecated now. Please use latest version
Best content on you tube.
sir plz next new video for incease knowlauge of main.Thank u?
👌
@EngineeringDigest Thank you for this series, Your videos are next level no one is going to give such content that too free of cost, your style of teaching is too unique.
Thank you Vipul
What is better for creating rest api in spring boot webflux or by default spring provide web rest api
Put controller to update user is not working, as the credentials I am giving in Basic Auth is coming as Anonymous User....any resolution for this??
Hello sir
Why you took username in basic auth as user? I got bit confuse there
Please make spring security video with spring boot 3 and new classes like security filter chain and AuthenticationManager
one day everything is going to depricated guys you have to update yourself according to market, if you wanted to survive you have to took effort
Nice tutorial. This video was bit overwhelming
Bhaiya i am getting an anuthorised requests while creating entry
Thank you so much Sir !
You're very welcome! I'm glad you found the tutorial helpful.
My password and user working on browser but not wokring in postman any solid reason?
Such underrated channel , you deserve more subscribers ❤ i am telling this from my heart.
Thank you so much 😀
Please make a separate video to use postman
I deleted all the user and now I am unable to create any more users because of spring security. It's showing unauthorized 401 every time I want to create more user. Can you please help?
keep watching the video, we skipped the public controller which can be used to add new users
@@EngineeringDigestI am able to create user but the password encryption is not working while saving the password in database.
Sir, I love your work, but a very minor suggestion agr ap bura na manne to sir or Bilkul Healthy Criticism hai, baki ssari videos bht badia thi pr sir ye video clear ni thi sir samj mein nahi aa paye bht kuch, agr ho paye to spring security 6 sath re-record zarur krna sir isse. Kuki me bht dino se is video par hoon or logo ki video tutorial bhi dekhe pr cheeze match nahi kr paa rha tha mein.
Again sorry sir agr apko subtle review bura lage to is video ka
the best explanation ever
Bhai is really lit and underrated is itself underrated for him
WebSecurityConfigurerAdapter is showing red in my application, even after adding required maven dependency.. tried refreshing eveything still didnt work?
Is it because SpringBoot not supporting WebSecurityConfigurerAdapter in latest version?
I see you didnt add version for this dependency..I tried the same but didnt work for me :(
Hello, in latets spring security version WebSecurityConfigurerAdapter class is deprecated. Instead of this you have to use SecurityFilterChain as a bean in your config class.
@@keshavdeosharma7222 can you share this security code using SecurityFilterChain for this project
When the user did not require authentication and you called the API at (38:19), did you pass Basic auth? Also, after we've created the Spring config class, will we get a basic authentication pass in the console? Because I am not getting . Please help me with this issue
same I am not getting bro 😢😢😢
i am also facing the same issue...any resolution???
Sir , which version of spring you are using ,I'm unable to extend WebSecurityConfigurerAdapterClass and its methods 😔
It's deprecated in Spring 5 & above
Thank u sir
Most awaited video❤
great content!
what should i write for new version instead of this in securityconfig-->
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.userDetailsService(userDetailService).passwordEncoder(passwordEncoder());
}
When i am updating the username i am getting internal sever error ? is anyone here facing same ?
Sir Microservice video please.........
Hi, can you provide that ppt too.
When the user did not require authentication and you called the API at (38:19), did you pass Basic auth? Also, after we've created the Spring config class, will we get a basic authentication pass in the console? Because I am not getting. Also, I am liking your videos but this video didnt had much explanation about UserDetailsServiceImpl and SpringSecurity Config. I mean you did but I felt not how you did in other videos.
bro resolve hua ??
i am also not able to login even after providing the credentials
@@nitishah5879 bro after making public controller your issue will be resolved
bhai issue solve hua
@@scratchworld6599 solved??
acha padate hai app bhai
please make a video in JWT authentication
bhaiya new video kab aane wali hai ?
thank you
sir, screen text is not visible. Plese increase the the size
@EngineeringDigest can you provide the PPT file for the future reference
after adding the dependency and using password in basic authorisation there's still error of unauthorised in postman what to do?
Just close the tab you are using on postman and add a new request or a new collection.
Good content sir . Just had a doubt In load user by username method how do we handle if username is same in db ..
username same nahi ho sakta kyunki unique="true" hai
The default password is not printing on console now...whats the solution?
Circular dependency error aa raha hai please make video with newer version of spring security
check description
@@EngineeringDigestthanks for reply. I tried that thing so the error has gone but now it shows 404 Not Found and it is not authenticating me I am writing the same username and the password present in mongo Atlas. Please help
Issue solved. Thanks
Authorization nhi horhi sahi se 401 Unauthorized error arha ha jabke mein credentials sahi daal rha hu basic auth mein
Why my postman and MongoDB atlas is out of sync. Their datas are different.
Encountering this error in the code provided in the link in description:
Error creating bean with name 'springSecurity': Requested bean is currently in creation: Is there an unresolvable circular reference?
If circular dependency comes then add this property in .yml file
spring:
main:
allow-circular-references: true
or spring.main.allow-circular-references=true in .properties file.
Sir i got error even i use the lastest version and added spring.main.allow-circular-references=true in .properties file.
Thank you for your comment! Could you please share the specific error message you're encountering? Additionally, make sure there's no typo in your .properties file and that you've correctly spelled spring.main.allow-circular-references=true. This will help me provide a more accurate solution.
getting 401 or near to 403 error in postman
sir how can i resolve that?
same problem i have . i am using spring security latest version after apply all the code given by sir but still get 401 and 403 you solve this problem or not
anybody have idea!!! I am not able to update user though create user is working perfectly I am using latest springboot project and in postman using basic auth it show 403 forbidden
+1
@@vedantsingh2609 do you facing the same issue ??
@@anup2136 I was getting the similar issue. Resolved it today. Are you using the latest spring security or working with the ones used in the video?
If you're using the latest security, you must be using SecurityFilterChain method instead of configure to authenticate the endpoints. Just add .httpBaisc(withDefaults()) at the end before returning http.build() and make sure to import the static withDefaults() method. The config would work then.
@@vedantsingh2609 I am using latest one. I did it to, now its working fine.
at 22 mins ache se jhad diya sir apne
I have lost basic authentication default password which we put in postman and on console it is hidden.. So can somebody pls help me on how to recover that?
Same issue, have u resolved it?
how you explain i started loving you dude. thank you very much
sir your code deprecated and you should push your each video code in separate branch its very difficult to find your code or any one video.
you can see commits in github.
@@EngineeringDigest ok then what about deprecated code ?
WebSecurityConfigurerAdapter is going deprecating. any comment on this
and please make complete explianation video with JWT with fliters as well
check previous video in the same playlist
@@EngineeringDigest I didn't get any video in the playlist with jwt implementation. Can you share the link here please
If anyone getting 401 unauthorised error in your POSTMEN during POST request. Then go to POSTMEN in authorization section select NO Auth. You error has been solved.
🤝
still getting the 401 and 403 error
@@PrathamMakwana-wr5lv same bro ..
@@PrathamMakwana-wr5lv check your postmen if you select Basic auth in authorization. Then set authorization to NO AUTH
@@RAHULVERMA-o1mThanks brother⚡, but now what we have to do for GET request?
Please make LLD videos in java
Unauthorised error on postman ...for inserting a user .and all other calls.
hua bhai resolve
@@rold7256 Same bhai nahi hua resolve, any way?
@@nikhilchoudhary2955 bhai mongodb ka issue hai network access dekho mongodb atlas pe hoga pe current ip add kro purnai delete kr ke fir run kro
Hua kya resolve?
Yes solve ho gya
@EngineeringDigest bro can you please send me the presentation that you are referring in the video. Please bro sent us so that we can refer those.
Brother github sourcecode link is not opening
Sir, your video is awesome....
But you take a long gap to upload a next one!😂
The reason is in your comment itself 🤝
bcz video is awesome @@EngineeringDigest ❤
it will be great if u could shorter the gap. @@EngineeringDigest
If sidhi baat no bakwaas had a face. It would be Vipul Sir
Make more video ❤
but spring security 5.7 se jyada ho toh deprecate ho gya hai
ok
Sir java aati h muje direct spring boot start kru ?
yes
when next video will come vipul bhaiya👀❤
jan-feb, stay tuned
bhaiya mera code nhi chl raha 38:22 se postman me unauthorised bata raha jabki sab code follow kar raha hoon 😟😟😟😟
how can you that solve this error? i also getting the same error
@@shrutiraval6806 continue watching the video he will teach about public controller after making that your problem will be solved
@@scratchworld6599 bhai mera fir bi aa rha sare call pe 401 forbidden error
30:00
Please use latest version
Ok, I will use Spring Boot 10323
🌟🌟🌟🌟🌟
Please upload source code sir
Worst framework ever made by anyone is spring security utter nonsense.
Thank You...........❤❤, I was looking for this video for a long Time
Liked and subscribed and shared in my WhatsApp group.
And again thank you so much. ........❤❤
thank you so much