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

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM