Parcourir la source

serviceFlow tenant添加

demon il y a 8 ans
Parent
commit
b592842e60

+ 2 - 0
hos-arbiter/src/main/java/com/yihu/hos/arbiter/services/ServiceFlowService.java

@ -61,6 +61,8 @@ public class ServiceFlowService {
        update.set("routeCode", serviceFlow.getRouteCode());
        update.set("updated", serviceFlow.getUpdated());
        update.set("flowType", serviceFlow.getFlowType());
        update.set("tenant", serviceFlow.getTenant());
        for (ServiceFlow.HandleFile handleFile : serviceFlow.getHandleFiles()) {
            update.addToSet("handleFiles", handleFile);
        }

+ 7 - 0
src/main/java/com/yihu/hos/ESBApplication.java

@ -2,10 +2,13 @@ package com.yihu.hos;
import com.yihu.hos.interceptor.WebMvcInterceptor;
import com.yihu.hos.web.framework.constant.ServiceFlowConstant;
import com.yihu.hos.web.framework.util.GridFSUtil;
import org.apache.activemq.command.ActiveMQQueue;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.data.mongodb.gridfs.GridFsOperations;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@ -14,6 +17,9 @@ import javax.jms.Queue;
@SpringBootApplication
public class ESBApplication extends WebMvcConfigurerAdapter {
    @Autowired
    private GridFsOperations operations;
    public static void main(String[] args) throws Exception {
        SpringApplication application = new SpringApplication(ESBApplication.class);
        application.run(args);
@ -22,6 +28,7 @@ public class ESBApplication extends WebMvcConfigurerAdapter {
    // 增加拦截器
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        GridFSUtil.gridFsOperations = operations;
        registry.addInterceptor(new WebMvcInterceptor());
    }