最新回答 / jannnn
用哪門技術其實沒有太大限制,主要看實際業(yè)務場景來選擇。論性能來說fastjson要比jackson好,但是在對輸出JSON數(shù)據(jù)限制上,jackson要更靈活。
2018-08-23
最新回答 / 韋煾
檢查下application.properties配置哈spring.thymeleaf.prefix=classpath:/templates/spring.thymeleaf.suffix=.htmlspring.thymeleaf.mode=HTML5spring.thymeleaf.encoding=UTF-8spring.thymeleaf.servlet.content-type=text/html# \u5173\u95ed\u7f13\u5b58, \u5373\u65f6\u5237\u...
2018-08-16
最贊回答 / 慕雪6104141
我也遇到了相同的問題,在pom.xml中添加,解決了
<dependency> ????<groupId>tk.mybatis</groupId> ????<artifactId>mapper</artifactId> ????<version>4.0.3</version> </dependency>
最贊回答 / 韋煾
請將ThymeleafController上的注解改成@RestController就可以了,因為RestController會自動將返回值轉成json,前端只能解析json或者thymeleaf的模板文件。
最新回答 / 慕勒0424635
clean一下
最贊回答 / 慕斯卡1552588
user實體里面birthday是定義的Date,@JsonFormat只是在當方法前加了返回json的注解的時候會在返回的json里面格式化日期,而這個地方不是返回的json,是整個對象原封不動的傳到前端的,birthday依然還是Date類型,所以需要自己轉換
2018-08-12