


This article is not a security recommendation. NOTE: This scenario is for an example of using multiple data sources with Spring Boot. Since we are spreading the credit card data across three databases, all three would need to be compromised for a security risk. Card database(carddb): Stores the credit card information which includes the owner’s full name and the credit card expiration date.Cardholder database(cardholderdb): Stores cardholder details which include the member id and credit card number.Member database(memberdb): Stores personal details of cardholders which include their full name and member id.The credit card scenario described above, will use the following three databases: We will use MySQL for our database server. In this article, we will configure multiple data sources in Spring Boot and JPA. If one of the data sources is compromised the data retrieved is useless without the data from other data sources. You may wish to store the data elements in multiple data sources. Sometimes, this is for security reasons.Īn example of this is the storage of credit card information. Often, you will need to connect to more than one data source.
