//package com.zteits.park.configuration.schedule; // //import org.springframework.context.annotation.Condition; //import org.springframework.context.annotation.ConditionContext; //import org.springframework.core.type.AnnotatedTypeMetadata; // //import org.apache.commons.lang3.StringUtils; ///** // * 判断是否开启扫描异常表发送邮件服务 // * Copyright: Copyright (c) 2017 zteits // * // * @ClassName: GetExceptionMsgCondition.java // * @Description: // * @version: v1.0.0 // * @author: zhaowg // * @date: 2017年4月24日 上午10:54:22 // * Modification History: // * Date Author Version Description // *---------------------------------------------------------* // * 2017年9月15日 zhaowg v1.0.0 创建 // */ //public class GetExceptionMsgCondition implements Condition{ // // @Override // public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) { // //判断当前环境开关是否开启 // String isOnOff = context.getEnvironment().getProperty("switch.auto.GetExceptionMsgSchedule"); // //当且仅当值为true时,返回true // if(!StringUtils.isBlank(isOnOff) && isOnOff.equalsIgnoreCase("true")){ // return true; // } // return false; // } // //}