I have my custom starter. Inside it, I define a repository. How should I define it in the configuration? This is how I did the usual bean before.
@Bean
@ConditionalOnMissingBean(HelloWorldController.class)
public HelloWorldController helloWorldController() {
return new HelloWorldController();
}
Repository:
@Repository
public interface CarRepository extends JpaRepository<Car, Long> {
}
And configuration
@Configuration
@EnableJpaRepositories
public class DomainConfiguration {
}
If you use this starter, context will not see the repository bean. Because I did not declare it in the configuration.I don't know how to declare it.