Skip to content

Class is not a known entity type. #1531

@Valantir007

Description

@Valantir007

Hi, I write my own api to create users but always when I call:

SimpleGrantedAuthority authority = new SimpleGrantedAuthority("ROLE_USER"); ArrayList<GrantedAuthority> authoritiesList = new ArrayList<>(); authoritiesList.add(authority); new User(tempUser.getUsername(), tempUser.getPassword(), tempUser.isEnabled(), false, false, false, authoritiesList);

I got error:
"Object: org.springframework.security.core.userdetails.User@364492: Username: test; Password: [PROTECTED]; Enabled: true; AccountNonExpired: false; credentialsNonExpired: false; AccountNonLocked: false; Granted Authorities: ROLE_USER is not a known entity type."

Can you help me?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Valantir007

        Issue actions

          Class is not a known entity type. · Issue #1531 · mitreid-connect/OpenID-Connect-Java-Spring-Server