1

Create new package config and move Gruppen2Config to it

This commit is contained in:
XXNitram
2020-03-12 13:14:22 +01:00
parent f43be951a6
commit 9b004bef58
2 changed files with 2 additions and 5 deletions

View File

@ -0,0 +1,26 @@
package mops.gruppen2.config;
import mops.gruppen2.domain.Exceptions.EventException;
import mops.gruppen2.domain.Group;
import mops.gruppen2.service.EventService;
import mops.gruppen2.service.GroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.List;
@Configuration
public class Gruppen2Config {
@Autowired
GroupService groupService;
@Autowired
EventService eventService;
@Bean
public List<Group> groups() throws EventException {
return groupService.projectEventList(eventService.findAllEvents());
}
}