@RequestMapping(value = "/definitions", method = RequestMethod.POST)
	@ResponseStatus(HttpStatus.CREATED)
	public void save(@RequestParam("name") String name, @RequestParam("definition") String definition,
			@RequestParam(value = "deploy", defaultValue = "true") boolean deploy) throws Exception {
		DeploymentAction deploymentAction = (deploy) ? DeploymentAction.createAndDeploy : DeploymentAction.create;
		validator.validateBeforeSave(name, definition);
		deploymentMessagePublisher.poll(new DeploymentMessage(deploymentUnitType)
				.setUnitName(name)
				.setDeploymentAction(deploymentAction)
				.setDefinition(definition));
	}
Create a new resource definition.

@param name The name of the entity to create (required)
@param definition The entity definition, expressed in the XD DSL (required)
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/rest/XDController.java