Skip to content

Customizing Generated Stubs

CrudCraft can emit concrete service and controller classes that you are free to modify.

Enable Editable Mode

Set editable = true on @CrudCrafted to generate stubs in addition to the abstract runtime bases.

java
@CrudCrafted(editable = true)
public class User { ... }

Copy Stubs into Your Project

The EditableFileTool copies editable files from the processor's output directory into your source tree so they can be versioned.

bash
mvn -q -pl crudcraft-tools exec:java -Dexec.mainClass=com.crudcraft.tools.EditableFileTool

By default the tool looks in target/generated-sources/annotations and copies into src/main/java.

Modify and Rebuild

Edit the copied classes as needed. The annotation processor will not overwrite them on subsequent builds, allowing you to extend or replace the generated logic.