public class StaticFilesConfiguration extends Object
Modifier and Type | Field and Description |
---|---|
static StaticFilesConfiguration |
servletInstance |
Constructor and Description |
---|
StaticFilesConfiguration() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all static file configuration
|
void |
configure(String folder)
Configures location for static resources
|
void |
configureExternal(String folder)
Configures location for static resources
|
boolean |
consume(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
Attempt consuming using either static resource handlers or jar resource handlers
|
static StaticFilesConfiguration |
create() |
boolean |
isExternalStaticResourcesSet() |
boolean |
isStaticResourcesSet() |
void |
putCustomHeader(String key,
String value) |
void |
putCustomHeaders(Map<String,String> headers) |
void |
setExpireTimeSeconds(long expireTimeSeconds) |
public static StaticFilesConfiguration servletInstance
public boolean consume(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse) throws IOException
httpRequest
- The HTTP servlet request.httpResponse
- The HTTP servlet response.IOException
- in case of IO error.public void clear()
public boolean isStaticResourcesSet()
public boolean isExternalStaticResourcesSet()
public void configure(String folder)
folder
- the locationpublic void configureExternal(String folder)
folder
- the locationpublic static StaticFilesConfiguration create()
public void setExpireTimeSeconds(long expireTimeSeconds)
Copyright © 2018. All rights reserved.