Currently I got the main class:
package com.recweb.springboot;
import org.springframework.boot.SpringApplication;
im
You need to have some sort of a password encoder, but
withDefaultPasswordEncoder()
is deprecated and no more suitable for production. Use this instead:
PasswordEncoder encoder =
PasswordEncoderFactories.createDelegatingPasswordEncoder();
...
UserDetails user = User.withUsername("someusername")
.password(encoder.encode("somepassword"))
.roles("USER").build();
Ref: https://docs.spring.io/spring-security/site/docs/5.0.2.BUILD-SNAPSHOT/api/index.html?org/springframework/security/core/userdetails/User.html