com.cloud.platform.web.condition.NotGrOrPrdEnvCondition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloud-web-spring-boot-starter Show documentation
Show all versions of cloud-web-spring-boot-starter Show documentation
project for cloud-web-spring-boot-starter
The newest version!
package com.cloud.platform.web.condition;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.env.Environment;
import org.springframework.core.env.Profiles;
import org.springframework.core.type.AnnotatedTypeMetadata;
/**
* @description:
* @author: zhou shuai
* @date: 2022/3/29 17:43
* @version: v1
*/
public class NotGrOrPrdEnvCondition implements Condition {
@Override
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
final Environment environment = context.getEnvironment();
return !environment.acceptsProfiles(Profiles.of("gr","prod"));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy