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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

SSM提取單列數(shù)據(jù)報(bào)錯(cuò)

Caused by: org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the Mapped Statement 'org.libM.dao.bookDao.getImage'.? It's likely that neither a Result Type nor a Result Map was specified.

單列數(shù)據(jù)的類型是String ,不是不用配置嗎?我如果配置成實(shí)體類的話,它不就是返回一個(gè)封裝的實(shí)體類?我不需要?jiǎng)e的呀

正在回答

1 回答

需要配置resultType類型的。

String?findNameById(@Param("seckillId")?String?seckillId);
	<select?id="findNameById"?resultType="String">
		SELECT?s.name
		FROM?seckill?s
		WHERE?s.seckill_id?=?#{seckillId}
	</select>
	@Test
	public?void?testFindNameById()?{
		String?id?=?"c18c12a838c311e89fa754ee75c6aeb0";
		String?name?=?seckillMapper.findNameById(id);
		log.info("name:{}",?name);
	}
執(zhí)行結(jié)果:INFO?cn.colg.dao.SeckillMapperTest?-?name:1000元秒殺iphone6


0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

SSM提取單列數(shù)據(jù)報(bào)錯(cuò)

我要回答 關(guān)注問(wèn)題
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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