Intellij文档说:
DateInfo has the following properties: year int The current year. month int The current month (1-12).
我无法让Intellij为我生成当年.我尝试了所有可能的:$DateInfo.year
,${DateInfo.getYear()}
等等.
正如文件所说:
$ today DateInfo当前日期和时间.
...
DateInfo具有以下属性:
year int当年.
month int当前月份(1-12).
尝试: $today.year
由于这是Velocity模板(?),您不必使用大括号 - {}
干杯