diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 5ff6309..0000000 --- a/.gitignore +++ /dev/null @@ -1,38 +0,0 @@ -target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/**/target/ -!**/src/test/**/target/ - -### IntelliJ IDEA ### -.idea/modules.xml -.idea/jarRepositories.xml -.idea/compiler.xml -.idea/libraries/ -*.iws -*.iml -*.ipr - -### Eclipse ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans -.sts4-cache - -### NetBeans ### -/nbproject/private/ -/nbbuild/ -/dist/ -/nbdist/ -/.nb-gradle/ -build/ -!**/src/main/**/build/ -!**/src/test/**/build/ - -### VS Code ### -.vscode/ - -### Mac OS ### -.DS_Store \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 35410ca..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# 默认忽略的文件 -/shelf/ -/workspace.xml -# 基于编辑器的 HTTP 客户端请求 -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml deleted file mode 100644 index 7bd13a3..0000000 --- a/.idea/dataSources.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - oracle.19 - true - false - oracle.jdbc.OracleDriver - jdbc:oracle:thin:@localhost:1521:orcl - - - - - - $ProjectFileDir$ - - - \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml deleted file mode 100644 index aa00ffa..0000000 --- a/.idea/encodings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index e5b61dc..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml deleted file mode 100644 index 691b6ca..0000000 --- a/.idea/sqldialects.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml deleted file mode 100644 index 2b63946..0000000 --- a/.idea/uiDesigner.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 698791c..0000000 --- a/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - 4.0.0 - - org.example - example01 - 1.0-SNAPSHOT - - - 18 - 18 - UTF-8 - - - - - org.mybatis - mybatis - 3.5.2 - - - - com.oracle - ojdbc6 - 11.2.0.1.0 - - - - log4j - log4j - 1.2.17 - - - - - junit - junit - 4.12 - test - - - - - \ No newline at end of file diff --git a/src/main/java/com/keafmd/dao/IUserDao.java b/src/main/java/com/keafmd/dao/IUserDao.java deleted file mode 100644 index bbc7482..0000000 --- a/src/main/java/com/keafmd/dao/IUserDao.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.keafmd.dao; - -import com.keafmd.domain.User; -import java.util.List; - -public interface IUserDao { - List findAll(); -} diff --git a/src/main/java/com/keafmd/domain/User.java b/src/main/java/com/keafmd/domain/User.java deleted file mode 100644 index 33f8b97..0000000 --- a/src/main/java/com/keafmd/domain/User.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.keafmd.domain; - -import java.util.Date; - -public class User { - private Integer id; - private String name; - private String dept_name; - private Float salary; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getUsername() { - return name; - } - - public void setUsername(String name) { - this.name = name; - } - - public String getDept_name() { - return dept_name; - } - - public void setDept_name(String dept_name) { - this.dept_name = dept_name; - } - - public Float getSalary() { - return salary; - } - - public void setSalary(Float salary) { - this.salary = salary; - } - - @Override - public String toString() { - return "User{" + - "id=" + id + - ", name='" + name + '\'' + - ", dept_name='" + dept_name + '\'' + - ", salary='" + salary + '\'' + - '}'; - } -} diff --git a/src/main/resources/SqlMapConfig.xml b/src/main/resources/SqlMapConfig.xml deleted file mode 100644 index 3e72ce6..0000000 --- a/src/main/resources/SqlMapConfig.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/com/keafmd/dao/IUserDao.xml b/src/main/resources/com/keafmd/dao/IUserDao.xml deleted file mode 100644 index 53341c5..0000000 --- a/src/main/resources/com/keafmd/dao/IUserDao.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties deleted file mode 100644 index 138c037..0000000 --- a/src/main/resources/log4j.properties +++ /dev/null @@ -1,19 +0,0 @@ -# Set root category priority to INFO and its only appender to CONSOLE. -#log4j.rootCategory=INFO, CONSOLE debug info warn error fatal -log4j.rootCategory=debug, CONSOLE, LOGFILE - -# Set the enterprise logger category to FATAL and its only appender to CONSOLE. -log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE - -# CONSOLE is set to be a ConsoleAppender using a PatternLayout. -log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender -log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} %-6r [%15.15t] %-5p %30.30c %x - %m\n - -# LOGFILE is set to be a File appender using a PatternLayout. -log4j.appender.LOGFILE=org.apache.log4j.FileAppender -log4j.appender.LOGFILE.File=d:\axis.log -log4j.appender.LOGFILE.Append=true -log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout -log4j.appender.LOGFILE.layout.ConversionPattern=%d{ISO8601} %-6r [%15.15t] %-5p %30.30c %x - %m\n - diff --git a/src/test/java/com/keafmd/test/MybatisTest.java b/src/test/java/com/keafmd/test/MybatisTest.java deleted file mode 100644 index 8deb44f..0000000 --- a/src/test/java/com/keafmd/test/MybatisTest.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.keafmd.test; - -import com.keafmd.dao.IUserDao; -import com.keafmd.domain.User; -import org.apache.ibatis.io.Resources; -import org.apache.ibatis.session.SqlSession; -import org.apache.ibatis.session.SqlSessionFactory; -import org.apache.ibatis.session.SqlSessionFactoryBuilder; - -import java.io.InputStream; -import java.util.Collections; -import java.util.List; - -public class MybatisTest { - - public static void main(String[] args) throws Exception{ - //1.读取配置文件 - InputStream in = Resources.getResourceAsStream("SqlMapConfig.xml"); - //2.创建SqlSessionFactory工厂 - SqlSessionFactoryBuilder builder = new SqlSessionFactoryBuilder(); - SqlSessionFactory factory = builder.build(in); - //3.使用工厂生产SqlSession对象 - SqlSession session = factory.openSession(); - //4.使用SqlSession创建Dao接口的代理对象 - IUserDao userDao = session.getMapper(IUserDao.class); - //5.使用代理对象执行方法 - List users = Collections.unmodifiableList(userDao.findAll()); - for (User user : users) { - System.out.println(user); - } - //6.释放资源 - session.close(); - in.close(); - } -}