@PostConstruct
	private void updateModuleDefinitions() {
		if (this.zkConnection.getClient() != null) {
			try {
				CuratorFramework client = this.zkConnection.getClient();
				if (client.checkExists().forPath(Paths.STREAMS) != null) {
					for (StreamDefinition definition : findAll()) {
						setModuleDefinitions(client, definition);
					}
				}
			}
			catch (Exception e) {
				logger.error("Exception migrating stream definitions. This migration is done when the existing " +
						"stream definitions that don't have module definitions set." , e);
			}
		}
	}
The migration code to run against existing stream definitions that don't have module definitions set already.
The following method will update the module definitions for those stream definitions.
See https://jira.spring.io/browse/XD-2854
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/stream/StreamDeployer.java