如何使用Rest Json提供的XMLGregorian日历?

时间:2019-06-13 20:23:55

标签: java spring rest gson

  

java.lang.RuntimeException:无法调用公共   没有args的javax.xml.datatype.XMLGregorianCalendar()           在com.google.gson.internal.ConstructorConstructor $ 3.construct(ConstructorConstructor.java:113)           在com.google.gson.internal.bind.ReflectiveTypeAdapterFactory $ Adapter.read(ReflectiveTypeAdapterFactory.java:212)           在com.google.gson.internal.bind.ReflectiveTypeAdapterFactory $ 1.read(ReflectiveTypeAdapterFactory.java:131)           com.google.gson.internal.bind.ReflectiveTypeAdapterFactory $ Adapter.read(ReflectiveTypeAdapterFactory.java:222)

IServiceDetailsService detailsService;
@RequestMapping(value = "/getServiceHire",method = RequestMethod.POST ,produces = "application/json")
public String getDetailServices(@RequestBody HistoricalMarketRequest marketRequest){
    Gson gson = new Gson();

    List<ServiceDetails> detailsList = new ArrayList<>();
    String jsonDetails = "";

Logger logger = Logger.getLogger(ServiceDetailRest.class);
@Autowired
@Qualifier("ServiceDetailImpl")
IServiceDetailsService detailsService;
@RequestMapping(value = "/getServiceHire",method = RequestMethod.POST ,produces = "application/json")
public String getDetailServices(@RequestBody HistoricalMarketRequest marketRequest){
    Gson gson = new Gson();

    List<ServiceDetails> detailsList = new ArrayList<>();
    String jsonDetails = "";

如何使用Rest Json提供的XMLGregorian日历?
我需要休息休息一下

0 个答案:

没有答案