Java Code Examples for org.springframework.core.env.Environment#getDefaultProfiles()

The following examples show how to use org.springframework.core.env.Environment#getDefaultProfiles() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultProfileUtil.java    From okta-jhipster-microservices-oauth-example with Apache License 2.0 5 votes vote down vote up
/**
 * Get the profiles that are applied else get default profiles.
 *
 * @param env spring environment
 * @return profiles
 */
public static String[] getActiveProfiles(Environment env) {
    String[] profiles = env.getActiveProfiles();
    if (profiles.length == 0) {
        return env.getDefaultProfiles();
    }
    return profiles;
}
 
Example 2
Source File: DefaultProfileUtil.java    From jhipster-microservices-example with Apache License 2.0 5 votes vote down vote up
/**
 * Get the profiles that are applied else get default profiles.
 *
 * @param env spring environment
 * @return profiles
 */
public static String[] getActiveProfiles(Environment env) {
    String[] profiles = env.getActiveProfiles();
    if (profiles.length == 0) {
        return env.getDefaultProfiles();
    }
    return profiles;
}
 
Example 3
Source File: DefaultProfileUtil.java    From Full-Stack-Development-with-JHipster with MIT License 5 votes vote down vote up
/**
 * Get the profiles that are applied else get default profiles.
 *
 * @param env spring environment
 * @return profiles
 */
public static String[] getActiveProfiles(Environment env) {
    String[] profiles = env.getActiveProfiles();
    if (profiles.length == 0) {
        return env.getDefaultProfiles();
    }
    return profiles;
}
 
Example 4
Source File: DefaultProfileUtil.java    From tutorials with MIT License 5 votes vote down vote up
/**
 * Get the profiles that are applied else get default profiles.
 *
 * @param env spring environment
 * @return profiles
 */
public static String[] getActiveProfiles(Environment env) {
    String[] profiles = env.getActiveProfiles();
    if (profiles.length == 0) {
        return env.getDefaultProfiles();
    }
    return profiles;
}
 
Example 5
Source File: DefaultProfileUtil.java    From tutorials with MIT License 5 votes vote down vote up
/**
 * Get the profiles that are applied else get default profiles.
 */
public static String[] getActiveProfiles(Environment env) {
    String[] profiles = env.getActiveProfiles();
    if (profiles.length == 0) {
        return env.getDefaultProfiles();
    }
    return profiles;
}
 
Example 6
Source File: DefaultProfileUtil.java    From e-commerce-microservice with Apache License 2.0 5 votes vote down vote up
/**
 * Get the profiles that are applied else get default profiles.
 *
 * @param env spring environment
 * @return profiles
 */
public static String[] getActiveProfiles(Environment env) {
    String[] profiles = env.getActiveProfiles();
    if (profiles.length == 0) {
        return env.getDefaultProfiles();
    }
    return profiles;
}
 
Example 7
Source File: DefaultProfileUtil.java    From tutorials with MIT License 5 votes vote down vote up
/**
 * Get the profiles that are applied else get default profiles.
 *
 * @param env spring environment
 * @return profiles
 */
public static String[] getActiveProfiles(Environment env) {
    String[] profiles = env.getActiveProfiles();
    if (profiles.length == 0) {
        return env.getDefaultProfiles();
    }
    return profiles;
}
 
Example 8
Source File: DefaultProfileUtil.java    From TeamDojo with Apache License 2.0 5 votes vote down vote up
/**
 * Get the profiles that are applied else get default profiles.
 *
 * @param env spring environment
 * @return profiles
 */
public static String[] getActiveProfiles(Environment env) {
    String[] profiles = env.getActiveProfiles();
    if (profiles.length == 0) {
        return env.getDefaultProfiles();
    }
    return profiles;
}
 
Example 9
Source File: DefaultProfileUtil.java    From okta-jhipster-microservices-oauth-example with Apache License 2.0 5 votes vote down vote up
/**
 * Get the profiles that are applied else get default profiles.
 *
 * @param env spring environment
 * @return profiles
 */
public static String[] getActiveProfiles(Environment env) {
    String[] profiles = env.getActiveProfiles();
    if (profiles.length == 0) {
        return env.getDefaultProfiles();
    }
    return profiles;
}
 
Example 10
Source File: DefaultProfileUtil.java    From ehcache3-samples with Apache License 2.0 5 votes vote down vote up
/**
 * Get the profiles that are applied else get default profiles.
 *
 * @param env spring environment
 * @return profiles
 */
