Differences from Spring

Spring has no navigation for apps, so this starter is new. It borrows Spring's names and rules where there is something to borrow. This page lists what carries over from Spring, and where it behaves differently.

Why

If you know Spring MVC or WebFlux, most of the router reads familiar: a path pattern on a class, a builder of routes, filters, scopes. Knowing where the likeness stops saves surprises.

Example

The same route in both:

// Spring WebFlux
RouterFunctions.route()
    .GET("/books/{isbn}", handler::book)
    .filter(adminOnly)
    .build();
// Here
ScreenRoutes.route()
    .screen('/books/{isbn}', (r) => const BookPage())
    .filter(AdminOnly())
    .build();

What carries over

Spring Here
@GetMapping("/books/{isbn}") path patterns: {name}, {name:regex}, {*rest} The same syntax in @ScreenRoute
RouterFunctions.route()...build() ScreenRoutes.route()...build()
HandlerFilterFunction RouteFilter
request and session scopes route and branch scopes
@PreAuthorize on a method @PreAuthorize on a screen (with the security starter)
RestTemplate, JdbcTemplate RouteTemplate, the API of the navigation
springdoc's @Operation @RouteInfo

What differs

Limits

See also