mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2025-10-24 09:49:08 +08:00
优化:启动Office进程改为同步执行,防止程序运行起来Office进程还没启动
This commit is contained in:
@@ -46,15 +46,11 @@ public class OfficePluginManager {
|
|||||||
@Value("${office.plugin.task.timeout:5m}")
|
@Value("${office.plugin.task.timeout:5m}")
|
||||||
private String timeOut;
|
private String timeOut;
|
||||||
|
|
||||||
@PostConstruct
|
|
||||||
public void initOfficeManager() {
|
|
||||||
new Thread(this::startOfficeManager).start();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动Office组件进程
|
* 启动Office组件进程
|
||||||
*/
|
*/
|
||||||
private void startOfficeManager(){
|
@PostConstruct
|
||||||
|
public void startOfficeManager(){
|
||||||
File officeHome = OfficeUtils.getDefaultOfficeHome();
|
File officeHome = OfficeUtils.getDefaultOfficeHome();
|
||||||
if (officeHome == null) {
|
if (officeHome == null) {
|
||||||
throw new RuntimeException("找不到office组件,请确认'office.home'配置是否有误");
|
throw new RuntimeException("找不到office组件,请确认'office.home'配置是否有误");
|
||||||
|
|||||||
Reference in New Issue
Block a user