SSM框架中遇到的报错总结

  • java.lang.ExceptionInInitializerError

原因:Could not find resource xxx/xxx/xxx/Mapper.xml

解决方法:
在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>
上一篇:更改Apollo数据库为oracle


下一篇:SSM整合---狂神说Java学习笔记