Class WebJarsRoutesConfigurer<A extends ExchangeContext>

java.lang.Object
io.inverno.mod.web.server.WebJarsRoutesConfigurer<A>
Type Parameters:
A - the exchange context type
All Implemented Interfaces:
WebRoutesConfigurer<A>

public class WebJarsRoutesConfigurer<A extends ExchangeContext> extends Object implements WebRoutesConfigurer<A>

Web routes configurer used to configure routes exposing WebJars resources deployed on the module path or class path.

This configurer defines as many routes as there are WebJars defined on the module path or class path. It assumes a webjar provides static content under /META-INF/resources/webjars/<name>/<version> as defined by WebJars.

For instance assuming example-webjar is on the classpath in version 1.2.3, its resource can be accessed at /webjars/example-webjar/*.

Since:
1.3
Author:
Jeremy Kuhn
  • Constructor Details

    • WebJarsRoutesConfigurer

      public WebJarsRoutesConfigurer(ResourceService resourceService)

      Creates a WebJars web routes configurer with the specified resource service.

      Parameters:
      resourceService - the resource service
  • Method Details