@PostMapping("/import")
    @RequiresPermissions("system:manager:importConfig")
    public ShenyuAdminResult importConfigs(final String namespace, final MultipartFile file) {
        if (StringUtils.isBlank(namespace) || Objects.isNull(file)) {
            return ShenyuAdminResult.error(ShenyuResultMessage.PARAMETER_ERROR);
        }
        try {
            ShenyuAdminResult importResult = configsService.configsImport(namespace, file.getBytes());
            if (Objects.equals(CommonErrorCode.SUCCESSFUL, importResult.getCode())) {
                // sync data
                syncDataService.syncAll(DataEventTypeEnum.REFRESH);
            }
            return importResult;
        } catch (IOException e) {
            LOG.error("parsing data failed", e);
            return ShenyuAdminResult.error(ShenyuResultMessage.PARAMETER_ERROR);
        }
    }
Import configs.

@param namespace namespace
@param file config file
@return shenyu admin result
shenyu-admin/src/main/java/org/apache/shenyu/admin/controller/ConfigsExportImportController.java