(1) If the acId type can be changed, change it to string. If the acId type implementation cannot be changed. (2) Method 1, redefine a javabean, but change the acId type to string. (3) Method two, process the gson string again and add "" to both sides of 24768209282400257.
Change the type of id to
String
, and do the conversion between Long and String when processing.Similar to this question about portal.
If it doesn’t meet your needs, you need to customize a Gson serialization method yourself.
Customized ObjectMapper will automatically convert the Long type into string and send it to the front end
(1) If the acId type can be changed, change it to string.
If the acId type implementation cannot be changed. (2) Method 1, redefine a javabean, but change the acId type to string.
(3) Method two, process the gson string again and add "" to both sides of 24768209282400257.