这篇文章主要介绍了AngularJS整合Springmvc、Spring、Mybatis搭建开发环境的相关资料,为学习使用AngularJS做好基础准备,感兴趣的小伙伴们可以参考一下
最近想学习AngularJS的使用,网上搜了一圈后,折腾了半天解决bug后,成功使用AngularJS整合Springmvc、Spring、Mybatis搭建了一个开发环境。(这里Spring使用的版本是4.0.6,Mybatis版本是3.2.5,AngularJS的版本是1.0.3)
第一步:创建一Maven项目,在pom.xml下添加需要的包
4.0.0
test.AngularSpringmvcMybatis
AngularSpringmvcMybatis
war
0.0.1-SNAPSHOT
AngularSpringmvcMybatis Maven Webapp
http://maven.apache.org
junit
junit
3.8.1
test
org.springframework spring-webmvc 4.0.6.RELEASE org.springframework spring-core 4.0.6.RELEASE org.springframework spring-tx 4.0.6.RELEASE org.springframework spring-jdbc 4.0.6.RELEASE org.springframework spring-orm 4.0.6.RELEASE org.springframework spring-aspects 4.0.6.RELEASE org.springframework spring-context-support 4.0.6.RELEASE org.mybatis mybatis 3.2.5 org.mybatis mybatis-spring 1.2.0 org.aspectj aspectjweaver 1.6.8 mysql mysql-connector-java 5.1.6 c3p0 c3p0 0.9.1 log4j log4j 1.2.16 javax.servlet servlet-api 3.0-alpha-1 asm asm 3.3 asm asm-commons 3.3 asm asm-tree 3.3 ognl ognl 3.0.6 commons-logging commons-logging 1.1.3 org.apache.velocity velocity 1.7 org.codehaus.jackson jackson-mapper-asl 1.9.12 AngularSpringmvcMybatis
第二步:在src/main/resources下添加配置文件,如下:
(注: