core/src/main/java/org/springframework/security/authentication/dao/DaoAuthenticationProvider.java
public void setPasswordEncoder(PasswordEncoder passwordEncoder) {
		Assert.notNull(passwordEncoder, "passwordEncoder cannot be null");
		this.passwordEncoder = passwordEncoder;
		this.userNotFoundEncodedPassword = null;
	}
public void setPasswordEncoder(PasswordEncoder passwordEncoder) {
		Assert.notNull(passwordEncoder, "passwordEncoder cannot be null");
		this.passwordEncoder = passwordEncoder;
		this.userNotFoundEncodedPassword = null;
	}
Sets the PasswordEncoder instance to be used to encode and validate passwords. If
not set, the password will be compared using {@link PasswordEncoderFactories#createDelegatingPasswordEncoder()}

@param passwordEncoder must be an instance of one of the {@code PasswordEncoder}
types.