diff --git a/code/IPersistence/pom.xml b/code/IPersistence/pom.xml
deleted file mode 100644
index aad96d7ea57f65bb51142cbb92c881ae7ba7154f..0000000000000000000000000000000000000000
--- a/code/IPersistence/pom.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
- 4.0.0
-
- com.lagou
- IPersistence
- 1.0-SNAPSHOT
-
-
- UTF-8
- UTF-8
- 1.8
- 1.8
- 1.8
-
-
-
-
-
- mysql
- mysql-connector-java
- 8.0.19
-
-
- c3p0
- c3p0
- 0.9.1.2
-
-
- log4j
- log4j
- 1.2.12
-
-
- junit
- junit
- 4.10
-
-
- dom4j
- dom4j
- 1.6.1
-
-
- jaxen
- jaxen
- 1.1.6
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/code/IPersistence/src/main/java/com/lagou/config/BoundSql.java b/code/IPersistence/src/main/java/com/lagou/config/BoundSql.java
deleted file mode 100644
index 1e428aabb00ba6d4f95ec5a3d0595f2b05bfe76b..0000000000000000000000000000000000000000
--- a/code/IPersistence/src/main/java/com/lagou/config/BoundSql.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package com.lagou.config;
-
-import com.lagou.utils.ParameterMapping;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class BoundSql {
-
- private String sqlText; //解析过后的sql
-
- private List parameterMappingList = new ArrayList<>();
-
- public BoundSql(String sqlText, List parameterMappingList) {
- this.sqlText = sqlText;
- this.parameterMappingList = parameterMappingList;
- }
-
- public String getSqlText() {
- return sqlText;
- }
-
- public void setSqlText(String sqlText) {
- this.sqlText = sqlText;
- }
-
- public List getParameterMappingList() {
- return parameterMappingList;
- }
-
- public void setParameterMappingList(List parameterMappingList) {
- this.parameterMappingList = parameterMappingList;
- }
-
- @Override
- public String toString() {
- return "BoundSql{" +
- "sqlText='" + sqlText + '\'' +
- ", parameterMappingList=" + parameterMappingList +
- '}';
- }
-}
diff --git a/code/IPersistence/src/main/java/com/lagou/config/XMLConfigBuilder.java b/code/IPersistence/src/main/java/com/lagou/config/XMLConfigBuilder.java
deleted file mode 100644
index ab9e2255b1363f82680741c2293445ab15ab528b..0000000000000000000000000000000000000000
--- a/code/IPersistence/src/main/java/com/lagou/config/XMLConfigBuilder.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.lagou.config;
-
-import com.lagou.io.Resources;
-import com.lagou.pojo.Configuration;
-import com.mchange.v2.c3p0.ComboPooledDataSource;
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.io.SAXReader;
-
-import java.beans.PropertyVetoException;
-import java.io.InputStream;
-import java.util.List;
-import java.util.Properties;
-
-public class XMLConfigBuilder {
-
- private Configuration configuration;
-
- public XMLConfigBuilder() {
- this.configuration = new Configuration();
- }
-
- /**
- * 该方法就是使用dom4j对配置文件进行解析,封装Configuration
- */
- public Configuration parseConfig(InputStream inputStream) throws DocumentException, PropertyVetoException {
-
- Document document = new SAXReader().read(inputStream);
- //
- Element rootElement = document.getRootElement();
- List list = rootElement.selectNodes("//property");
- Properties properties = new Properties();
- for (Element element : list) {
- String name = element.attributeValue("name");
- String value = element.attributeValue("value");
- properties.setProperty(name,value);
- }
-
- ComboPooledDataSource comboPooledDataSource = new ComboPooledDataSource();
- comboPooledDataSource.setDriverClass(properties.getProperty("driverClass"));
- comboPooledDataSource.setJdbcUrl(properties.getProperty("jdbcUrl"));
- comboPooledDataSource.setUser(properties.getProperty("username"));
- comboPooledDataSource.setPassword(properties.getProperty("password"));
-
- configuration.setDataSource(comboPooledDataSource);
-
- //mapper.xml解析: 拿到路径--字节输入流---dom4j进行解析
- List mapperList = rootElement.selectNodes("//mapper");
-
- for (Element element : mapperList) {
- String mapperPath = element.attributeValue("resource");
- InputStream resourceAsSteam = Resources.getResourceAsSteam(mapperPath);
- XMLMapperBuilder xmlMapperBuilder = new XMLMapperBuilder(configuration);
- xmlMapperBuilder.parse(resourceAsSteam);
-
- }
-
-
-
-
- return configuration;
- }
-
-
-}
diff --git a/code/IPersistence/src/main/java/com/lagou/config/XMLMapperBuilder.java b/code/IPersistence/src/main/java/com/lagou/config/XMLMapperBuilder.java
deleted file mode 100644
index d69d0cebbda2314ca99a5dfd27e2f099ae7ac7d5..0000000000000000000000000000000000000000
--- a/code/IPersistence/src/main/java/com/lagou/config/XMLMapperBuilder.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package com.lagou.config;
-
-import com.lagou.pojo.Configuration;
-import com.lagou.pojo.MappedStatement;
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.io.SAXReader;
-
-import java.io.InputStream;
-import java.util.List;
-
-public class XMLMapperBuilder {
-
- private Configuration configuration;
-
- public XMLMapperBuilder(Configuration configuration) {
- this.configuration =configuration;
- }
-
- public void parse(InputStream inputStream) throws DocumentException {
-
- Document document = new SAXReader().read(inputStream);
- Element rootElement = document.getRootElement();
-
- String namespace = rootElement.attributeValue("namespace");
-
- List list = rootElement.selectNodes("//select");
- addList(rootElement, list, "//insert");
- addList(rootElement, list, "//delete");
- addList(rootElement, list, "//update");
-
- for (Element element : list) {
- String id = element.attributeValue("id");
- String resultType = element.attributeValue("resultType");
- String paramterType = element.attributeValue("paramterType");
- String sqlText = element.getTextTrim();
- MappedStatement mappedStatement = new MappedStatement();
- mappedStatement.setId(id);
- mappedStatement.setResultType(resultType);
- mappedStatement.setParamterType(paramterType);
- mappedStatement.setSql(sqlText);
- String key = namespace+"."+id;
- configuration.getMappedStatementMap().put(key,mappedStatement);
-
- }
-
- }
-
- private void addList(Element rootElement, List list, String xpathExpression) {
- List insertList = rootElement.selectNodes(xpathExpression);
- if (insertList !=null && insertList.size() >0){
- list.addAll(insertList);
- }
- }
-
-
-}
diff --git a/code/IPersistence/src/main/java/com/lagou/io/Resources.java b/code/IPersistence/src/main/java/com/lagou/io/Resources.java
deleted file mode 100644
index 819cd296b62ca0c178f177b95fc34e03bc5a1365..0000000000000000000000000000000000000000
--- a/code/IPersistence/src/main/java/com/lagou/io/Resources.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.lagou.io;
-
-import java.io.InputStream;
-
-public class Resources {
-
- // 根据配置文件的路径,将配置文件加载成字节输入流,存储在内存中
- public static InputStream getResourceAsSteam(String path){
- InputStream resourceAsStream = Resources.class.getClassLoader().getResourceAsStream(path);
- return resourceAsStream;
-
- }
-
-
-
-}
diff --git a/code/IPersistence/src/main/java/com/lagou/pojo/Configuration.java b/code/IPersistence/src/main/java/com/lagou/pojo/Configuration.java
deleted file mode 100644
index 0543481bfae967f70e6d81149766939b50de92cd..0000000000000000000000000000000000000000
--- a/code/IPersistence/src/main/java/com/lagou/pojo/Configuration.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.lagou.pojo;
-
-import javax.sql.DataSource;
-import java.util.HashMap;
-import java.util.Map;
-
-public class Configuration {
-
- private DataSource dataSource;
-
- /*
- * key: statementid value:封装好的mappedStatement对象
- * */
- Map mappedStatementMap = new HashMap<>();
-
- public DataSource getDataSource() {
- return dataSource;
- }
-
- public void setDataSource(DataSource dataSource) {
- this.dataSource = dataSource;
- }
-
- public Map getMappedStatementMap() {
- return mappedStatementMap;
- }
-
- public void setMappedStatementMap(Map mappedStatementMap) {
- this.mappedStatementMap = mappedStatementMap;
- }
-}
diff --git a/code/IPersistence/src/main/java/com/lagou/pojo/MappedStatement.java b/code/IPersistence/src/main/java/com/lagou/pojo/MappedStatement.java
deleted file mode 100644
index 3c62aa9c7c2bb3d8d0f6cfd3a5e71aac72bd7d4e..0000000000000000000000000000000000000000
--- a/code/IPersistence/src/main/java/com/lagou/pojo/MappedStatement.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.lagou.pojo;
-
-public class MappedStatement {
-
- //id标识
- private String id;
- //返回值类型
- private String resultType;
- //参数值类型
- private String paramterType;
- //sql语句
- private String sql;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getResultType() {
- return resultType;
- }
-
- public void setResultType(String resultType) {
- this.resultType = resultType;
- }
-
- public String getParamterType() {
- return paramterType;
- }
-
- public void setParamterType(String paramterType) {
- this.paramterType = paramterType;
- }
-
- public String getSql() {
- return sql;
- }
-
- public void setSql(String sql) {
- this.sql = sql;
- }
-}
diff --git a/code/IPersistence/src/main/java/com/lagou/sqlSession/DefaultSqlSession.java b/code/IPersistence/src/main/java/com/lagou/sqlSession/DefaultSqlSession.java
deleted file mode 100644
index 5e93082f01c63401c85f9fd646dedc06ef9b8021..0000000000000000000000000000000000000000
--- a/code/IPersistence/src/main/java/com/lagou/sqlSession/DefaultSqlSession.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package com.lagou.sqlSession;
-
-import com.lagou.pojo.Configuration;
-import com.lagou.pojo.MappedStatement;
-
-import java.lang.reflect.*;
-import java.util.List;
-import java.util.Locale;
-
-public class DefaultSqlSession implements SqlSession {
-
- private Configuration configuration;
-
- public DefaultSqlSession(Configuration configuration) {
- this.configuration = configuration;
- }
-
- @Override
- public int update(String statementid, Object... params) throws Exception {
- simpleExecutor simpleExecutor = new simpleExecutor();
- MappedStatement mappedStatement = configuration.getMappedStatementMap().get(statementid);
- return simpleExecutor.update(configuration, mappedStatement, params);
- }
-
- @Override
- public List selectList(String statementid, Object... params) throws Exception {
-
- //将要去完成对simpleExecutor里的query方法的调用
- simpleExecutor simpleExecutor = new simpleExecutor();
- MappedStatement mappedStatement = configuration.getMappedStatementMap().get(statementid);
- List