public static String[] getActiveProfiles(Environment env) {
    String[] profiles = env.getActiveProfiles();
    if (profiles.length == 0) {
        return env.getDefaultProfiles();
    }
    return profiles;
}
 
Example 11
Source File: DefaultProfileUtil.java    From patient-batch-loader with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Get the profiles that are applied else get default profiles.
 *
 * @param env
 *            spring environment
 * @return profiles
 */
public static String[] getActiveProfiles(Environment env) {
	String[] profiles = env.getActiveProfiles();
	if (profiles.length == 0) {
		return env.getDefaultProfiles();
	}
	return profiles;
}
 
Example 12
Source File: DefaultProfileUtil.java    From 21-points with Apache License 2.0 5 votes vote down vote up
/**
 * Get the profiles that are applied else get default profiles.
 *
 * @param env spring environment
 * @return profiles
 */
public static String[] getActiveProfiles(Environment env) {
    String[] profiles = env.getActiveProfiles();
    if (profiles.length == 0) {
        return env.getDefaultProfiles();
    }
    return profiles;
}
 
Example 13
Source File: DefaultProfileUtil.java    From cubeai with Apache License 2.0 5 votes vote down vote up
/**
 * Get the profiles that are applied else get default profiles.
 *
 * @param env spring environment
 * @return profiles
 */
public static String[] getActiveProfiles(Environment env) {
    String[] profiles = env.getActiveProfiles();
    if (profiles.length == 0) {
        return env.getDefaultProfiles();
    }
    return profiles;
}
 
Example 14
Source File: DefaultProfileUtil.java    From cubeai with Apache License 2.0 5 votes vote down vote up
/**
 * Get the profiles that are applied else get default profiles.
 *
 * @param env spring environment
 * @return profiles
 */
public static String[] getActiveProfiles(Environment env) {
    String[] profiles = env.getActiveProfiles();
    if (profiles.length == 0) {
        return env.getDefaultProfiles();
    }
    return profiles;
}
 
Example 15
Source File: DefaultProfileUtil.java    From cubeai with Apache License 2.0 5 votes vote down vote up
/**
 * Get the profiles that are applied else get default profiles.
 *
 * @param env spring environment
 * @return profiles
 */
public static String[] getActiveProfiles(Environment env) {
    String[] profiles = env.getActiveProfiles();
    if (profiles.length == 0) {
        return env.getDefaultProfiles();
    }
    return profiles;
}
 
Example 16
Source File: DefaultProfileUtil.java    From cubeai with Apache License 2.0 5 votes vote down vote up
/**
 * Get the profiles that are applied else get default profiles.
 *
 * @param env spring environment
 * @return profiles
 */
public static String[] getActiveProfiles(Environment env) {
    String[] profiles = env.getActiveProfiles();
    if (profiles.length == 0) {
        return env.getDefaultProfiles();
    }
    return profiles;
}
 
Example 17
Source File: DefaultProfileUtil.java    From cubeai with Apache License 2.0 5 votes vote down vote up
/**
 * Get the profiles that are applied else get default profiles.
 *
 * @param env spring environment
 * @return profiles
 */
public static String[] getActiveProfiles(Environment env) {
    String[] profiles = env.getActiveProfiles();
    if (profiles.length == 0) {
        return env.getDefaultProfiles();
    }
    return profiles;
}
 
Example 18
Source File: DefaultProfileUtil.java    From tutorials with MIT License 5 votes vote down vote up
/**
 * Get the profiles that are applied else get default profiles.
 */
public static String[] getActiveProfiles(Environment env) {
    String[] profiles = env.getActiveProfiles();
    if (profiles.length == 0) {
        return env.getDefaultProfiles();
    }
    return profiles;
}
 
Example 19
Source File: DefaultProfileUtil.java    From tutorials with MIT License 5 votes vote down vote up
/**
 * Get the profiles that are applied else get default profiles.
 */
public static String[] getActiveProfiles(Environment env) {
    String[] profiles = env.getActiveProfiles();
    if (profiles.length == 0) {
        return env.getDefaultProfiles();
    }
    return profiles;
}
 
Example 20
Source File: DefaultProfileUtil.java    From flair-engine with Apache License 2.0 5 votes vote down vote up
/**
 * Get the profiles that are applied else get default profiles.
 *
 * @param env spring environment
 * @return profiles
 */
public static String[] getActiveProfiles(Environment env) {
    String[] profiles = env.getActiveProfiles();
    if (profiles.length == 0) {
        return env.getDefaultProfiles();
    }
    return profiles;
}