| Constructor and Description |
|---|
AssetsBundle()
Creates a new AssetsBundle which serves up static assets from
src/main/resources/assets/* as /assets/*. |
AssetsBundle(String path)
Creates a new AssetsBundle which will configure the application to serve the static files
located in
src/main/resources/${path} as /${path}. |
AssetsBundle(String resourcePath,
String uriPath)
Creates a new AssetsBundle which will configure the application to serve the static files
located in
src/main/resources/${resourcePath} as /${uriPath}. |
AssetsBundle(String resourcePath,
String uriPath,
String indexFile)
Creates a new AssetsBundle which will configure the application to serve the static files
located in
src/main/resources/${resourcePath} as /${uriPath}. |
AssetsBundle(String resourcePath,
String uriPath,
String indexFile,
String assetsName)
Creates a new AssetsBundle which will configure the application to serve the static files
located in
src/main/resources/${resourcePath} as /${uriPath}. |
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(Bootstrap<?> bootstrap) |
void |
run(Environment environment) |
public AssetsBundle()
src/main/resources/assets/* as /assets/*.AssetsBundle(String, String, String)public AssetsBundle(String path)
src/main/resources/${path} as /${path}. For example, given a
path of "/assets", src/main/resources/assets/example.js would be
served up from /assets/example.js.path - the classpath and URI root of the static asset filesAssetsBundle(String, String, String)public AssetsBundle(String resourcePath, String uriPath)
src/main/resources/${resourcePath} as /${uriPath}. For example, given a
resourcePath of "/assets" and a uriPath of "/js",
src/main/resources/assets/example.js would be served up from /js/example.js.resourcePath - the resource path (in the classpath) of the static asset filesuriPath - the uri path for the static asset filesAssetsBundle(String, String, String)public AssetsBundle(String resourcePath, String uriPath, String indexFile)
src/main/resources/${resourcePath} as /${uriPath}. If no file name is
in ${uriPath}, ${indexFile} is appended before serving. For example, given a
resourcePath of "/assets" and a uriPath of "/js",
src/main/resources/assets/example.js would be served up from /js/example.js.resourcePath - the resource path (in the classpath) of the static asset filesuriPath - the uri path for the static asset filesindexFile - the name of the index file to usepublic AssetsBundle(String resourcePath, String uriPath, String indexFile, String assetsName)
src/main/resources/${resourcePath} as /${uriPath}. If no file name is
in ${uriPath}, ${indexFile} is appended before serving. For example, given a
resourcePath of "/assets" and a uriPath of "/js",
src/main/resources/assets/example.js would be served up from /js/example.js.resourcePath - the resource path (in the classpath) of the static asset filesuriPath - the uri path for the static asset filesindexFile - the name of the index file to useassetsName - the name of servlet mapping used for this assets bundlepublic void initialize(Bootstrap<?> bootstrap)
initialize in interface Bundlepublic void run(Environment environment)
Copyright © 2015. All rights reserved.