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();
|
}
|
}
|