I've got a @RestController
like below:
@RestController
public class SomeOperations {
private RepositoryFailover repo;
public SomeOperations (RepositoryFailover repo) {
this.repo = repo;
}
}
The class RepositoryFailover
in above case resides in an external package and a bean for it is created there as shown below inside the config class FailoverConfiguration
:
@Configuration
public class FailoverConfiguration {
@Bean
public RepositoryFailover repoFailover(ClassA abc) {
return new RepositoryFailover(abc);
}
}
When I run my project I get the error:
No qualifying bean of type RepositoryFailover available
That is mostly because im not importing this bean from external jar properly.
How do i import this bean that is created in the config class externally?