You are missing the schemaLocation
declaration for the 'c' schema. Just remove it and use a plain bean declaration:
<beans:bean id='bCryptPasswordEncoder' class='org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder'>
<beans:constructor-arg value="12" />
</beans:bean>
You should probably read up on BCrypt before trying to configure it to "make it stronger", and also be able to explain why the default isn't strong enough for your requirements. The strength parameter is logarithmic, and defaults to 10. Each time you increment it you double the amount of work needed, and the time your app will take to check a password. So a value of 512 doesn't make any sense. If you supply a value greater than 31 you will get an error.
Also, I don't know why you are string to set the random
instance to 20
in your XML configuration. That argument has to be a SecureRandom
instance, so you should probably remove that.