Since this is not a constructor injection, spring can safely instantiate both objects and then satisfy their dependencies. An architecturally similar case is called the so-called "code smell." This is a sign that something is wrong with the composition. Maybe you need to move the logic, maybe you need to introduce a third class, it depends.
source share