@ddekany,你说得对,对不起。我会牢记这一点,以备不时之需!
所以我尝试了你的建议,并且如上所述使用?
仍然会返回错误消息,但它变得更加重要。
2020-07-01 08:19:02,521 ERROR [geoserver.ows] - freemarker.core.ParseException: Error on line 29, column 46, in template content.ftl Found is_date_like, expecting one of: is_directive, parent, js_string, j_string, uncap_first, is_transform, number, is_hash, trim, children, has_content, iso_ms, xml, iso_utc, byte, double, left_pad, matches, capitalize, number_to_datetime, contains, size, iso_local_h_nz, iso_utc_ms, iso_local_m_nz, is_collection, long, default, iso_utc_h_nz, iso_local_ms, is_boolean, last_index_of, c, iso_utc_m_nz, is_macro, rtf, iso_utc_nz, upper_case, node_name, reverse, cap_first, url, is_hash_ex, iso_nz, is_enumerable, exists, number_to_date, first, iso_local, date, iso, replace, float, right_pad, datetime, node_type, split, iso_ms_nz, number_to_time, is_sequence, iso_utc_m, html, ancestors, iso_utc_h, iso_local_ms_nz, new, last, sort, eval, lower_case, web_safe, is_date, is_string, iso_local_nz, word_list, seq_last_index_of, node_namespace, string, keys, iso_m_nz, values, seq_index_of, chunk, sort_by, iso_m, starts_with, substring, index_of, iso_h, root, floor, iso_h_nz, ceiling, if_exists, chop_linebreak, iso_local_h, length, is_indexable, groups, is_node, iso_local_m, int, iso_utc_ms_nz, xhtml, ends_with, round, interpret, is_method, namespace, short, seq_contains, time, is_number in content.ftl
因此,问题似乎在于内置。正如错误消息中所说,Freemarker 期望is_date
而不是is_date_like
,尽管在 Freemarker 文档中它是is_date_like
应该使用而不是is_date
link的状态。所以我尝试了你的建议is_date
。
现在,没有出现错误消息,但日期格式没有改变。