|
@@ -21,6 +21,7 @@ import org.springframework.boot.CommandLineRunner;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
+import java.io.File;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
@@ -47,6 +48,9 @@ public class StartRunning implements CommandLineRunner {
|
|
@Resource
|
|
@Resource
|
|
DictionaryConfig dictionaryConfig;
|
|
DictionaryConfig dictionaryConfig;
|
|
|
|
|
|
|
|
+ @Value("${spring.application.name}")
|
|
|
|
+ String applicationName;
|
|
|
|
+
|
|
@SuppressWarnings({"unchecked", "rawtypes"})
|
|
@SuppressWarnings({"unchecked", "rawtypes"})
|
|
@Override
|
|
@Override
|
|
public void run(String... args) throws Exception {
|
|
public void run(String... args) throws Exception {
|
|
@@ -124,7 +128,7 @@ public class StartRunning implements CommandLineRunner {
|
|
*/
|
|
*/
|
|
rocketMessageConsumer.setRocketMQConsumer(nameServer, dictionaryConfig.mqConfigDomain().getMap().get(MqGroupEnum.TENCENT_VIDEO_GROUP.name()), dictionaryConfig.mqConfigDomain().getTopic(), MqTagEnum.TENCENT_VIDEO.name(), MessageModel.CLUSTERING, SpringContextHolder.getBean(TencentVideoConcurrentlyImpl.class));
|
|
rocketMessageConsumer.setRocketMQConsumer(nameServer, dictionaryConfig.mqConfigDomain().getMap().get(MqGroupEnum.TENCENT_VIDEO_GROUP.name()), dictionaryConfig.mqConfigDomain().getTopic(), MqTagEnum.TENCENT_VIDEO.name(), MessageModel.CLUSTERING, SpringContextHolder.getBean(TencentVideoConcurrentlyImpl.class));
|
|
SystemConstant.initTempFiles();
|
|
SystemConstant.initTempFiles();
|
|
- SystemConstant.getSearcher(SystemConstant.TEMP_FILES_DIR);
|
|
|
|
|
|
+ SystemConstant.getSearcher(SystemConstant.TEMP_FILES_DIR + File.separator + applicationName);
|
|
log.info("服务器启动时执行 end");
|
|
log.info("服务器启动时执行 end");
|
|
}
|
|
}
|
|
}
|
|
}
|