Skip to content

Spring boot – @Service class calling another @Service class

Is it fine to have a @Service annotated class calling another @Service annotated class? Or it is a bad practice?


public class MyService {

    // ...
    private MyOtherService myOtherService;
    // ...


EDIT – after 3 years

It’s ok to have dependencies from one service to another. This is mainly because of reusability. If circular dependencies happen between two services from the same module, that’s ok.

You should only avoid circular dependencies between modules.


It is not any restriction calling a service from another one. Unless you make circular dependency between services.

Circular dependency :

Circular dependency in spring :