In my spring boot application, i need to include two mongo databases and use each database for different MongoRepository. Currently i have configured my mongodb configuration in a yml file. I need to add the other database configuration to this same yml file and specify the using database in each repository.
the yml file :
spring:
data:
mongodb:
host: 127.0.0.1
port: 27017
database: db_admin_crm
rest:
base-path: /crm
The repository :
@RepositoryRestResource(collectionResourceRel = "webinarSignups",path = "webinarSignups")
public interface WebinarSignupsRepository extends MongoRepository<WebinarSignUp,String> {
}
Ideas will be appreciated. Thanks.