In eclipse, when i import something it import that with full package name instead of importing that at top of file?

Viewed 18

If I import Autowired then it is importing with full package every time.

@org.springframework.beans.factory.annotation.Autowired
private com.productcrud.service.ProductService productService;

Similar things happen with other classes as well.

1 Answers

I don't think this is related to Spring but rather to your Eclipse preferences.

I believe you need to set this:

Eclipse preferences

You open the Preferences window from the Eclipse menu.

Eclipse menu

Related