Retrieve a property from a .properties file directly with thymeleaf

0

In a .properties file I have a property with the system version.

Is there any way for Thymeleaf to retrieve this property directly?

I want to use in the footer that is a fragment used on all pages.

    
asked by anonymous 14.02.2018 / 20:59

1 answer

1

To whom it may concern. Spring boot automatically configures thymeleaf. This means that the messages.properties files are automatically identified (as long as they are in the default directory, the same as the application.properties). It is enough for this in the hmtl file to include # {name.key} ta tag specifies. Example:

<p class="navbar-text hidden-xs" th:text="|Versão - #{home.versao}|"></p>
    
16.02.2018 / 01:16