How to use angular two-way anchor tag in spring boot Thymeleaf

I have an image defined in a json file as shown below

certLogoURL: "/img/ocjp.gif"

I am trying to display this in my thimeleaf template as

<img th:src="@{ {{certificate.certLogoURL}} }" > </img>

Image does not appear on my webpage.

When I check a webpage, it converts to

<img src="/img/ocjp.gif">

If I encoded the value as

<img th:src="@{/img/ocjp.gif}"> </img>

The image is displayed correctly.

Could you help me with this?

+4
source share
1 answer

there may be a bad way, check out http://www.thymeleaf.org/doc/articles/standarddialect5minutes.html in 2.4. Link Expressions (URL)

0
source

Source: https://habr.com/ru/post/1685845/


All Articles