ke
2024-11-26 0f0cd8abae38a873a9a97bd8bda019a197df2637
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
package cn.gistack.by.nettyUpload.controller;
 
import cn.gistack.by.nettyUpload.HttpUploadFileServer;
import cn.gistack.by.nettyUpload.config.NettyHttpConfig;
import cn.gistack.by.picUpload.service.BaiyiPicService;
import cn.gistack.resource.feign.IOssClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.PostConstruct;
 
//@Component
@RestController
public class NettyHttpService {
    @Autowired
    private NettyHttpConfig nettyHttpConfig;
 
    @Autowired
    private IOssClient ossClient;
 
    @Autowired
    private BaiyiPicService baiyiPicService;
 
    @PostConstruct
    public void postConstructService() {
        new Thread(new HttpUploadFileServer(nettyHttpConfig,ossClient,baiyiPicService)).start();
    }
}