class ServerConfigController {

    @RequestMapping(value = "/add", method = RequestMethod.POST)
    public ServiceResult<String> add(@Validated(AddServerConfig.class) @RequestBody ServerConfig serverConfig, @CurrentUser LoginUser user, Errors errors) throws Exception {
        serverConfig.setUpdate_user_no(user.getUserNo());
        ValidateResult validateRes = serverConfigService.validatePermision(user, errors)
                .addAssert(() -> serverConfigDao.insertServerAppConfig(serverConfig) > 0, message.db_message_add_operation_failed).validate();
        if (!validateRes.isValid()) {
            return ServiceResult.fail(validateRes.getSummarize());
        }
        return ServiceResult.success();
    }

}