My learning diary

Almost done with the custom starter

I was right. I forgot to enable the Mongo repository. And it wasn’t only that. I had two Mongo configuration classes. One in the consumer and another in the custom starter. I needed only one. I removed the configuration class from the custom starter. Then, I enabled the custom starter’s repository in the consumer’s configuration class. Below is an idea of how my configuration class looks like:

@EnableMongoRepositories(basePackages = {
    "yourTLD.yourOrg.yourProject.somePackageInConsumerContainingRepositories",
    "yourTLD.yourOrg.yourProject.somePackageInCustomStarterContainingRepositories",
})
public class SomeMongoConfigurationClassInConsumer {
    ...
}

Relevant posts