Skip to content

Commit

Permalink
bugfix: 数据库账号的端口可以输入负数 TencentBlueKing#1446
Browse files Browse the repository at this point in the history
  • Loading branch information
jsonwan committed Nov 7, 2022
1 parent d855bf7 commit 8f02a13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
Expand Down Expand Up @@ -71,7 +72,7 @@ Response<Long> saveAccount(
@PathVariable(value = "scopeId")
String scopeId,
@ApiParam(value = "创建账号请求")
@RequestBody
@RequestBody @Validated
AccountCreateUpdateReq accountCreateUpdateReq
);

Expand All @@ -91,7 +92,7 @@ Response updateAccount(
@PathVariable(value = "scopeId")
String scopeId,
@ApiParam(value = "更新账号请求")
@RequestBody
@RequestBody @Validated
AccountCreateUpdateReq accountCreateUpdateReq
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
@Service
public class GlobalSettingsServiceImpl implements GlobalSettingsService {

private static final Pattern PATTERN = Pattern.compile("^([+\\-]?\\d+)([a-zA-Z]{0,2})$");
private static final Pattern PATTERN = Pattern.compile("^([.0-9]+)([a-zA-Z]{0,2})$");
private static final String STRING_TPL_KEY_CURRENT_VERSION = "current_ver";
private static final String STRING_TPL_KEY_CURRENT_YEAR = "current_year";
private final DSLContext dslContext;
Expand Down

0 comments on commit 8f02a13

Please sign in to comment.