xiongzhu hace 4 años
padre
commit
c83b46c871

+ 19 - 0
src/main/java/com/izouma/nineth/config/SchedulingConfig.java

@@ -0,0 +1,19 @@
+package com.izouma.nineth.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.TaskScheduler;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
+
+@Configuration
+public class SchedulingConfig {
+    @Bean
+    public TaskScheduler taskScheduler() {
+        ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler();
+        // 定时任务执行线程池核心线程数
+        taskScheduler.setPoolSize(50);
+        taskScheduler.setRemoveOnCancelPolicy(true);
+        taskScheduler.setThreadNamePrefix("Scheduler-");
+        return taskScheduler;
+    }
+}

+ 1 - 0
src/main/vue/src/views/CollectionEdit.vue

@@ -36,6 +36,7 @@
                             :customUrl="customUrl"
                             accept="application/zip"
                             format="json"
+                            single
                         ></file-upload>
                         <div class="tip">请将FBX文件与贴图打包成zip压缩包上传</div>
                     </el-form-item>