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下的两个元素,缺一不可

      

  • 相关阅读:
    1022 D进制的A+B
    1021 个位数统计
    L1-040 最佳情侣身高差
    Celery--基本使用
    Celery--安装
    Celery--简介
    RabbitMQ--常用命令
    RabbitMQ--RPC实现
    RabbitMQ发布订阅
    RabbitMQ基本使用
  • 原文地址:https://www.cnblogs.com/personblog/p/14073432.html
Copyright © 2011-2022 走看看