Package org.apache.juneau.rest.server.convention
@Rest(mixins=...) resources that ship the
"internet conventions" surface (favicon, robots, sitemap, version, well-known) every public-facing
service eventually grows.
Four sibling mixins compose into the host @Rest-annotated resource. Each mixin owns its
default mount paths and is independently mountable; the four together drop in as a pack via
@Rest(mixins={FaviconMixin.class, SeoMixin.class, VersionMixin.class, WellKnownMixin.class}).
FaviconMixin—/favicon.icowith a 30-dayCache-Controland a default Juneau-branded icon on the framework classpath.SeoMixin—/robots.txt(deny-all by default) and/sitemap.xml(empty<urlset>by default); both builder-driven.VersionMixin—/version(SVL-configurable) returning a JSON metadata map; defaults readMANIFEST.MF+git.propertiesfrom the classpath.WellKnownMixin—/.well-known/security.txtper RFC 9116; 404 unless explicitly configured.
Composition example:
All four endpoints are excluded from generated Swagger / OpenAPI specs via
@OpSwagger(ignore=true) —
convention endpoints are not API-meaningful.
See Also:
- Since:
- 10.0.0
-
ClassesClassDescriptionMixin that serves a
favicon.icoicon at/favicon.ico.Builder forFaviconMixininstances.Flavor-neutral favicon worker bean shared by the favicon@Restflavors.Builder forFaviconProviderinstances.Child-resource flavor of theFaviconMixinmixin.Standalone servlet companion of theFaviconMixinmixin.Mixin that serves SEO-conventional endpoints/robots.txtand/sitemap.xml.Builder forSeoMixininstances.Single sitemap entry (immutable).Mixin that serves deployment-introspection metadata at/version(configurable).Builder forVersionMixininstances.Flavor-neutral version/build-metadata worker bean shared by the version@Restflavors.Builder forVersionProviderinstances.Child-resource flavor of theVersionMixinversion/build-metadata capability.Standalone servlet companion of theVersionMixinmixin.Mixin that serves RFC 8615/.well-known/*discovery endpoints.Builder forWellKnownMixininstances.