I'm outputting some database results via json
webservice. Simple as:
@GetMapping(produces = "application/json")
public List<Map<String, Object>> get(Param params) {
return jdbcTemplate.queryForList(sql, params)
}
Problem: java.sql.Timestamp
is converted to format 2018-04-26T07:52:02.000+0000
, while the plain database output would be 2018-04-26 07:52:02.0
.
Question: is there any configuration property to tell spring to just pass through the native timestamp received from the database, instead of converting it with jackson
logic?
I want to change the java.sql.Timestamp
format globally.
Important: please don't suggest any annotations! I don't have any bean/pojo, I'm just returning the plain database result as a Map
.