mybatis.mapper-locations详解

# MybatisProperties

# 扫描Mapper接口对应的XML文件,如所示:扫描的是resources下的mapper文件夹中所有的xml结尾的文件。注:如果全程使用@Mapper注解,可以不使用该配置,SpringBoot提倡“约定优于配置”

mybatis.mapper-locations=classpath:mapper/*.xml

# 来指定POJO扫描包来让mybatis自动扫描到自定义的POJO

mybatis.type-aliases-package=com.nowcoder.community.entity

# 允许JDBC支持自动生成主键,需要驱动兼容

mybatis.configuration.useGeneratedKeys=true

# 自动驼峰命名转换

mybatis.configuration.mapUnderscoreToCamelCase=true

猜你喜欢

转载自blog.csdn.net/m0_63270506/article/details/127093626