I have one doubt in Spring profile

Good morning friends:

My project details:

IDE : Eclipse
Code: java
Frame Work: Spring Boot.

I have doubt in spring profile and also i will elaborate what i know about spring profile
As i my knowledge Spring profile is a define different configuration for different environment single project like,

developer access develiper machine in local host , same tester ,production team different config and diff access and server(Location) , coming to the my point as my project have 4 profile :

  • application.properties # Default config
  • application-dev.properties # Dev profile
  • application-test.properties # Test profile
  • application-prod.properties # production profile

that default application properties at a time only one can active profile , for example currently production is active as i set to the default properties(
spring.profiles.active=prod)
) , as i developer need modife/change the code ,so i will set to active dev profile in default properties ,now production server make critical because early i said at a time only one profile can active ,the real time environment what kind of strategist used in project and how to avoid this ? ,each have different access ,different working location like local host ,staging environment , why can use 3 profiles in same project , as i my knowledge is swtich configuration without change main code.that why spring profile helpful.