|
|
@@ -6,10 +6,12 @@ import cn.seecoder.paas.service.model.vo.ConfigVO;
|
|
|
import cn.seecoder.paas.util.ServiceException;
|
|
|
import cn.seecoder.paas.util.enums.ConfigBelongsToType;
|
|
|
import cn.seecoder.paas.web.model.Response;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@RestController
|
|
|
+@Slf4j
|
|
|
@RequestMapping("/api/config")
|
|
|
public class ConfigController {
|
|
|
|
|
|
@@ -27,8 +29,10 @@ public class ConfigController {
|
|
|
@RequestParam(required = false, defaultValue = "false") Boolean hotUpdate) throws ServiceException {
|
|
|
ConfigVO result = configService.createOrUpdate(configVO);
|
|
|
|
|
|
+ log.info("配置已更新");
|
|
|
// 如果是环境配置且需要热更新
|
|
|
if (hotUpdate && result.getConfigBelongs() == ConfigBelongsToType.ENVIRONMENT) {
|
|
|
+ log.info("需要热更新配置:config id = {}", configVO.getId());
|
|
|
environmentService.hotUpdateConfig(result.getEntityId());
|
|
|
}
|
|
|
|