Result Maps collection already contains value for com.xxx.xxxMapper . baseresultmap problem solving

remove the cache first,

mybatis appear Result Maps collection already contains the value for the com. XXX. XxxMapper. R. aseResultMap mistakes,

could both be a problem with MybatisGenerator’s reverse generation.

suppose MybatisGenerator is used to reverse-engineer the code to generate the dao file and mapper.xml file,

after clearing the cache, carefully examine the mapper.xml file that was previously generated!

if the code is generated again, the generated code must be deleted first, otherwise it will be appended to the original file. Carefully check the mapper.xml file

to see if there are two resultMap with id BaseResultMap, delete the redundant ones, and keep only one to solve the problem.

or remove the mapper.xml file and regenerate.

Read More: