package com.gyee.wisdom.alarm.sharding.config;

import com.gyee.wisdom.alarm.sharding.util.SpringContextUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

import javax.validation.Valid;

/**
 * @description:
 * @auther: Wanghs
 * @date: 2022-04-20
 */
@Configuration
public class MyConfig {

   @Value("${rule_encryption:true}")
    private boolean ruleEncryption;

   public static boolean getRuleEncryption(){
       MyConfig bean = SpringContextUtil.getBean(MyConfig.class);
       return  bean.ruleEncryption;
   }
}
