Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package rs.ac.uns.ftn.informatika.spring.security.model;
- import com.fasterxml.jackson.annotation.JsonIgnore;
- import org.springframework.security.core.GrantedAuthority;
- import javax.persistence.*;
- @Entity
- @Table(name="AUTHORITY")
- public class Authority implements GrantedAuthority {
- private static final long serialVersionUID = 1L;
- @Id
- @Column(name="id")
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- Long id;
- @Column(name="name")
- String name;
- @Override
- public String getAuthority() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- @JsonIgnore
- public String getName() {
- return name;
- }
- @JsonIgnore
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement