運(yùn)行時(shí)出錯(cuò)
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
2018-12-20
2018-12-20
mybatis-generater.xml中的connectionURL,加參數(shù)&nullCatalogMeansCurrent=true:
然后執(zhí)行,userDOMapper.xml 里面就會(huì)有selectByPrimaryKey
<!--數(shù)據(jù)庫(kù)鏈接地址賬號(hào)密碼-->
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"? ? ? ? ? ? ? ?connectionURL="jdbc:mysql://localhost:3306/miaosha?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT&nullCatalogMeansCurrent=true"
? ? ? ? ? ? ? ?userId="root"
? ? ? ? ? ? ? ?password="root">
</jdbcConnection>
2018-12-20
那你看下 USERDOMapper.xml 里面的 namespace 是不是寫錯(cuò)了
2018-12-19
userDOMapper.xml 里面沒有 selectByPrimaryKey