zoukankan      html  css  js  c++  java
  • Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:generate (default-cli) on project : <properties> resource does not exist

    使用mybatis-generator自动生成mapper、dao等文件时,报错如下:

    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:generate (default-cli) on project ssm: <properties> resource does not exist

    错误原因是maven无法找到对应<properties> resource文件.

    解决方法如下:

    1.检查properties文件,每一行的行首和行末,是否有多余的空格,将其删掉;

    2.在maven的pom.xml文件中,加入如下的<resource>配置:

    <dependencies>
      <!--相关的依赖文件-->
    </dependencies>
    <bulid>
    <plugins>
      <!--相关的插件-->
    </plugins>
    <resources>
                <resource>
                    <directory>src/main/java</directory>
                    <includes>
                        <include>**/*.xml</include>
                    </includes>
                    <filtering>true</filtering>
                </resource>
    
                <resource>
                    <directory>src/main/resources</directory>
                    <includes>
                        <include>**/*.properties</include>
                    </includes>
                </resource>
     </resources>
    </build>
  • 相关阅读:
    登乐游原
    遇到Tomcat端口占用怎么办
    tensorflow cnn+rnn基本结构
    linux bash 入门
    python 装饰器
    php 后端开发学习
    图像增强方法
    git 使用
    斯坦福机器学习课程笔记
    django学习笔记
  • 原文地址:https://www.cnblogs.com/expiator/p/7600559.html
Copyright © 2011-2022 走看看