use of com.dtstack.taier.develop.annotation.FileUpload in project Taier by DTStack.
the class AddDatasourceController method getPrincipalsWithConf.
@ApiOperation(value = "解析kerberos文件获取principal列表")
@PostMapping("/getPrincipalsWithConf")
@FileUpload
public R<List<String>> getPrincipalsWithConf(@RequestParam(value = "file", required = false) MultipartFile file, Map<String, Object> params) {
Pair<String, String> resource = (Pair<String, String>) params.get("resource");
params.remove(RESOURCE);
DataSourceVO dataSourceVo = PublicUtil.mapToObject(params, DataSourceVO.class);
params.put(RESOURCE, resource);
return R.ok(datasourceService.getPrincipalsWithConf(dataSourceVo, resource, dataSourceVo.getUserId()));
}
Aggregations