Learn how to configure Flamewing

Configuration

YAML Configuration

Options configured in application.yml

All configuration options are under the flamewing tag.

flamewing:
    controllersPackage: "com.example.demo.controllers"
    views:
        path: classpath*:views
        extension: .java.html
    errorPages:
        code404: page404 # View name for 404 page, optional
        code500: page500 # View name for 500 page, optional                    
    fragmentRetrieveEnabled: true

A short explanation for each configuration option

Property Description
controllersPackage Specifies the package where the controllers are present in the application. All sub-packages are also included. It is used for doing reverse-routing.
views.path Specifies the location of the template files that will be parsed and compiled during runtime. Normally, these should be in the resources folder of your Spring application.
views.extension The extension of your template files. All other files found there will be ignored.
errorPages Optional configuration options for error page views. Templates configured here must respect all requirements of Flamewing, including having a @constructor() and extension .java.html. Furthermore, whitelabel pages for Spring must be disabled: spring.mvc.throwExceptionIfNoHandlerFound = true. If no error pages are configured, built-in Flamewing error pages are used.
fragmentRetrieveEnabled Specifies if retrieving the HTML code of a fragment is allowed from the client-side using GET requests. See dedicated page for more information on this and its use case.