[MyBatis]Invalid bound statement (not found)错误

来源:互联网 发布:天津哪个淘宝城比较好 编辑:程序博客网 时间:2024/05/19 13:45

使用maven分模块时候, xml文件不会被打包,会出现 [MyBatis]Invalid bound statement (not found)错误

解决方法

http://www.cnblogs.com/oyx305/p/5340683.html


<build>    ...    </plugins>        ...        <!--        此plugin可以用        利用此plugin,把源代码中的xml文件,打包到相应位置,        这里主要是为了打包Mybatis的mapper.xml文件         -->        <plugin>            <artifactId>maven-resources-plugin</artifactId>            <version>2.5</version>            <executions>                <execution>                    <id>copy-xmls</id>                    <phase>process-sources</phase>                    <goals>                        <goal>copy-resources</goal>                    </goals>                    <configuration>                        <outputDirectory>${basedir}/target/classes</outputDirectory>                        <resources>                            <resource>                                <directory>${basedir}/src/main/java</directory>                                <includes>                                    <include>**/*.xml</include>                                </includes>                            </resource>                        </resources>                    </configuration>                </execution>            </executions>        </plugin>           ...    </plugins>         ...</build>


阅读全文
0 0
原创粉丝点击