zoukankan      html  css  js  c++  java
  • Invalid bound statement (not found): com.**.demo.mapper.User_infoMapper

      最近遇到一个小问题,是由于不细心造成的。项目配置文件之前是.property,接口也是能调通的,后来改成.yml格式,修改后把mybatis配置在spring下面了,所以一直找不到xml文件报错,网上查了各种方法也不起作用

    server:
      port: 8080
    spring:
      profiles:
        active: dev
      redis:
        host: localhost
        database: 0
        port: 6379
        password:
        pool:
          max-active: 200
          max-wait: -1
          max-idle: 10
          min-idle: 10
          timeout: 1000
    
    # JWT Object save audience
    audience:
        clientId: 098f6bcd4621d373cade4e832627b4f6
        # A key that can be replaced by Base64 encryption
        base64Secret: MDk4ZjZiY2Q0NjIxZDM3M2NhZGU0ZTgzMjYyN2I0ZjY=
        # The issuing subject of the JWT shall be deposited in the issuer
        name: springbootapi
        # Expired 24 hours
        expiresSecond: 86400
    pagehelper:
        helperDialect: mysql
        reasonable: true  # To minimize or maximize the number of pages when the input page is negative or larger
        supportMethodsArguments: true
        params: count:countSql
    mybatis:
        typeAliasesPackage: com.xj.demo.model
        mapper-locations: classpath:/mapper/*.xml

     正确的方法是把mybatis放在一级目录与spring同级即可

    mybatis下的两个元素,缺一不可

      

  • 相关阅读:
    AVFrame 解析
    Mat与图像的基本概念
    linux基本操作
    Makefile 使用
    MySQL的安装与配置——详细过程
    k8s imagePullPolicy拉取策略
    K8S拉取Django项目创建pod
    Harbor单点仓库部署
    Django项目构建发布Harbor仓库
    K8S集群部署-二进制部署
  • 原文地址:https://www.cnblogs.com/personblog/p/14073432.html
Copyright © 2011-2022 走看看