Property 'configuration' and 'configLocation' can not specified with together 错误提示
mybatis:
type-aliases-package: com.heff.springcloud.pojo
config-location: classpath:mybatis/mybatis-config.xml
mapper-locations: classpath:mybatis/mapper/*.xml
configuration:
map-underscore-to-camel-case: true
是因为 map-underscore-to-camel-case: true 与 config-location: classpath:mybatis/mybatis-config.xml 冲突了
正确方式一:
mybatis:
# 指定全局配置文件位置
config-location: classpath:mybatis/mybatis-config.xml
# 指定sql映射文件位置
mapper-locations: classpath:mybatis/mapper/*.xml
正确方式二:
# 指定sql映射文件位置
mybatis:
mapper-locations: classpath:mybatis/mapper/*.xml
configuration:
map-underscore-to-camel-case: true
————————————————
原文链接:https://blog.csdn.net/zhangbeizhen18/article/details/88554664