| | |
| | | import cc.mrbird.febs.dapp.chain.ChainService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.CommandLineRunner; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | **/ |
| | | @Slf4j |
| | | @Component |
| | | public class SystemInit { |
| | | public class SystemInit implements CommandLineRunner { |
| | | |
| | | @Autowired |
| | | private RedisUtils redisUtils; |
| | | // @PostConstruct |
| | | // public void init() { |
| | | // |
| | | // } |
| | | |
| | | @PostConstruct |
| | | public void init() { |
| | | @Override |
| | | public void run(String... args) throws Exception { |
| | | 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) { |