MybatisBindingExceptionInvalidboundstatement(notfound)

编程

这个问题看似简单,我们通常处理方式考虑的

1.xml文件和dao包下接口对应的问题;

1.1 接口名和namespace,方法名和id名,参数和parameterType 等。

2.yml的配置文件也是要重要考虑

这是正确的

spring:

application:

name: cloud-payment-service

datasource:

type: com.alibaba.druid.pool.DruidDataSource # 当前数据源操作类型

driver-class-name: org.gjt.mm.mysql.Driver # mysql驱动包

url: jdbc:mysql://192.168.11.33:3306/springcloud2020?serverTimezone=GMT&useUnicode=true&characterEncoding=utf-8&useSSL=false

username: root

password: 123456

mybatis:

mapper-locations: classpath:mapper/*.xml

type-aliases-package: com.atguigu.springcloud.entities # 所有Entity别名类所在包

这是错误的

spring:

application:

name: cloud-payment-service

datasource:

type: com.alibaba.druid.pool.DruidDataSource # 当前数据源操作类型

driver-class-name: org.gjt.mm.mysql.Driver # mysql驱动包

url: jdbc:mysql://192.168.11.33:3306/springcloud2020?serverTimezone=GMT&useUnicode=true&characterEncoding=utf-8&useSSL=false

username: root

password: 123456

mybatis:

mapper-locations: classpath:mapper/*.xml

type-aliases-package: com.atguigu.springcloud.entities # 所有Entity别名类所在包

以上是 MybatisBindingExceptionInvalidboundstatement(notfound) 的全部内容, 来源链接: utcz.com/z/517488.html

回到顶部