Abhijeet Giram:
私は、文字列を持っています
str = My name is john.<br> I am software engineer.<br> I am a web developer<br>
私はそのすべての出現を交換したかった<br>
と<br />
thymeleafインチ
私はこれを試してみました
${#strings.replace(str,'<br>','<br />')}
私が知りたかった、上記の文字列は、方法は、以下のすべての出現を置き換える置き換えられませんか<br>
?
参考文献:
https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html
https://www.baeldung.com/spring-thymeleaf-3-expressions
アマンガーグ:
はい、それはすべての出現を置き換えます。Thymeleafは内部で発生を置き換えるためにjava.lang.String.replaceメソッドを呼び出します。