@Override public void init() throws Exception { if (watcher == null) { if (rootPath != null) { rootPath.mkdirs(); } watcher = new WatcherSpringContext(); manuallyCreatedWatcher = true; watcher.setRootDirectory(rootPath); watcher.init(); } super.init(); }