Skip to content

Commit

Permalink
refactor: Removed autowired for constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
miguel-merlin committed Apr 8, 2024
1 parent 7a18b19 commit 35d7ee4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@

@Service
public class ApplicationFormServiceImpl implements ApplicationFormService {
@Autowired
ApplicationFormRepository applicationFormRepository;

public ApplicationFormServiceImpl(ApplicationFormRepository applicationFormRepository) {
this.applicationFormRepository = applicationFormRepository;
}

@Override
public List<ApplicationForm> getApplicationForms() {
return applicationFormRepository.findAll();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
import java.util.List;
@Service
public class RoleServiceImpl implements RoleService {

@Autowired
RoleRepository roleRepository;

public RoleServiceImpl(RoleRepository roleRepository) {
this.roleRepository = roleRepository;
}
@Override
public List<Role> getAllRoles() {
return roleRepository.findAll();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@

@Service
public class TeamServiceImpl implements TeamService {

@Autowired
TeamRepository teamRepository;

public TeamServiceImpl(TeamRepository teamRepository) {
this.teamRepository = teamRepository;
}
@Override
public List<Team> getAllTeams() {
return teamRepository.findAll();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@

@Service
public class UserServiceImpl implements UserService {

@Autowired
UserRepository userRepository;

@Autowired
AuthApiService authApiService;

public UserServiceImpl(UserRepository userRepository, AuthApiService authApiService) {
this.userRepository = userRepository;
this.authApiService = authApiService;
}

@Override
public List<User> getAllUsers() {
return userRepository.findAll();
Expand Down

0 comments on commit 35d7ee4

Please sign in to comment.