運行時出錯
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,加參數&nullCatalogMeansCurrent=true:
然后執行,userDOMapper.xml 里面就會有selectByPrimaryKey
<!--數據庫鏈接地址賬號密碼-->
<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 是不是寫錯了
2018-12-19
userDOMapper.xml 里面沒有 selectByPrimaryKey