SpringBoot启动错误 If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.

SpringBoot启动错误 If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
强烈推介IDEA2020.2破解激活,IntelliJ IDEA 注册码,2020.2 IDEA 激活码
  • 需要在pom文件中<build></build中添加如下.来保证文件都能正常被扫描到并且加载成功.
<!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉。 -->
<resources>
    <resource>
        <directory>src/main/java</directory>
        <includes>
            <include>**/*.yml</include>
            <include>**/*.properties</include>
            <include>**/*.xml</include>
        </includes>
        <filtering>false</filtering>
    </resource>
    <resource>
        <directory>src/main/resources</directory>
        <includes>
            <include>**/*.yml</include>
            <include>**/*.properties</include>
            <include>**/*.xml</include>
        </includes>
        <filtering>false</filtering>
    </resource>
</resources>

 

本文来源huayang183,由架构君转载发布,观点不代表Java架构师必看的立场,转载请标明来源出处:https://javajgs.com/archives/18571

发表评论