创建maven项目,导入相关jar包
junit
1 <dependency>
2 <groupId>junitgroupId>
3 <artifactId>junitartifactId>
4 <version>4.12version>
5 dependency>
mybatis
1 <dependency>
2 <groupId>org.mybatisgroupId>
3 <artifactId>mybatisartifactId>
4 <version>3.5.2version>
5 dependency>
mysql-connector-java
1 <dependency>
2 <groupId>mysqlgroupId>
3 <artifactId>mysql-connector-javaartifactId>
4 <version>5.1.47version>
5 dependency>
spring,特别注意导入spring-jdbc
1 <dependency>
2 <groupId>org.springframeworkgroupId>
3 <artifactId>spring-webmvcartifactId>
4 <version>5.1.10.RELEASEversion>
5 dependency>
6 <dependency>
7 <groupId>org.springframeworkgroupId>
8 <artifactId>spring-jdbcartifactId>
9 <version>5.1.10.RELEASEversion>
10 dependency>
aspectJ AOP
1
2 <dependency>
3 <groupId>org.aspectjgroupId>
4 <artifactId>aspectjweaverartifactId>
5 <version>1.9.4version>
6 dependency>
mybatis-spring
1 <dependency>
2 <groupId>org.mybatisgroupId>
3 <artifactId>mybatis-springartifactId>
4 <version>2.0.2version>
5 dependency>
解决maven静态资源约定大于习惯问题
1 <build>
2 <resources>
3 <resource>
4 <directory>src/main/javadirectory>
5 <includes>
6 <include>**/*.propertiesinclude>
7 <include>**/*.xmlinclude>
8 includes>
9 <filtering>truefiltering>
10 resource>
11 resources>
12 build>