I'm really not a big fan of this change. Did anyone ask for this? I mean, just how many guide and tutorials did they break with this update. Spring Security is already very difficult to learn for beginners and first-time users, now it's just going to make it even more complicated.
@CodeJava Жыл бұрын
I don't like those changes, too. You can stick with old Spring Boot / Spring Security version (spring boot 2.6.x), so you won't get this kind of headache.
@khanhtran1473 Жыл бұрын
I totally agreed with you. I'm struggling to learn spring security with their new changes cause all the tutorial on youtube are outdated because of it.
@khanhtran1473 Жыл бұрын
@@CodeJava I've read some documentation from Baeldung about spring boot starter parent and found out that you can specify the version of Spring Security you want to use by downgrading the spring-boot-starter-parent version to below 2.7.0. However, that would also downgrade the version of other things like JPA and Lombok,... which I really don't want to do. So I'm trying not to touch the spring-boot-starter-parent. I've tried to downgrade the spring-boot-starter-security version only, but it doesn't work. I would appreciate it if you could help me with this. Thanks.
@CodeJava Жыл бұрын
@@khanhtran1473 just try different versions of Spring Security (Check on Maven central repo).
@pkp20233 ай бұрын
He Dosent Work for you or your company.
@ajitkumarneeraj93742 жыл бұрын
Sir What to do with this method @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.authenticationProvider(authenticationProvider()); } Will it be the same or changes will be required, showing error
@CodeJava2 жыл бұрын
remove that method. It's no longer needed.
@italoleitao-sc10912 жыл бұрын
@@CodeJava How do I do to get the AuthenticationManager?
@mucizelerden9 ай бұрын
Sevgili dostum, ingilizce bilmiyor olmama rağmen olayı anlamış olmam senin başarın Teşekkür ediyorum👍
@CodeJava9 ай бұрын
glad it helped.
@ktn42 жыл бұрын
Oh thank you for the update bro Nam
@CodeJava2 жыл бұрын
No problem
@lehienisbk Жыл бұрын
After login, back acs url has error 403. Please help me.
@MyBinaryLife2 жыл бұрын
Does not work. @Bean public WebSecurityCustomizer webSecurityCustomizer() { return (web) -> web.ignore().antMatchers("/images/**", "/js/**", "/webjars/**"); } this doesnt do anything, as .ignore() method does not exist.
@ayael119 Жыл бұрын
Did you find a solution i have the same methode
@alberiinaciodasilva53132 жыл бұрын
how could I do to allow anyone to access a password reset page?
@NidhishGandhi Жыл бұрын
I removed extends WebSecurityConfigurerAdapter still getting this error: Caused by: java.lang.IllegalStateException: Found WebSecurityConfigurerAdapter as well as SecurityFilterChain. Please select just one.
@CodeJava Жыл бұрын
there's still one exists. You must delete it.
@nidhishgandhi5982 Жыл бұрын
@@CodeJava I didn't find any. Can you pls tell some other class that indirect uses it
@TrungLe-re5so Жыл бұрын
Seem like antMatchers is deprecated too. The server fail to start because the method antMatchers(String) is undefined for the type WebSecurity.IgnoredRequestConfigurer When I change to requestMatchers("/resources/static/**"), the server can start without error, but can't access all my files inside resources/static folder and all css are all gone. Need your guide. Thanks~
@CodeJava Жыл бұрын
why do you do requestMatchers on static resources? They should be ignored in authentication and authorization.
@TrungLe-re5so Жыл бұрын
@@CodeJava I can't find a way to ignored static resources because there is no web ignoring antMatchers in the new spring security 6.
@ayael119 Жыл бұрын
I have an error in websecuritycostmizer and also even after doing this changes k got this err while runing the app : org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [org.springframework.boot.autoconfigure.security.servlet.SpringBootWebSecurityConfiguration$WebSecurityEnablerConfiguration]: class path resource [org/springframework/web/servlet/config/annotation/WebMvcConfigurerAdapter.class] cannot be opened because it does not exist
@ponsenthilvel00004 ай бұрын
Also bro i am having 4 hall (eg: saloon or exam hall)in each hall there's time slot for every 1/2 hr . Customer or student can book wat hall they want at that time could any one help me using spring boot
@maheshbabunadigoti70502 жыл бұрын
Thanks for the update... I purchased this course nahm...do we have any videos regarding Java agent in this channel...
@CodeJava2 жыл бұрын
Glad to hear that. I don't have any video about Java agent.
@yasminnadia26912 жыл бұрын
Hi dear I'm recently doing my project by following you spring boot ultimate course. I followed this video and my deprecated problem is solved. but when I dont know how to convert this below code. I can not use authenticationManagerBuilder if I don't use "extends WebSecurityConfigurerAdapter" . I've tried following this video but everytime I enter right password it says either bad credential or user is disabled. Please help me converting this below code without WebSecurityConfigurerAdapter. @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.authenticationProvider(authenticationProvider()); }
@CodeJava2 жыл бұрын
kindly check new update in my article: www.codejava.net/frameworks/spring-boot/fix-websecurityconfigureradapter-deprecated
@bluex2172 жыл бұрын
Still cannot find working example using DAOAuthenticationProvider
@CodeJava2 жыл бұрын
Check solution in my article here: www.codejava.net/frameworks/spring-boot/fix-websecurityconfigureradapter-deprecated
@bluex2172 жыл бұрын
@@CodeJava Thank you! I wasted some time and didn't realize that I had a plain text password in the DB yet was using BCrypPasswordEncoder, but your solution helped me realize this :)
@vaishnavis639 Жыл бұрын
Hi , Could you help me for replacing websecurityconfigureadapater deprecated in spring boot 2.7 versions
@CodeJava Жыл бұрын
Oh, isn't that described in this video? You can also check my article here: www.codejava.net/frameworks/spring-boot/fix-websecurityconfigureradapter-deprecated
@chandnisudhan58932 жыл бұрын
whether the Full working code is available for download? Utility and filter class is available?
@CodeJava2 жыл бұрын
you can get the full project code when you enroll my course here: www.udemy.com/course/spring-boot-e-commerce-ultimate
@chandnisudhan58932 жыл бұрын
@@CodeJava is it handled with jwt spring security
@CodeJava2 жыл бұрын
@@chandnisudhan5893 no, it is not.
@chandnisudhan58932 жыл бұрын
@@CodeJava can you pls add jwt security in coming video
@luisphan7403 Жыл бұрын
@Code Java i have full course but i can’t download.
@gaurrahul6195 ай бұрын
plz make seperate playlist for spring security 6
@CodeJava5 ай бұрын
Sure, I will.
@cesarramirez3300 Жыл бұрын
hi, does it still work today? because i am working with spring 2.7.x
@CodeJava Жыл бұрын
sure, it will work. Did you try it out?
@cesarramirez3300 Жыл бұрын
@@CodeJava Not yet, I'll try it today!
@ramsesgirala54222 жыл бұрын
Hi, i'm having problems with Oauth2 and github, could you help me?
@CodeJava2 жыл бұрын
check this video: kzbin.info/www/bejne/qJTMfmmgaNiii9U
@dmeritano2 жыл бұрын
What language do you speak my friend? Anyway, very good video! Thank you
@CodeJava2 жыл бұрын
I know what you mean. Thanks anyway :)
@vickeykanchi6804 Жыл бұрын
When I tried to extend with configure adapter I was getting error
@CodeJava Жыл бұрын
what's the error? Kindly share full details.
@vickeykanchi6804 Жыл бұрын
@@CodeJava when I tried that web security configure adapter by seeing this code i was getting error
@vickeykanchi6804 Жыл бұрын
@@CodeJava is there any telegram channel so that I can post a pic with error
Bro i need that full video for creation of shop me app is it e- commerce web ! Can I get that video link mainly for authorization video .... Do u have any comple video for e commerce website!
@CodeJava4 ай бұрын
yes, check this course: www.udemy.com/course/spring-boot-e-commerce-ultimate
@edakas Жыл бұрын
in my code this solution does not work :(
@CodeJava Жыл бұрын
I think you will find this article helpful: spring.io/blog/2022/02/21/spring-security-without-the-websecurityconfigureradapter
@FPT-LT6 ай бұрын
Are you vietnamese right? I reconized from your ascent.
@CodeJava6 ай бұрын
yes, I am. Welcome to my Java channel :)
@ajitkumarneeraj93742 жыл бұрын
Sir your website is not working.
@CodeJava2 жыл бұрын
I see, it might be network issue on the server side. Kindly come back later. Thanks.
@ajitkumarneeraj93742 жыл бұрын
@@CodeJava Now Working.
@ziaurrahman95292 жыл бұрын
thanks for the suggestion! , i will use it later and implement it to my app
@CodeJava2 жыл бұрын
Glad it was helpful!
@JRK_RIDES2 жыл бұрын
Excellent video. Thank you sharing. I've one question, can you please help me rewrite the below method for latest spring security version? Or point me towards any guide or article or documentation. @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.userDetailsService(userDetailsService).passwordEncoder(bCryptPasswordEncoder); }
@CodeJava2 жыл бұрын
that method is no longer needed now. Reference: spring.io/blog/2022/02/21/spring-security-without-the-websecurityconfigureradapter
@pablobhz2008 Жыл бұрын
@@CodeJava It is no longer needed, however the code won't work without it. It throws an exception missing a bean.
@vijaygv93322 жыл бұрын
code git url please
@CodeJava2 жыл бұрын
check this article: www.codejava.net/frameworks/spring-boot/fix-websecurityconfigureradapter-deprecated
@rohan-san81482 жыл бұрын
how to replace this pls : public void configure(AunthenticationManagerBuilder auth) throws Excetption { auth.userDetailsService(userDetailsService).passwordEncoder(bCryptPasswordEncoder);
@CodeJava2 жыл бұрын
just remove it and declare a bean of type PasswordEncoder. See this article: www.codejava.net/frameworks/spring-boot/fix-websecurityconfigureradapter-deprecated
@rohan-san81482 жыл бұрын
@@CodeJava thank you
@jaymarkalvarez98512 жыл бұрын
Amazing! thanks a lot. subbed
@CodeJava2 жыл бұрын
Thanks for the sub!
@johnstorm5892 жыл бұрын
Am I the only one frowning at the WebSecurity lambda?
@CodeJava2 жыл бұрын
you're not. It returns an object of the type declared in the method's signature.
@MyBinaryLife2 жыл бұрын
@@CodeJava it doesnt return anything or work at all. it warns that ignore doesnt exist, and breaks everything.
@brazo982 жыл бұрын
Perfect Nahm thx a lot 😻😻😻
@CodeJava2 жыл бұрын
You're welcome 😊
@samuelsodagudi Жыл бұрын
Many thanks 👍
@CodeJava Жыл бұрын
Welcome 👍
@djmaster1110 Жыл бұрын
Thanks a lot
@CodeJava Жыл бұрын
Happy to help
@markifive2 жыл бұрын
Thanks you for your code
@CodeJava2 жыл бұрын
You're welcome!
@congdatt Жыл бұрын
Thanks a lot bro ^^
@CodeJava Жыл бұрын
You're welcome!
@gt-uj6fz2 жыл бұрын
hello code Java, i copied your program "Spring Security JWT Authentication Tutorial" it worked with me. then i decided to try it without websecurityconfigureadapter, i copied every thing the video "Fixed] Spring Security WebSecurityConfigurerAdapter Deprecated' , the program gave me error at authenticationmanager. it looks like program does not recognize the authenticatiommanager, i also, noticed you did not specify any autnentictionmanager in the configuration part. i get the error at public ResponseEntity login(@RequestBody @Valid AuthRequest request) { try { Authentication authentication = authManager.authenticate( new UsernamePasswordAuthenticationToken( request.getEmail(), request.getPassword()) ); so any help will be appreciated. thanks
@CodeJava2 жыл бұрын
you can declare a bean of type AuthenticationManager like this: @Bean public AuthenticationManager authenticationManager(AuthenticationConfiguration authenticationConfiguration) throws Exception { return authenticationConfiguration.getAuthenticationManager(); }
@bluex2172 жыл бұрын
@@CodeJava Hey there! I've tried this but still it's not obvious how to 1. Set the AuthenticationProvider type using the AuthenticationManager 2. pass the AuthenticationManager into http.setAuthenticationManager() - I should just call the method from here? I tried autowiring as bean from another class but get circular reference exception
@CodeJava2 жыл бұрын
@@bluex217 check solution in my article: www.codejava.net/frameworks/spring-boot/fix-websecurityconfigureradapter-deprecated
@ahmedtiba3862 жыл бұрын
in Authentification Controller @PostMapping("/authenticate") public ResponseEntity authenticate(@RequestBody AuthenticationRequest request){ authenticationManager.authenticate( new UsernamePasswordAuthenticationToken(request.getLogin(),request.getPassword()) ); ........ how i can change this code ?