springboot, Mybatis in resultMap mybatis multi-module project in two projects of how to share (the same definition must be repeated each mapper.xml resultMap in it)
1. If A project needs to reference resultMap B project, add B projects in pom.xml file referenced A
<dependency>
<groupId>cn.com.yawei.hotline</groupId>
<artifactId>common</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
Figure: I quoted is called the common project of
2. Add yml disposed inside the document A, B of the scanning xml
mybatis:
mapper-locations: classpath*:mapper/*.xml
Find mybatis configuration, the original of the CLASSPATH: Mapper / .xml ※ replaced the CLASSPATH: Mapper / .xml, that is behind calsspath plus ※ asterisk
Plus namespace path .resultMap B project name when referring to 3.A project xml file to