`

Maven搭建SpringMVC+Mybatis项目详解

 
阅读更多

 

刚好要建项目,把要用到的东西都召集了一下,希望对你们有用。(测试项目已建好,上传时出现问题,有需要的可以找我)

 

 

1. Maven环境搭建和介绍:

http://blog.csdn.net/fengshizty/article/details/43019561

 

2.IDEA创建Maven项目教程:

http://blog.csdn.net/u011424470/article/details/52062133

 

 

3.使用Generator自动生成Mybatis相关表信息

      自动生成表的Model,Mapping,Dao文件,先关使用见文章 http://blog.csdn.net/fengshizty/article/details/43086833 

并将其导入到项目的src/main/java包中。

 

 

4.Maven搭建SpringMVC+Mybatis项目详解:

http://blog.csdn.net/u011424470/article/details/52067766

 

 

 

5.项目创建后,mvn clean的时候mapper文件夹没有被编译,解决办法如下:

pom.xml文件里边加上:

<resources>
    <!--增加.properties 和*.xml打包编译插件-->
<resource>
        <directory>src/main/java</directory>
        <includes>
            <include>**/*.properties</include>
            <include>**/*.xml</include>
        </includes>
        <filtering>false</filtering>
    </resource>
</resources>

 再次编译的时候  mapper文件夹就会被编译。

 



 

  • 大小: 20.9 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics