Skip to content

Quickstart

Build a complete admin panel in minutes.

No frontend required.

  • product list
  • create / edit forms
  • validation
  • status badges
  • delete confirmation
<dependency>
<groupId>io.mateu</groupId>
<artifactId>mvc-core</artifactId>
<version>3.0-alpha.187</version>
</dependency>
<dependency>
<groupId>io.mateu</groupId>
<artifactId>annotation-processor-mvc</artifactId>
<version>3.0-alpha.187</version>
</dependency>
enum ProductStatus {
Available, OutOfStock
}
record Product(
@NotEmpty String id,
@NotEmpty String name,
@NotNull ProductStatus status
) implements Identifiable {}
class ProductAdapter extends AutoCrudAdapter<Product> {
@Override
public CrudRepository<Product> repository() {
return new ProductRepository();
}
}
@UI("/products")
public class Products extends AutoCrudOrchestrator<Product> {
@Override
public AutoCrudAdapter<Product> simpleAdapter() {
return new ProductAdapter();
}
}
Terminal window
mvn spring-boot:run

Open http://localhost:8080/products

Products list

If your @UI classes live in a separate Java library module (not in the same module as the Spring Boot app), you also need to add annotation-processor-indexer to that library so Mateu can discover its UI classes across the module boundary:

<!-- in the library module's pom.xml -->
<dependency>
<groupId>io.mateu</groupId>
<artifactId>annotation-processor-indexer</artifactId>
<version>${mateu.version}</version>
<scope>provided</scope>
</dependency>

And add the library to <annotationProcessorPaths> in the app module.

See Service-owned UI modules for the full setup.