Skip to content

Commit ac86eb7

Browse files
Refactoring and Added readme file for each module.
1 parent f16ff39 commit ac86eb7

File tree

57 files changed

+732
-573
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+732
-573
lines changed
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
This module demonstrate the basic usage of MyBatis persistence framework.
1+
Chapter 1: Getting started with MyBatis
2+
=======================================
3+
This chapter is an introduction to MyBatis, its features and configuring MyBatis.
4+
Topics covered:
5+
. What is MyBatis?
6+
. Why MyBatis?
7+
. Installing and Configuring MyBatis
8+
. Sample Domain Model

mybatisdemo-parent/chapter01/src/main/java/chapter01/JdbcStudentService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import java.sql.ResultSet;
77
import java.sql.SQLException;
88

9+
import chapter01.domain.Student;
10+
911
/**
1012
* @author Siva
1113
*

mybatisdemo-parent/chapter01/src/main/java/chapter01/StudentMapper.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import java.util.List;
44

5+
import chapter01.domain.Student;
6+
57
/**
68
* @author Siva
79
*

mybatisdemo-parent/chapter01/src/main/java/chapter01/StudentService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import org.slf4j.Logger;
77
import org.slf4j.LoggerFactory;
88

9+
import chapter01.domain.Student;
10+
911
public class StudentService
1012
{
1113
private Logger logger = LoggerFactory.getLogger(getClass());

mybatisdemo-parent/chapter01/src/main/java/chapter01/Student.java renamed to mybatisdemo-parent/chapter01/src/main/java/chapter01/domain/Student.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package chapter01;
1+
package chapter01.domain;
22

33
import java.util.Date;
44

mybatisdemo-parent/chapter01/src/main/resources/mybatis-config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<properties resource="application.properties"/>
88

99
<typeAliases>
10-
<package name="chapter01"/>
10+
<package name="chapter01.domain"/>
1111
</typeAliases>
1212

1313
<environments default="development">

mybatisdemo-parent/chapter01/src/test/java/chapter01/StudentServiceTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
import org.junit.Ignore;
1010
import org.junit.Test;
1111

12-
import chapter01.Student;
13-
import chapter01.StudentService;
12+
import chapter01.domain.Student;
1413

1514

1615
public class StudentServiceTest
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Chapter 2: Bootstrapping MyBatis
2+
================================
3+
This chapter describes the approaches to configure and bootstrap MyBatis.
4+
Topics covered:
5+
. Configuration using XML
6+
. Configuration using Java API.

mybatisdemo-parent/chapter02/src/main/java/chapter02/StudentMapper.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import java.util.List;
44

5+
import chapter02.domain.Student;
6+
57
/**
68
* @author Siva
79
*

mybatisdemo-parent/chapter02/src/main/java/chapter02/StudentService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import org.slf4j.Logger;
77
import org.slf4j.LoggerFactory;
88

9+
import chapter02.domain.Student;
10+
911
public class StudentService
1012
{
1113
private Logger logger = LoggerFactory.getLogger(getClass());

0 commit comments

Comments
 (0)