Caused by: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibat

	Caused by: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'userResultMap'.  Cause: java.lang.ClassNotFoundException: Cannot find class: userResultMap
		at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:118)
		at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:265)
		at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:252)
		at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElements(XMLMapperBuilder.java:244)
		at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:116)
		... 104 more
	Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias 'userResultMap'.  Cause: java.lang.ClassNotFoundException: Cannot find class: userResultMap
		at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:120)
		at org.apache.ibatis.builder.BaseBuilder.resolveAlias(BaseBuilder.java:149)
		at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:116)
		... 108 more

Recently, during SSM integration, I encountered a bug of classnotfoundexception, which means that the result type corresponding to the return value cannot be found. Finally, I found that I wrote the type and ID inversely.

In addition, if the returned value is a basic data type, use resulttype. If it matches resultmap
, such as collection, map, etc., use resultmap. When facing Baidu debug, you will report similar errors when you see this situation

Read More: