public sealed interface JexConfig
Jex configuration.
-
Method Summary
Modifier and TypeMethodDescriptioncompression(Consumer<CompressionConfig> consumer) Return the contextPath to use.contextPath(String contextPath) Set the contextPath.executor()Executor for serving requests.Set executor for serving requests.booleanhealth()Return true to include the health endpoint.health(boolean health) Set to true to include the health endpoint.host()Return the host to bind to.Set the host to bind to.booleanReturn true to ignore trailing slashes.ignoreTrailingSlashes(boolean ignoreTrailingSlashes) Set to true to ignore trailing slashes.Return the JsonService.jsonService(JsonService jsonService) Set the JsonService to use.intport()Return the port to use.port(int port) Set the port to use.booleanReturn true if static files should be pre compressed.preCompressStaticFiles(boolean preCompressStaticFiles) Set to true to pre compress static files.renderer(String extension, TemplateRender renderer) Register a template renderer explicitly.Return the template renderers registered by extension.Return the ssl context if https is enabled.sslContext(SSLContext ssl) Enable https with the provided SSLContext.
-
Method Details
-
port
Set the port to use. Defaults to 7001. -
host
Set the host to bind to. -
contextPath
Set the contextPath. -
health
Set to true to include the health endpoint. Defaults to true. -
ignoreTrailingSlashes
Set to true to ignore trailing slashes. Defaults to true. -
preCompressStaticFiles
Set to true to pre compress static files. Defaults to false. -
jsonService
Set the JsonService to use. -
renderer
Register a template renderer explicitly.- Parameters:
extension- The extension the renderer applies to.renderer- The template render to use for the given extension.
-
executor
Set executor for serving requests. -
executor
Executor executor()Executor for serving requests. Defaults to aExecutors.newVirtualThreadPerTaskExecutor() -
port
int port()Return the port to use. -
host
String host()Return the host to bind to. -
contextPath
String contextPath()Return the contextPath to use. -
health
boolean health()Return true to include the health endpoint. -
ignoreTrailingSlashes
boolean ignoreTrailingSlashes()Return true to ignore trailing slashes. -
preCompressStaticFiles
boolean preCompressStaticFiles()Return true if static files should be pre compressed. -
jsonService
JsonService jsonService()Return the JsonService. -
sslContext
SSLContext sslContext()Return the ssl context if https is enabled. -
sslContext
Enable https with the provided SSLContext. -
renderers
Map<String,TemplateRender> renderers()Return the template renderers registered by extension. -
compression
-
compression
CompressionConfig compression()
-