You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2019/02/14 10:42:06 UTC

[GitHub] sxcooler opened a new issue #1095: 请教LocalDateTime的输出形式能否自定义

sxcooler opened a new issue #1095: 请教LocalDateTime的输出形式能否自定义
URL: https://github.com/apache/servicecomb-java-chassis/issues/1095
 
 
   例如我有一个字段createTime在数据库里是timestamp,在实体里定义的是LocalDateTime,@RestSchema直接return的话,在浏览器看到是这样的:
   ![image](https://user-images.githubusercontent.com/3192045/52781545-cd06bd80-3087-11e9-96ae-7f85ef8ebd8a.png)
   但是我用fastjson序列化输出到console是这样的:`"createTime":"2019-01-29T11:37:54"`
   请教这个能否自定义?我希望输出像fastjson那样,或者我可以用DateTimeFormatter自定义更好。
   btw,如果这个字段在实体里定义为String,则输出是这样的:`2019-01-29  11:37:54.0`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services