mapperLocations属性通配符的使用

您所在的位置:网站首页 mapperlocations属性的作用 mapperLocations属性通配符的使用

mapperLocations属性通配符的使用

2024-01-16 16:10| 来源: 网络整理| 查看: 265

mapperLocations属性通配符的使用

# mybatis mybatis.type-aliases-package=com.miaosha.base.vo mybatis.configuration.map-underscore-to-camel-case=true mybatis.configuration.default-fetch-size=100 mybatis.configuration.default-statement-timeout=3000 mybatis.mapperLocations = classpath*:com/miaosha/base/mapping/*.xml

注意点:在classpath后面的 * 必不可少,缺少 * 的话后面的通配符不起作用。

                **表示可以表示任意多级目录,如:上述配置可以查到【com/miaosha/base/mapping/*.xml】

                *表示多个任意字符

 

 缺少classpath后面的 * 会报以下的错误:

org.apache.ibatis.binding.BindingException: Invalid bound statement (not foud)

 



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3