mybatis(一)

1. Mybatis配置 1.1mybatis-config.xml

mybatis(一)

db.properties引用下列文件

1.2db.properties

配置数据库连接参数

 

mybatis(一)

1.3pom.xml依赖包配置

mybatis(一)

mybatis(一)

mybatis(一)

1 <dependency> 2 3 <groupId>org.mybatis</groupId> 4 5 <artifactId>mybatis</artifactId> 6 7 <version>3.4.4</version> 8 9 </dependency> 10 11 <dependency> 12 13 <groupId>mysql</groupId> 14 15 <artifactId>mysql-connector-java</artifactId> 16 17 <version>5.1.18</version> 18 19 </dependency> 20 21 22 23 <dependency> 24 25 <groupId>org.slf4j</groupId> 26 27 <artifactId>slf4j-api</artifactId> 28 29 <version>1.7.25</version> 30 31 </dependency> 32 33 <dependency> 34 35 <groupId>org.slf4j</groupId> 36 37 <artifactId>slf4j-log4j12</artifactId> 38 39 <version>1.7.25</version> 40 41 <scope>runtime</scope> 42 43 </dependency> 44 45 <dependency> 46 47 <groupId>log4j</groupId> 48 49 <artifactId>log4j</artifactId> 50 51 <version>1.2.17</version> 52 53 <scope>runtime</scope> 54 55 </dependency> 56 57 <dependency> 58 59 <groupId>junit</groupId> 60 61 <artifactId>junit</artifactId> 62 63 <version>4.11</version> 64 65 <scope>test</scope> 66 67 </dependency>

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zydzgd.html