You follow this way with Spring Boot YML 's multiple profiles https://docs.spring.io/spring-boot/reference/features/external-config.html#features.external-config.files.profile-specific
You run dev
profile , test
profile did not work. Use
mvn spring-boot:run -Dspring-boot.run.profiles=dev