亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

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

運行時出錯

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Tue Dec 18 10:46:47 PST 2018

There was an unexpected error (type=Internal Server Error, status=500).

Invalid bound statement (not found): com.miaoshaproject.dao.UserDOMapper.selectByPrimaryKey


正在回答

4 回答

配置文件會不會寫錯了?mybatis.mapper-locations=classpath:mapping/*.xml


0 回復 有任何疑惑可以回復我~

mybatis-generater.xml中的connectionURL,加參數&nullCatalogMeansCurrent=true:

然后執行,userDOMapper.xml 里面就會有selectByPrimaryKey

<!--數據庫鏈接地址賬號密碼-->

<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
? ? ? ? ? ? ? ?connectionURL="jdbc:mysql://localhost:3306/miaosha?useUnicode=true&amp;characterEncoding=utf8&amp;serverTimezone=GMT&amp;nullCatalogMeansCurrent=true"
? ? ? ? ? ? ? ?userId="root"
? ? ? ? ? ? ? ?password="root">
</jdbcConnection>


0 回復 有任何疑惑可以回復我~

那你看下 USERDOMapper.xml 里面的 namespace 是不是寫錯了

0 回復 有任何疑惑可以回復我~

userDOMapper.xml 里面沒有 selectByPrimaryKey

0 回復 有任何疑惑可以回復我~
#1

慕容9033451 提問者

有的啊,但是不知道為什么找不到
2018-12-20 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
SpringBoot構建電商基礎秒殺項目
  • 參與學習       49468    人
  • 解答問題       978    個

應用SpringBoot快速搭建擁有用戶、商品、交易及秒殺活動的電商秒殺應用。

進入課程

運行時出錯

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號