zoukankan      html  css  js  c++  java
  • invalid bound statement (not found)

    mybatis代码生成器生成的mapper类,在service中使用@Autowired报错 Could not autowire. No beans of 'AccountMapper' type found.

    直接运行代码,接口访问报错

    查询后,知道需要在pom.xml文件中的<build>中配置了resource,不然mapper.xml文件就会被漏掉

    <resources>
    <resource>
    <directory>src/main/java</directory>
    <includes>
    <include>**/*.properties</include>
    <include>**/*.xml</include>
    </includes>
    <filtering>false</filtering>
    </resource>
    <resource>
    <directory>src/main/resources</directory>
    <includes>
    <include>**/*.properties</include>
    <include>**/*.xml</include>
    </includes>
    <filtering>false</filtering>
    </resource>
    </resources>
  • 相关阅读:
    java面向对象
    Mysql 用户管理
    Mysql备份数据库
    Java方法&面向对象习题
    Mysql 用户管理
    java 方法笔记
    事物与存储过程
    多表操作
    视图 sql语句
    mongodb
  • 原文地址:https://www.cnblogs.com/tianphone/p/10756010.html
Copyright © 2011-2022 走看看