List of usage examples for org.springframework.core.env Environment hashCode
@HotSpotIntrinsicCandidate public native int hashCode();
From source file:org.apache.servicecomb.config.ConfigurationSpringInitializer.java
/** * Try to get a name for identifying the environment. * @param environment the target that the name is generated for. * @return The generated name for the environment. *///from w w w . j a v a2s . c om private String generateNameForEnvironment(Environment environment) { String environmentName = environment.getProperty("spring.config.name"); if (!StringUtils.isEmpty(environmentName)) { return environmentName; } environmentName = environment.getProperty("spring.application.name"); if (!StringUtils.isEmpty(environmentName)) { return environmentName; } return environment.getClass().getName() + "@" + environment.hashCode(); }