Encryption
Md5PasswordEncoder md5PasswordEncoder = new Md5PasswordEncoder(); md5PasswordEncoder.encodePassword( userRegistrationInfo.getPassword(), AppConstants.MD5_PASSWORD_ENCODER_SALT); Spring Security Configuration
@Autowired public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { auth .userDetailsService(userDetailsService) .passwordEncoder(passwordEncoder()); } @Bean public PasswordEncoder passwordEncoder() { PasswordEncoder encoder = new BCryptPasswordEncoder(); return encoder; } I need to use org.springframework.security.authentication.encoding.Md5PasswordEncoder for my password encryption. But I don't know how to configure passwordEncoder() in Spring security configuration.