配置:
datasource:type: com.alibaba.druid.pool.DruidDataSource # 当前数据源操作类型driver-class-name: org.gjt.mm.mysql.Driver # mysql驱动包url: jdbc:mysql://localhost:3306/db2019?useUnicode=true&characterEncoding=utf-8&useSSL=falseusername: rootpassword: abc123
mybatis:mapperLocations: classpath:mapper/*.xmltype-aliases-package: com.atguigu.springcloud.entities # 所有Entity别名类所在包
insert into payment(serial) values(#{serial});
@Mapper
public interface PaymentDao {public int create(Payment payment);public Payment getPaymentById(@Param("id") Long id);
}