All configuration options are under the phoenix
tag.
phoenix:
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
- 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 tempalte files. All other files found there will be ignored
- errorPages: Optional configuration options for error pages views. Templates configured here must respect all requirements of Phoenix, 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, build-in Phoenix 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 it's use case.