0

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.

Slava Semushin
  • 14,904
  • 7
  • 53
  • 69
Rajesh
  • 1,514
  • 2
  • 14
  • 15

1 Answers1

0

There is no difference between adding method manually and by eclipse. Please clean the project and see.

BSM
  • 173
  • 3
  • 13