小编Inw*_*weo的帖子

如何使用 Spring 和 Thymeleaf 显示没有 html 标签的消息

我有一些 html 代码:

<div class="brand">
    <span class="logo"></span> Title
    <small>subtitle</small>
</div>
Run Code Online (Sandbox Code Playgroud)

在标签中,我可以以这种方式显示 messages.properties (带有语言环境)中的文本(spring + thymeleaf)

<small th:text="#{small.text}" />
Run Code Online (Sandbox Code Playgroud)

但我不知道如何显示标题文本的正确语言版本。

谢谢你的建议

html spring message thymeleaf

4
推荐指数
1
解决办法
5164
查看次数

Postgresql 在通过条件时更新列

是否可能,如果可以,如何实现以下改变?

给定表格:

param_tab
param_id serial
value integer
anothervalue integer
update_date TIMESTAMP
Run Code Online (Sandbox Code Playgroud)

我想做类似的事情:

UPDATE param_tab pt
CASE WHEN CONDITION THEN pt.value = 14, pt.anothervalue = 20 END
pt.update_date = someTimestamp;
Run Code Online (Sandbox Code Playgroud)

所以update_date总是更新并且valueanothervalue在某些情况下更新

postgresql case conditional-statements

2
推荐指数
1
解决办法
5638
查看次数