Liuzh
Liuzh
使用 useGeneratedKeys 时,可能是JDBC的问题,你试试纯JDBC有没有问题。
既有id又有order_id,想让order_id作为id去查询?
这行配置只在 generatorConfig.xml 中用到了。
报什么错?
generator 用了 mapper.Mapper 属性。。所以你改的对。
@zhanghaichang 看这个:https://github.com/abel533/Mybatis-Spring/blob/master/src/main/resources/applicationContext.xml
别用markerInterface方式就行。
Service层封装即可。
Mapper-Starer 1.2.0 使用须知 使用1.2.0的时候需要满足下面三种情况之一 1. 项目(间接)依赖中不包含官方的mybaitis-starter 2. 使用tk提供的@MapperScan注解方式 3. 在启动类上增加如下注解忽略 ```java @EnableAutoConfiguration( exclude={org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration.class}) public class Application { } ```
现在有一个问题,就不支持relax方式的属性。 例如 `not-empty`,需要写成 `notempty`。