Interface StaticContent
- All Superinterfaces:
JexExtension, JexPlugin
Static content resource handler.
var staticContent = StaticContent.createFile("src/test/resources/public")
.directoryIndex("index.html")
.preCompress()
.build()
Jex.create()
.plugin(staticContent)
.port(8080)
.start();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder for StaticContent. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic StaticContent.BuilderCreate and return a new static content class path configuration with the `/public` directory as the root.static StaticContent.BuilderofClassPath(String resourceRoot) Create and return a new static content class path configuration.static StaticContent.BuilderCreate and return a new static content configuration for a File.
-
Method Details
-
ofClassPath
Create and return a new static content class path configuration.- Parameters:
resourceRoot- The file to serve, or the directory the files are located in.
-
ofClassPath
Create and return a new static content class path configuration with the `/public` directory as the root. -
ofFile
Create and return a new static content configuration for a File.- Parameters:
resourceRoot- The path of the file to serve, or the directory the files are located in.
-