Troubleshooting
Checks the configuration and support code shapes in order when there are no generated files or when route/type is missing.
Verification order
• Check if @Profile("local") is included in the actual execution profile.
• Ensure that no exceptions occur in the local console for runner.start().
• Verify that rootPath, routerPackage, entityPackage, and handlerOutputDir are in the correct locations after dot/slash conversion.
• Check if the generated source directory is included in the IDE and build tool source set.
• Add external common module types to decompile jar class or source classpath.
• Ensure that RouterFunction is in a fluent route/nest and handler method reference form.
Dot path and slash path
Config normalizes . to / in multiple path inputs. While package strings and filesystem paths can be mixed, you need to check the difference between configurations that include the full output path like src.main.java.com.example... and those that only include the com.example... package.
Reproduce path configuration
import com.byeolnaerim.watch.route.HandlerGenerator;
var handlerConfig = HandlerGenerator.Config.builder()
.rootPath("src/main/java")
.routerPackage("com.example.web.router")
.handlerPackage("com.example.web.handler")
.handlerOutputDir("src/main/java/com/example/web/handler")
.build();
System.out.println(handlerConfig.routerDir());
// src/main/java/com/example/web/router/Run from the project root and check that the printed routerDir contains the router source. Including src/main/java in routerPackage duplicates the path. Pass this configuration to the runner's handlerConfig and run with the local profile from Quick Start. handlerPackage is the Java package name; handlerOutputDir is the actual output directory.
test -d src/main/java/com/example/web/router
find src/main/java/com/example/web/handler -name '*.java'
# Quick Start swaggerOutputFile:
test -s src/main/resources/static/swagger.jsonIf the paths are correct but output is missing, start with the first exception from runner.start(). Reproduce with one minimal route using a handler::method reference, inspect the generated files, then add your existing routes. A swagger.json file alone does not establish correctness: check the request path and HTTP method in paths against the actual response contract.
Infinite regeneration
The Swagger writer only writes the file when the content changes. If regeneration occurs repeatedly, check if the output file is included in the watchDirectory, and whether a formatter or other watcher is continuously modifying the generated source.