spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java
/**
		 * Initialize profile information from both the {@link Environment} active
		 * profiles and any {@code spring.profiles.active}/{@code spring.profiles.include}
		 * properties that are already set.
		 */
Initialize profile information from both the  Environment active
profiles and any  spring.profiles.active/ spring.profiles.include
properties that are already set.
Initialize profile information from both the Environment active profiles and any spring . profiles . active / spring . profiles . include properties that are already set .
private void initializeProfiles() {
			Set<Profile> initialActiveProfiles = initializeActiveProfiles();
			this.profiles.addAll(getUnprocessedActiveProfiles(initialActiveProfiles));
			if (this.profiles.isEmpty()) {
				for (String defaultProfileName : this.environment.getDefaultProfiles()) {
					Profile defaultProfile = new Profile(defaultProfileName, true);
					if (!this.profiles.contains(defaultProfile)) {
						this.profiles.add(defaultProfile);
					}
				}
			}
			this.profiles.add(null);
		}
private void initializeProfiles ( ) { Set < Profile > initialActiveProfiles = initializeActiveProfiles ( ) ; this . profiles . addAll ( getUnprocessedActiveProfiles ( initialActiveProfiles ) ) ; if ( this . profiles . isEmpty ( ) ) { for ( String defaultProfileName : this . environment . getDefaultProfiles ( ) ) { Profile defaultProfile = new Profile ( defaultProfileName , true ) ; if ( ! this . profiles . contains ( defaultProfile ) ) { this . profiles . add ( defaultProfile ) ; } } } this . profiles . add ( null ) ; }
Initialize profile information from both the {@link Environment} active
 profiles and any {@code spring.profiles.active}/{@code spring.profiles.include}
 properties that are already set.
Initialize profile information from both the { @link Environment } active profiles and any { @code spring . profiles . active } / { @code spring . profiles . include } properties that are already set .
// The default profile for these purposes is represented as null. We add it // last so that it is first out of the queue (active profiles will then // override any settings in the defaults when the list is reversed later).