java.lang.ExceptionInInitializerError mybatis初始化错误

初始化错误,原因项目只会编译java文件,编译后只有class文件xml等其他resource文件不会存在编译后的包里

 

 

 

解决方法:在项目或者模块的maven配置文件pom.xml中配置

 <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>

 

 

posted @ 2020-06-08 10:08  漫步花海下的oldman  阅读(895)  评论(0编辑  收藏  举报