fix(项目设置): 修改MOCK端口时检查端口有效性
This commit is contained in:
parent
0e89db6369
commit
20d1108676
|
@ -7,6 +7,7 @@ import io.metersphere.base.domain.*;
|
|||
import io.metersphere.base.mapper.ProjectApplicationMapper;
|
||||
import io.metersphere.base.mapper.ProjectMapper;
|
||||
import io.metersphere.commons.constants.ProjectApplicationType;
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.commons.utils.CommonBeanFactory;
|
||||
import io.metersphere.commons.utils.LogUtil;
|
||||
import io.metersphere.commons.utils.SessionUtils;
|
||||
|
@ -104,6 +105,11 @@ public class ProjectApplicationService {
|
|||
LogUtil.error("update project config parse mock port error.");
|
||||
port = 0;
|
||||
}
|
||||
|
||||
if (port == 0) {
|
||||
MSException.throwException("tcp port cannot be 0");
|
||||
}
|
||||
|
||||
if (port > 0) {
|
||||
projectService.checkMockTcpPort(port);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue