简体   繁体   中英

Multiple schema for SQL Server in Spring boot

My schema names are different for Test and Prod environments. How to access them from properties file? I want to read the schema from the properties file based on the environment. Tried the link suggested by adding in datasource config but it is not working. The database is SQL server.

you need to create a properties file for each profile (applications-test.properties and applications-prod.properties) and for each env you put your database configuration.

Make sure to use the right profile in your code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM