第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

參數(shù)值 [2018-04-08T11:02:44] 與預(yù)期類型

參數(shù)值 [2018-04-08T11:02:44] 與預(yù)期類型

ibeautiful 2021-10-28 14:11:42
我想將此 XML 發(fā)送到 api 服務(wù)器:XML 請(qǐng)求:<reconcile>  <start_date>2018-04-08T11:02:44</start_date>  <end_date>2018-04-08T11:02:44</end_date>  <page>1</page></reconcile>JAXB 代碼:@XmlRootElement(name = "reconcile")@XmlAccessorType(XmlAccessType.FIELD)public class Reconcile {    @XmlElement(name = "start_date")    @XmlJavaTypeAdapter(LocalDateTimeXmlAdapter.class)    public LocalDateTime start_date;    @XmlElement(name = "end_date")    @XmlJavaTypeAdapter(LocalDateTimeXmlAdapter.class)    public LocalDateTime end_date;    @XmlElement(name = "page")    public String page;SQL查詢:public List<PaymentTransactions> transactionsByDate(LocalDateTime start_date, LocalDateTime end_date) throws Exception {        String hql = "select e from " + PaymentTransactions.class.getName() + " e where e.created_at >= ? and e.created_at <= ?";        Query query = entityManager.createQuery(hql).setParameter(0, start_date).setParameter(1, end_date));        List<PaymentTransactions> paymentTransactions = (List<PaymentTransactions>) query.getResultList();        return paymentTransactions;    }但是當(dāng)我提出請(qǐng)求時(shí),我得到:java.lang.IllegalArgumentException: Parameter value [2018-04-08T11:02:44] did not match expected type [java.util.Date (n/a)]在將日期值作為 SQL 查詢的參數(shù)發(fā)送之前,是否需要轉(zhuǎn)換它?或者我需要使用其他類型的日期?
查看完整描述

2 回答

  • 2 回答
  • 0 關(guān)注
  • 151 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)