序列化和反序列化helper using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml.Serialization; using System.IO; using System.Xml; // 此处代码来源于博客[在.net中读写config文件的各种方法]的示例代码 // http://www.cnblogs.com/fish-li/archive
①创建数据库和表,数据库为mytest,表为users CREATE DATABASE mytest; USE mytest; DROP TABLE IF EXISTS users; CREATE TABLE users( id INT PRIMARY KEY auto_increment NOT NULL, name ), age INT ) ②创建Java工程,导入相应的jar包 ③创建配置文件conf.xml和数据库配置文件db.properties <?xml version="1