首页 > 代码库 > Spring + myBatis (XML) + mySQL

Spring + myBatis (XML) + mySQL

增加jar

技术分享

然后,做demo

1. sql
CREATE TABLE persons (
id int NOT NULL AUTO_INCREMENT ,
name varchar (50) ,
PRIMARY KEY (id))AUTO_INCREMENT=1;

2. java project
(1) Create new Java Project
(2) Add new folder “lib”
(3) Copy all jars to “lib” folder
(4) Add jar file to java build path

3. Modify config.xml
In the "dataSource", the user name and password, into your own.

参考文章:

1. Spring + myBatis (XML)

 

Spring + myBatis (XML) + mySQL