I'm not an expert in spring boot but I suspect it's because you defined two beans in the same name and they conflict/override.
See this on how to have two configs in one application: Spring Boot 2 Cassandra multiple keyspaces or clusters