示例demo
public static void main(String[] args) { String password = new BCryptPasswordEncoder().encode("123456789"); String password2 = new BCryptPasswordEncoder().encode("123456789"); System.out.println(password); System.out.println(password2); boolean flag = new BCryptPasswordEncoder().matches("123456789",password2); System.out.println(flag); }