title: Requested bean is currently in creation
body: <p>My controller</p>
  
  <pre><code>@RestController
  public class CheckUserDataRestController {
      private final UserSearchService userSearchService;
      @Autowired
      public CheckUserDataRestController(final UserSearchService userSearchService) {
          this.userSearchService = userSearchService;
      }
  ...
  }
  </code></pre>
  
  <p>initialize bean service</p>
  
  <pre><code>@Service("userSearchService")
  public class UserSearchServiceImpl implements UserSearchService {
      private final UserRepository userRepository;
      private final AuthorizationService authorizationService;
      @Autowired
      public UserSearchServiceImpl(
              @NotNull final UserRepository userRepository,
              @NotNull final AuthorizationService authorizationService
      ) {
          this.userRepository = userRepository;
          this.authorizationService = authorizationService;
      }
  ...
  }
  </code></pre>
  
  <p>which initializes another service bean</p>
  
  <pre><code>@Service("authorizationService")
  public class AuthorizationServiceImpl implements AuthorizationService {
      private final UserSearchService userSearchService;
      @Autowired
      public AuthorizationServiceImpl(final UserSearchService userSearchService) {
          this.userSearchService = userSearchService;
      }
  ...
  }
  </code></pre>
  
  <p>The following error is thrown during compilation:</p>
  
  <pre><code>2018-04-05 02:09:39.024  WARN 1864 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: 
  Error creating bean with name 'checkUserDataRestController' defined in file [C:\Users\Jonatan\Documents\GitHub\REST-Web-Services\web\out\production\classes\com\web\web\controller\CheckUserDataRestController.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: 
  Error creating bean with name 'userSearchService' defined in file [C:\Users\Jonatan\Documents\GitHub\REST-Web-Services\core\out\production\classes\com\core\jpa\service\UserSearchServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: 
  Error creating bean with name 'authorizationService' defined in file [C:\Users\Jonatan\Documents\GitHub\REST-Web-Services\core\out\production\classes\com\core\service\impl\AuthorizationServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: 
  Error creating bean with name 'userSearchService': Requested bean is currently in creation: Is there an unresolvable circular reference?
  </code></pre>
  
  <p>The error is caused by the fact that the <code>UserSearchService</code> service is autowired simultaneously in the controller and in the <code>AuthorizationService</code> service. How do I prevent this error?</p>