Spring Boot refuses to inject my repository into a service. I don’t know what I’m doing wrong.
- Using Spring Boot 3
- No XML config
- Tried constructor injection too
@Service
public class UserService {
@Autowired
private UserRepository repo;
}
Spring Boot refuses to inject my repository into a service. I don’t know what I’m doing wrong.
@Service
public class UserService {
@Autowired
private UserRepository repo;
}
To reply to a question, please log in.