yangys
2024-10-30 25db770e621f1259b8d5b7fd514207f7481c2d0f
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);
    }
}