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

為了賬號安全,請及時綁定郵箱和手機立即綁定

查詢時報404錯誤

http://img1.sycdn.imooc.com//5853fbec000156da05400143.jpg

	public?List<Message>?queryMessageList(String?command,?String?description)?{
		DBAccess?dbAccess?=?new?DBAccess();
		List<Message>?messageList?=?new?ArrayList<Message>();
		SqlSession?sqlSession?=?null;
		try?{
			sqlSession?=?dbAccess.getSqlSession();
			Message?message?=?new?Message();
			message.setCommand(command);
			message.setDescription(description);
			//通過sqlSession執(zhí)行SQL語句
			messageList?=?sqlSession.selectList("Message.queryMessageList",message);
		}?catch?(IOException?e)?{
			e.printStackTrace();
		}finally{
			if(sqlSession!=null){
				sqlSession.close();
			}
			
		}
		return?messageList;
	}
	public?static?void?main(String[]?args)?{
		MessageDao?messageDao?=?new?MessageDao();
		messageDao.queryMessageList("",?"");
	}
<mapper?namespace="Message">

??<resultMap?type="com.imooc.bean.Message"?id="MessageResult">
????<id?column="ID"?jdbcType="INTEGER"?property="id"/>
????<result?column="COMMAND"?jdbcType="VARCHAR"?property="command"/>
????<result?column="DESCRIPTION"?jdbcType="VARCHAR"?property="description"/>
????<result?column="CONTENT"?jdbcType="VARCHAR"?property="content"/>
??</resultMap>

??<select?id="queryMessageList"?parameterType="com.imooc.bean.Message"?resultMap="MessageResult">
????select?ID,COMMAND,DESCRIPTION,CONTENT?from?MESSAGE?where?1=1
????<if?test="command?!=?null?and?!&quot;&quot;.equals(command.trim())">
????	and?COMMAND=#{command}
????</if>
?????<if?test="description?!=?null?and?!&quot;&quot;.equals(description.trim())">
????	and?DESCRIPTION?like?'%'?#{description}?'%'
????</if>
??</select>
</mapper>


?<environments?default="development">
????<environment?id="development">
??????<transactionManager?type="JDBC">
????????<property?name=""?value=""/>
??????</transactionManager>
??????<dataSource?type="UNPOOLED">
????????<property?name="driver"?value="com.mysql.jdbc.Driver"/>
????????<property?name="url"?value="jdbc:mysql://localhost:3306/micro_message?useUnicode=true&amp;characterEncoding=UTF-8"/>
????????<property?name="username"?value="root"/>
????????<property?name="password"?value="123456"/>
??????</dataSource>
????</environment>
??</environments>

??<mappers>
????<mapper?resource="com/imooc/config/sqlxml/Message.xml"/>
??</mappers>

</configuration>


正在回答

2 回答

或者頁面不存在,你可以調(diào)試下,看看跳到后臺沒有

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

陽光下最猥瑣的猩 提問者

謝謝 web.xml文件中的路徑錯了
2016-12-18 回復(fù) 有任何疑惑可以回復(fù)我~

你servlet的路徑有錯誤,后mybatis沒有關(guān)系

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

舉報

0/150
提交
取消
通過自動回復(fù)機器人學(xué)Mybatis---基礎(chǔ)版
  • 參與學(xué)習(xí)       107413    人
  • 解答問題       830    個

微信公眾號自動回復(fù)功能學(xué)習(xí)Mybatis,基礎(chǔ)教程加案例實戰(zhàn)方式學(xué)習(xí)

進入課程

查詢時報404錯誤

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

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

幫助反饋 APP下載

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

公眾號

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