Recently when using MyBatis as a crud, just put the configuration files and mapping files to make the test can get sqlsessionfactory when there is caused by:java.lang.ClassNotFoundException:Cannot Find Class:usermap
Search and search on the Internet finally found the error, is their own mapping file configuration problems, the query returned is a collection, then its parameters is resultmap= "" and I wrote with alt+/Resulttype, so the program has not been normal operation, has been error ...
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6B/E6/wKioL1U557vRFtE2AAiQYsk61iY636.jpg "style=" float: none; the "title=" MyBatis cannot find the class problem. jpg "alt=" wkiol1u557vrfte2aaiqysk61iy636.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6B/EA/wKiom1U55nSiBDf3AAo7R1-FcVc861.jpg "style=" float: none; the "title=" MyBatis cannot find the class problem 1.jpg "alt=" Wkiom1u55nsibdf3aao7r1-fcvc861.jpg "/>
See thatResulttype, it is the curse of theResulttypeinsteadResultmapjust OK!
This article is from the "Java Foundation Meeting" blog, please be sure to keep this source http://java1234.blog.51cto.com/9213635/1637955
No tired exceptions are explained when using MyBatis, or when testing crud