If you are using latest version. Check this link: www.dropbox.com/scl/fi/evumibuz22rhekt02jasz/SpringSecurity.java?rlkey=saro7yb5fwyvzy11zrdo5cnum&st=v5c8xesx&dl=0
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.
@@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 ?
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 👍🏻
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.
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.
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 🙏
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 🙏
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
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.
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?
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. 🥰
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
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.
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
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
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?
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?
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.
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 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?
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
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.
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.
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()); }
@@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
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
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.
@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.
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
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
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.
Unable to run the code : showing this error: Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 2024-01-24T17:15:59.111+05:30 ERROR 11748 --- [ main] o.s.boot.SpringApplication : Application run failed java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.authenticationEventPublisher
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. ........❤❤