Skip to content

Quickstart

Build a complete admin panel in minutes.

No frontend required.

  • product list
  • create / edit forms
  • validation
  • status badges
  • delete confirmation
<!-- Core framework -->
<dependency>
<groupId>io.mateu</groupId>
<artifactId>mvc-core</artifactId>
<version>3.0-alpha.203</version>
</dependency>
<!-- Annotation processor (generates wiring at compile time) -->
<dependency>
<groupId>io.mateu</groupId>
<artifactId>annotation-processor-mvc</artifactId>
<version>3.0-alpha.203</version>
</dependency>
<!-- Frontend web component (Vaadin + Lit) -->
<dependency>
<groupId>io.mateu</groupId>
<artifactId>vaadin-lit</artifactId>
<version>3.0-alpha.203</version>
</dependency>
enum ProductStatus {
Available, OutOfStock
}
record Product(
@NotEmpty String id,
@NotEmpty String name,
@NotNull ProductStatus status
) implements Identifiable {}
@UI("/products")
public class Products extends AutoCrud<Product> {
@Override
public CrudRepository<Product> repository() {
return new ProductRepository();
}
}
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.