2018-02-07 14:53:22 +00:00
|
|
|
[[_theme_resource]]
|
2022-03-23 14:34:07 +00:00
|
|
|
=== Theme resources
|
2018-02-07 14:53:22 +00:00
|
|
|
|
2019-09-06 08:41:38 +00:00
|
|
|
When implementing custom providers in {project_name} there may often be a need to add additional templates, resources and messages bundles.
|
2018-02-07 14:53:22 +00:00
|
|
|
|
|
|
|
ifeval::[{project_community}==true]
|
|
|
|
An example use-case would be a <<_auth_spi,custom authenticator>> that requires additional templates and resources.
|
|
|
|
endif::[]
|
|
|
|
|
|
|
|
The easiest way to load additional theme resources is to create a JAR with templates in `theme-resources/templates`
|
2022-02-08 13:07:16 +00:00
|
|
|
resources in `theme-resources/resources` and messages bundles in `theme-resources/messages`.
|
2018-02-07 14:53:22 +00:00
|
|
|
|
|
|
|
If you want a more flexible way to load templates and resources that can be achieved through the ThemeResourceSPI.
|
|
|
|
By implementing `ThemeResourceProviderFactory` and `ThemeResourceProvider` you can decide exactly how to load templates
|
|
|
|
and resources.
|