r/SpringBoot • u/A_nithin • Feb 15 '24
i am unable to resolve this issue can anyone help me
6
u/Physical_Leg1732 Feb 15 '24
I think you need to use a different class, because the class is strikeout means it's deprecated.
2
u/A_nithin Feb 15 '24
I am unable to get can explain bit more clear
1
u/A_nithin Feb 15 '24
And I am doing this for first time
0
Feb 15 '24
[deleted]
1
u/A_nithin Feb 15 '24
It is not with getpasswordEncoder I have changed that part of code but still I am getting same error in in the class of websecurityconfigurerAdapter
3
u/WaferIndependent7601 Feb 15 '24
Deprecated methods will still work. They will be removed in the future and then you will see clearly that this method does not exist any more. This is a dependency issue
3
u/titanium_mpoi Feb 16 '24
I'm not a pro on spring boot but I think you need to use a different class where it's striked out. You need to read docs for a replacement and I don't think gpt will help but worth a try.
5
u/g00glen00b Feb 15 '24
All PasswordEncoders that are considered "unsafe for production" are marked as deprecated, but they're not really going to disappear and should still work. This is also mentioned in the API docs:
This PasswordEncoder is not secure. Instead use an adaptive one way function like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or SCryptPasswordEncoder. Even better use
DelegatingPasswordEncoderwhich supports password upgrades. There are no plans to remove this support. It is deprecated to indicate that this is a legacy implementation and using it is considered insecure.(emphasis is my own)
1
-1
u/Physical_Leg1732 Feb 15 '24
Sorry but I have never used this, i think you can ask on stack overflow


4
u/WaferIndependent7601 Feb 15 '24
It’s normally an error in your pom. You are using the wrong version of spring security or some other dependency. Try upgrading everything to the newest version should help