3 quick steps

Install CrudCraft

Add the dependencies, annotate an entity, and compile. You’ll get controllers, services, repositories and DTOs at build time—no runtime magic.

1Add dependencies
2Annotate an entity
3Compile & verify

Prerequisites

1) Add dependencies

Add the annotations, starter and code generator. Replace ${crudcraft.version} with the latest version.

pom.xml
<properties>
  <crudcraft.version>0.1.0</crudcraft.version>
</properties>

<dependencies>
  <!-- Compile-time annotations -->
  <dependency>
    <groupId>nl.datasteel.crudcraft</groupId>
    <artifactId>crudcraft-annotations</artifactId>
    <version>${crudcraft.version}</version>
    <scope>provided</scope>
  </dependency>

  <!-- Runtime starter -->
  <dependency>
    <groupId>nl.datasteel.crudcraft</groupId>
    <artifactId>crudcraft-starter</artifactId>
    <version>${crudcraft.version}</version>
  </dependency>
</dependencies>

<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>3.11.0</version>
      <configuration>
        <annotationProcessorPaths>
          <path>
            <groupId>nl.datasteel.crudcraft</groupId>
            <artifactId>crudcraft-codegen</artifactId>
            <version>${crudcraft.version}</version>
          </path>
        </annotationProcessorPaths>
      </configuration>
    </plugin>
  </plugins>
</build>

2) Annotate an entity

Mark fields for request/response DTOs and search, and optionally enable security.

Customer.java
@CrudCrafted(editable = true, secure = true /* policy configurable */)
@Entity
class Customer {
  @Id UUID id;

  @Dto @Request @Searchable
  String name;

  @Dto(simplified = true)
  Integer priority;
}

3) Build & verify

Terminal
mvn clean compile

Verify outputs

  • Generated Java under target/generated-sources/…
  • CustomerController, CustomerService, CustomerRepository
  • DTOs + MapStruct mapper

IDE tips

  • Enable annotation processing (IntelliJ/Eclipse)
  • Reload / reimport project after first build
  • Target JDK 21 and Boot 3+

Troubleshooting

Generated sources don’t show up in IDE
  • Make sure annotation processing is enabled.
  • Run a full build once (mvn clean compile), then reload the project.
  • Confirm all CrudCraft artifacts use the same version.
Compilation errors on MapStruct
  • Ensure both mapstruct and mapstruct-processor are present.
  • Use matching versions; clear the IDE build cache if needed.
Wrong Java / Boot version
  • Use Java 21+ and Spring Boot 3+.
  • In Maven: set <release>21</release> on maven-compiler-plugin (or use toolchains).

Need help?

Hit a snag or want guidance on structure, security, or search? I can help you get it production-ready fast.