You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
560 B
22 lines
560 B
package org.ros.chatto.service;
|
|
|
|
import org.ros.chatto.model.Role;
|
|
import org.ros.chatto.repository.RoleRepository;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
@Service
|
|
@Transactional
|
|
public class RoleServiceImpl implements RoleService {
|
|
|
|
@Autowired
|
|
private RoleRepository roleRepository;
|
|
|
|
@Override
|
|
@Transactional(readOnly = true)
|
|
public Role getRole(String roleName) {
|
|
return roleRepository.findByName(roleName);
|
|
}
|
|
|
|
}
|