yangys
2024-03-29 4b479381a65bd3ef526cb92631d3550f2aa17459
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package com.qianwen.smartman.common.launch;
 
import java.util.Properties;
import com.qianwen.smartman.common.constant.FmsConstant;
import com.qianwen.smartman.common.constant.LauncherConstant;
import com.qianwen.core.launch.service.LauncherService;
import com.qianwen.core.launch.utils.PropsUtil;
import org.springframework.boot.builder.SpringApplicationBuilder;
 
 
public class LauncherServiceImpl implements LauncherService {
    public void launcher(SpringApplicationBuilder builder, String appName, String profile, boolean isLocalDev) {
        Properties props = System.getProperties();
        PropsUtil.setProperty(props, "spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile));
        PropsUtil.setProperty(props, "spring.datasource.dynamic.enabled", FmsConstant.AUTOMATIC);
        System.setProperty("rocketmq.client.logUseSlf4j", FmsConstant.AUTOMATIC);
    }
}