小编Jav*_*eat的帖子

Access application.properties value in thymeleaf template

I have one of my spring boot application and inside my application.properties there is one of the property is url=myurl.net. In the same application I have one thyme leaf html template. I wanted to get the url value into that template. I am using the following code inside the thymeleaf html template <font face=arial size=2 > access the url : </font> ${environment.getProperty(‘url’)}

Output I am getting :

access the url : $(environment.getProperty(‘url’)}

Output I am expecting:

access the url …

thymeleaf

4
推荐指数
2
解决办法
1267
查看次数

标签 统计

thymeleaf ×1