Skip to content

Class is not a known entity type. #1531

Open
@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?

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

    Issue actions