WatchForMainRun
여러 watcher를 최초 실행하고 변경 event를 debounce해 generation pipeline을 다시 실행합니다.
필수와 선택 watcher
entityConfig / entityFactory
필수
handlerConfig / handlerFactory
필수
swaggerConfig / swaggerFactory
필수
asyncApiFactory
선택. RSocket AsyncAPI가 필요한 프로젝트에서 추가
Config options
debounceMillis(long)
기본 400ms
trigger(Path)
reload trigger file. 생략하면 classpath root의 .reloadtrigger
classpathWatchPaths(String)
CSV 또는 OS path separator로 classpath root 추가
...Config
config 객체로 기본 watcher factory 생성
...Factory
watcher 생성 방식을 직접 지연 주입
AsyncAPI 추가
Lifecycle
Spring Bean으로 사용할 때 @PostConstruct에서 runner.start(), @PreDestroy에서 runner.stop()을 호출합니다. start 실패를 숨기지 말고 local console에서 stack trace를 확인해야 생성 누락을 바로 발견할 수 있습니다.