1. When using the properties file, you can create multiple application-{profiles}.properties files, and then in the main configuration file, you can choose which configuration file to use to activate
2. When using the yml file, you can use --- to divide the configuration file into multiple blocks, each block with
spring:profiles:
prod
named, then in the first block use
spring:profiles:active:
prod
chooses which block to activate.