Spring Boot - Inversion of Control and Dependency Injection
Identify the error in the following Spring Boot code snippet:
@Component
public class Service {
@Autowired
private Repository repo;
public Service(Repository repo) {
this.repo = repo;
}
}