Add role in spring with custom userDetailsService

I followed this great tuto :

I would like to add Roles to the spring part. I don’t want to use claims like in this tuto but I would like to add my customs role (from my own db).

I tryed to override userDetailsService() from WebSecurityConfigurerAdapter to use my custom UserDetailService. But it seems this method is never called … (see println), should it be?

public class SecurityConfiguration extends WebSecurityConfigurerAdapter {

    private UserRepository userRepository;

    protected void configure(HttpSecurity http) throws Exception {

    protected UserDetailsService userDetailsService() {
        return username -> {
            Optional<> user = userRepository.findByName(username);

            return User