<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Heck's  Blog]]></title> 
<link>https://www.heckjj.com/index.php</link> 
<description><![CDATA[一瞬间的决定，往往可以改变很多，事实上，让自己成功的往往不是知识，是精神！ 如果你总是为自己找借口，那只好让成功推迟。执行力，今天！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Heck's  Blog]]></copyright>
<item>
<link>https://www.heckjj.com/post//</link>
<title><![CDATA[thymeleaf获取当前时间并格式化输出]]></title> 
<author>Heck &lt;@hecks.tk&gt;</author>
<category><![CDATA[Web开发]]></category>
<pubDate>Wed, 23 Jan 2019 02:23:05 +0000</pubDate> 
<guid>https://www.heckjj.com/post//</guid> 
<description>
<![CDATA[ 
	有时候会需要在模板中直接打印时间的需求，如果输出一个时间还需要在java类中去获取model的话，那未免也太麻烦了，以下为thymeleaf在模板中直接获取时间戳并格式化输的代码<br/><br/>获取时间戳<br/><br/><textarea name="code" class="html" rows="15" cols="100">
<p th:text="$&#123;new java.util.Date().getTime()&#125;"></p>
</textarea><br/><br/>格式化时间<br/><textarea name="code" class="html" rows="15" cols="100">
[[$&#123;#dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd hh:mm:ss')&#125;]]
</textarea><br/>注：[[$&#123;&#125;]]这种格式为内联，你也可以使用th:text="$&#123;&#125;"<br/><br/>以上为直接在thymeleaf中获取时间戳和格式化时间输入的实例
]]>
</description>
</item><item>
<link>https://www.heckjj.com/post//#blogcomment</link>
<title><![CDATA[[评论] thymeleaf获取当前时间并格式化输出]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://www.heckjj.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>