It might be a basic question, but I am not able to figure out the issue.
I have an interface and a class as following:
public interface AssetService {
List<City> findById(String id);
}
@Service
@Transactional
public class AssetServiceImpl implements AssetService {
@Autowired
private CityRepository cityRepository;
@Override
public List<City> findById(String id) {
// TODO Auto-generated method stub
return null;
}
}
In the above class when I auto create unimplemented methods from eclipse, it gave the method alone with out any errors, when I add @Override manually it throws the following error:
The method findById(String) of type AssetServiceImpl must override a superclass method.
Ideally, as I am Overriding the method it should indicate that same. Am I doing some this wrong ?
I am using Spring Boot
Any help is much appreciated.