// Path: server/src/main/java/com/bfwg/model/Authority.java
// @Entity
// @Table(name = "AUTHORITY")
// public class Authority implements GrantedAuthority {
// 
//     @Id
//     @Column(name = "id")
//     @GeneratedValue(strategy = GenerationType.IDENTITY)
//     private Long id;
// 
//     @Enumerated(EnumType.STRING)
//     @Column(name = "name")
//     private UserRoleName name;
// 
//     @Override
//     public String getAuthority() {
//         return name.name();
//     }
// 
//     @JsonIgnore
//     public UserRoleName getName() {
//         return name;
//     }
// 
//     public void setName(UserRoleName name) {
//         this.name = name;
//     }
// 
//     @JsonIgnore
//     public Long getId() {
//         return id;
//     }
// 
//     public void setId(Long id) {
//         this.id = id;
//     }
// 
// }
// 
// Path: server/src/main/java/com/bfwg/repository/AuthorityRepository.java
// public interface AuthorityRepository extends JpaRepository<Authority, Long> {
//     Authority findByName(UserRoleName name);
// }
// 
// Path: server/src/main/java/com/bfwg/service/AuthorityService.java
// public interface AuthorityService {
//   List<Authority> findById(Long id);
// 
//   List<Authority> findByName(UserRoleName name);
// 
// }


import com.bfwg.model.Authority;
import com.bfwg.model.UserRoleName;
import com.bfwg.repository.AuthorityRepository;
import com.bfwg.service.AuthorityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
package com.bfwg.service.impl;



@Service
public class AuthorityServiceImpl implements AuthorityService {

    private final AuthorityRepository authorityRepository;

// Path: server/src/main/java/com/bfwg/model/Authority.java
// @Entity
// @Table(name = "AUTHORITY")
// public class Authority implements GrantedAuthority {
// 
//     @Id
//     @Column(name = "id")
//     @GeneratedValue(strategy = GenerationType.IDENTITY)
//     private Long id;
// 
//     @Enumerated(EnumType.STRING)
//     @Column(name = "name")
//     private UserRoleName name;
// 
//     @Override
//     public String getAuthority() {
//         return name.name();
//     }
// 
//     @JsonIgnore
//     public UserRoleName getName() {
//         return name;
//     }
// 
//     public void setName(UserRoleName name) {
//         this.name = name;
//     }
// 
//     @JsonIgnore
//     public Long getId() {
//         return id;
//     }
// 
//     public void setId(Long id) {
//         this.id = id;
//     }
// 
// }
// 
// Path: server/src/main/java/com/bfwg/repository/AuthorityRepository.java
// public interface AuthorityRepository extends JpaRepository<Authority, Long> {
//     Authority findByName(UserRoleName name);
// }
// 
// Path: server/src/main/java/com/bfwg/service/AuthorityService.java
// public interface AuthorityService {
//   List<Authority> findById(Long id);
// 
//   List<Authority> findByName(UserRoleName name);
// 
// }


// Path: server/src/main/java/com/bfwg/service/impl/AuthorityServiceImpl.java
import com.bfwg.model.Authority;
import com.bfwg.model.UserRoleName;
import com.bfwg.repository.AuthorityRepository;
import com.bfwg.service.AuthorityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;

package com.bfwg.service.impl;



@Service
public class AuthorityServiceImpl implements AuthorityService {

    private final AuthorityRepository authorityRepository;

    @Autowired