一、 数据库建表
-
CREATE TABLE `user` (
-
`userId` int(11) NOT NULL AUTO_INCREMENT,
-
`UserName` varchar(45) NOT NULL,
-
`UserEmail` varchar(200) NOT NULL,
-
PRIMARY KEY (`userId`),
-
UNIQUE KEY `userId_UNIQUE` (`userId`)
-
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
二、maven配置
-
<dependencies>
-
<dependency>
-
<groupId>org.mybatis</groupId>
-
<artifactId>mybatis</artifactId>
-
<version>3.2.6</version>
-
</dependency>
-
-
<dependency>
-
<groupId>junit</groupId>
-
<artifactId>junit</artifactId>
-
<version>4.12</version>
-
<scope>test</scope>
-
</dependency>
-
-
<dependency>
-
<groupId>c3p0</groupId>
-
<artifactId>c3p0</artifactId>
-
<version>0.9.1.2</version>
-
</dependency>
-
-
<dependency>
-
<groupId>mysql</groupId>
-
<artifactId>mysql-connector-java</artifactId>
-
<version>6.0.2</version>
-
</dependency>
-
</dependencies>
三、mybasit 配置
阅读(4060) | 评论(0) | 转发(0) |