@MapperScan

这个注解是用户扫描mapper接口的,也就是dao类

			@MapperScan({"com.flying.supershop.common.mapper","com.flying.supershop.common.search"})
mybatis.mapper-locations:

用于扫描mapper.xml的,和 @MapperScan 二者对应,缺少一个都会报错

mybatis.mapper-locations: classpath*:mapper/*.xml,classpath*:search/*.xml
mybatis.type-aliases-package:

用于扫描 pojo 类

	mybatis.type-aliases-package: com.flying.supershop.common.pojo,com.flying.supershop.common.search
Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