I am trying to inject a service dependency in the constructor for another service.(see example code below). However, a NoSuchBeanDefinitionException is throws when I try to assign the api variable, even if the bean variable is set correctly. I am trying to inject a service dependency in t