public void createMybatisConfig() {
		StringBuilder strSB = new StringBuilder();
		strSB.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"
						+ "<!DOCTYPE configuration PUBLIC \"-//mybatis.org//DTD Config 3.0//EN\"\n"
						+ "\"http://mybatis.org/dtd/mybatis-3-config.dtd\">\n");
		strSB.append("<configuration>\n");
		strSB.append("\t<typeAliases>\n");
		Collection<String> col = OrderConstance.tableNamesMap.values();
		StringBuilder res = new StringBuilder();
		for (String str : col) {
			if (str == null) {
				continue;
			}
			strSB.append("\t\t<typeAlias type=\"com.logserver.model."
					+ StringUtils.firstToUpper(str) + "Log\" alias=\"" + str
					+ "\"/>\n");
			res.append("\t<mapper resource=\"com/logserver/model/"+ StringUtils.firstToUpper(str) +"Log.xml\"/>\n");
		}
		//获取连接数据库的信息
		InputStream in = null;
		String mysql_url = null;
		String mysql_root = null;
		String mysql_password = null;
		try {
			in = new BufferedInputStream(new FileInputStream("config/server_config.properties"));
			Properties pro = new Properties();
			pro.load(in);
			mysql_url = pro.getProperty("mysql_url");
			mysql_root = pro.getProperty("mysql_root");
			mysql_password = pro.getProperty("mysql_password");
		} catch (FileNotFoundException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		res.append("\t<mapper resource=\"com/logserver/model/BaseEntity.xml\"/>\n");
		strSB.append("\t</typeAliases> \n");
		strSB.append("\t<environments default=\"development\">\n"
						+ "\t\t<environment id=\"development\">\n"
						+ "\t\t<transactionManager type=\"JDBC\"/>\n"
						+ "\t\t<dataSource type=\"POOLED\">\n"
						+ "\t\t\t<property name=\"driver\" value=\"com.mysql.jdbc.Driver\" />\n"
						+ "\t\t\t<property name=\"url\" value=\"" + mysql_url + "?useUnicode=true&amp;characterEncoding=utf-8\" />\n"
						+ "\t\t\t<property name=\"username\" value=\"" + mysql_root + "\" />\n"
						+ "\t\t\t<property name=\"password\" value=\""+ mysql_password+"\" />\n"
						+ "\t\t\t<property name='poolMaximumActiveConnections' value='20'/>\n"
						+ "\t\t\t<property name='poolMaximumCheckoutTime' value='20000'/>\n"
						+ "\t\t</dataSource>\n" + "\t\t</environment>\n"
						+ "</environments> \n");
		strSB.append("<mappers>\n");
		strSB.append(res.toString());
		strSB.append("</mappers>\n");
		strSB.append("</configuration>");
		
		// 生成文件
		File file = new File("config/"
				+ "mybatis_config.xml");
		FileOutputStream out;
		try {
			out = new FileOutputStream(file);
			out.write(strSB.toString().getBytes("utf8"));
			out.flush();
			out.close();
			System.out.println("====生成配置文件"
					+ "mybatis_config.xml 成功===");

		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}