Use -Dspring.profiles.active={profileName} in arguments Use spring.profiles.active={profileName} in application.properties file