Page
@Bean
@Controller
@DefaultScope(value = Singleton::class)
Annotations which is applied to handlers which respond to HTTP requests with HTTP responses, typically encoded in HTML, for the purpose of presenting a user interface.
The Micronaut annotations Controller
behaves in essentially the same manner as Page
, but with different defaults and available settings.
Parameters
route
HTTP route that should be bound to this page.
name
Name to use when generating links for this route.
produces
Types produced by this page; defaults to text/html
.
consumes
Types consumed by this page; defaults to nothing.
precompile
Whether this page handler should be considered for pre-compiled sites. Defaults to true
.