Mybatis報錯:Type interface com.mycode.dao.UserMapper is not known to the MapperRegistry.

問題描述: MapperRegistry不知道 com.mycode.dao.UserMapper這個接口。 解決思路: 以上圖示代碼首先是讀取核心配置文件(SqlMapConfig.xml),得到一個輸入流,構造者根據輸入流流構造一個工廠,工廠生產一個SqlSession對象,SqlSession對象得到映射器的代理對象(有接口,沒有實現類,生成代理對象),由代理對象執行sql語句。而報錯是Ma
相關文章
相關標籤/搜索