我正在开发Spring Boot应用程序,并在启动服务器时遇到此错误.我不确定我是否错误地定义了任何注释或缺少任何依赖项.任何帮助,将不胜感激.
主要课程:
@SpringBootApplication
public class FantasyManagerApplication {
public static void main(String[] args) {
SpringApplication.run(FantasyManagerApplication.class, args);
}
}
Run Code Online (Sandbox Code Playgroud)
LeagueService.java:
@Service
public class LeagueService {
@Autowired
private LeagueRepository leagueRepository;
@Autowired
private PlayerRepository playerRepository;
@Autowired
private TeamRepository teamRepository;
/**
* Returns a list of all the leagues in the database
* @return List<League>
*/
public List<League> getAllLeagues(){
List<League> leagues = new ArrayList<>();
leagueRepository.findAll()
.forEach(leagues::add);
return leagues;
}
/**
* Find details for a particular League
* @param leagueId
* @return League
*/ …
Run Code Online (Sandbox Code Playgroud)