这个问题存粹是版本的问题,如果你用的是5.0.7的版本,那么在设置secret的是需要加密的,正确的赋值方式.secret(passwordEncoder.encode("你的值"))。
具体可以查看DaoAuthenticationProvider
类的additionalAuthenticationChecks
方法中if (!passwordEncoder.matches(presentedPassword, userDetails.getPassword()))。
5之前的版本比较是if (!passwordEncoder.isPasswordValid(userDetails.getPassword(),presentedPassword, salt)),希望能解决你问题