@RequestMapping(value = "/projects/add", method = RequestMethod.POST)
public @ResponseBody WebResult add( HttpEntity<Project> entity) throws IOException {
Project project =entity.getBody();
String userName = simpleAuthz.getPrincipal();
project.setAdmins(Lists.newArrayList(userName));
WebResult result=new WebResult();
project.setMetricCollection(project.getMetricCollection());
try {
projectService.create(project);
} catch (IllegalArgumentException e) {
result.setSuccess(false);
result.setMessage(e.getMessage());
}
return result;
}