WatchForMainRun
Initializes multiple watchers and debounces change events to rerun the generation pipeline.
Required and optional watchers
entityConfig / entityFactory
Required
handlerConfig / handlerFactory
Required
swaggerConfig / swaggerFactory
Required
asyncApiFactory
Optional. Add if RSocket AsyncAPI is needed for the project.
Config options
debounceMillis(long)
Default 400ms
trigger(Path)
Reload trigger file. If omitted, .reloadtrigger in the classpath root.
classpathWatchPaths(String)
Add classpath root with CSV or OS path separator.
...Config
Create a default watcher factory with the config object.
...Factory
Directly inject the watcher creation method.
Add AsyncAPI
Lifecycle
When used as a Spring Bean, call runner.start() in @PostConstruct and runner.stop() in @PreDestroy. Do not hide start failures; check the stack trace in the local console to quickly identify any missing generations.