| | |
| | | package cc.mrbird.febs.job; |
| | | |
| | | import cc.mrbird.febs.common.annotation.EncryptEnable; |
| | | import cc.mrbird.febs.common.contants.AppContants; |
| | | import cc.mrbird.febs.common.utils.RedisUtils; |
| | | import cc.mrbird.febs.common.utils.SpringContextUtil; |
| | | import cc.mrbird.febs.dapp.chain.ChainEnum; |
| | | import cc.mrbird.febs.dapp.chain.ChainService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.lang.reflect.Method; |
| | | import java.math.BigDecimal; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author wzy |
| | |
| | | @Autowired |
| | | private RedisUtils redisUtils; |
| | | |
| | | @Autowired |
| | | private SpringContextUtil springContextUtil; |
| | | |
| | | @PostConstruct |
| | | public void init() { |
| | | log.info("系统参数初始化"); |
| | | Map<String, Object> encryptBeans = SpringContextUtil.getBeansWithAnnotation(EncryptEnable.class); |
| | | if (encryptBeans.isEmpty()) { |
| | | return; |
| | | } |
| | | |
| | | for (Map.Entry<String, Object> entry : encryptBeans.entrySet()) { |
| | | Method[] methods = entry.getValue().getClass().getMethods(); |
| | | if (methods.length == 0) { |
| | | continue; |
| | | } |
| | | |
| | | for (Method method : methods) { |
| | | AppContants.ENCRYPT_METHOD.add(method.getName()); |
| | | } |
| | | } |
| | | } |
| | | } |