MyBatis-Spring-Boot
MyBatis-Spring-Boot copied to clipboard
spring boot 无法设置mapper的配置tk.mybatis.mapper.entity.Config
在 3.5.0的tk.mybatis.spring.mapper.ClassPathMapperScanner的79行 mapperHelper.setProperties(properties); 这里的properties中的属性的名称为 mapper.not-empty 但在tk.mybatis.mapper.entity.Config#setProperties方法里,却是用 String notEmpty = properties.getProperty("notEmpty"); 来判断。 我在tk.mybatis.mapper.mapperhelper.EntityHelper#initEntityNameMap((Class<?> entityClass, Config config) ) 断点跟踪也证明Config对象并没有得到正确的配置。
starter 中需要完全按照属性名去设置,也就是目前不支持boot规范的relax方式。
原因就是为了支持boot 2.0,因此获取属性的方式存在问题。