dawdler-server-plug-mybatis
Module introduction
Implements injection of MyBatis Mappers into the service layer on the server side.
1. Add the dependency to the pom
<groupId>club.dawdler</groupId>
<artifactId>dawdler-server-plug-mybatis</artifactId>
2. MyBatis configuration in services-conf.xml
services-conf.xml is the core configuration file for the server side. It covers data source definition, mapping target packages to data sources, read/write splitting configuration, and server-side configuration.
In this module, the MyBatis-related configuration lives in the values of the mapper child nodes of mybatis, and supports the antPath syntax.
Example:
<mybatis>
<mappers>
<mapper>classpath*:com/anywide/shop/*/mapper/xml/*.xml</mapper>
</mappers>
</mybatis>
3. Inject Mapper
See Injecting Mapper.