#
luxiaotao1123
2020-08-04 ed4f751b5bdb6f2f315fe6499fb064dd961e2a7a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.zy.core;
 
import com.alibaba.fastjson.JSON;
import com.zy.core.properties.SlaveProperties;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
 
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
 
/**
 * Created by vincent on 2020/8/4
 */
@Slf4j
@Component
public class ServerBootstrap {
 
    @Autowired
    private SlaveProperties slaveProperties;
 
 
    @PostConstruct
    public void init(){
        System.out.println(JSON.toJSONString(slaveProperties));
 
    }
 
    @PreDestroy
    public void destroy() {
    }
 
 
}