一区二区三区在线-一区二区三区亚洲视频-一区二区三区亚洲-一区二区三区午夜-一区二区三区四区在线视频-一区二区三区四区在线免费观看

服務(wù)器之家:專注于服務(wù)器技術(shù)及軟件下載分享
分類導(dǎo)航

PHP教程|ASP.NET教程|JAVA教程|ASP教程|

服務(wù)器之家 - 編程語言 - JAVA教程 - Java+Spring+MySql環(huán)境中安裝和配置MyBatis的教程

Java+Spring+MySql環(huán)境中安裝和配置MyBatis的教程

2020-04-16 13:57limingnihao JAVA教程

這篇文章主要介紹了Java+Spring+MySql環(huán)境中安裝和配置MyBatis的教程,MyBatis一般被用來增強(qiáng)數(shù)據(jù)庫操作,文中對MyBatis的主配置文件有較為詳細(xì)的講解,需要的朋友可以參考下

1.MyBatis簡介與配置MyBatis+Spring+MySql

1.1MyBatis簡介
      MyBatis 是一個可以自定義SQL、存儲過程和高級映射的持久層框架。MyBatis 摒除了大部分的JDBC代碼、手工設(shè)置參數(shù)和結(jié)果集重獲。MyBatis 只使用簡單的XML 和注解來配置和映射基本數(shù)據(jù)類型、Map 接口和POJO 到數(shù)據(jù)庫記錄。相對Hibernate和Apache OJB等“一站式”ORM解決方案而言,Mybatis 是一種“半自動化”的ORM實現(xiàn)。
需要使用的Jar包:mybatis-3.0.2.jar(mybatis核心包)。mybatis-spring-1.0.0.jar(與Spring結(jié)合包)。
下載地址:
http://ibatis.apache.org/tools/ibator
http://code.google.com/p/mybatis/
 
1.2MyBatis+Spring+MySql簡單配置
1.2.1搭建Spring環(huán)境

(1)建立maven的web項目;
(2)加入Spring框架、配置文件;
(3)在pom.xml中加入所需要的jar包(spring框架的、mybatis、mybatis-spring、junit等);
(4)更改web.xml和spring的配置文件;
(5)添加一個jsp頁面和對應(yīng)的Controller;
(6)測試。
可參照:http://limingnihao.iteye.com/blog/830409。使用Eclipse的Maven構(gòu)建SpringMVC項目

1.2.2建立MySql數(shù)據(jù)庫
建立一個學(xué)生選課管理數(shù)據(jù)庫。
表:學(xué)生表、班級表、教師表、課程表、學(xué)生選課表。
邏輯關(guān)系:每個學(xué)生有一個班級;每個班級對應(yīng)一個班主任教師;每個教師只能當(dāng)一個班的班主任;
使用下面的sql進(jìn)行建數(shù)據(jù)庫,先建立學(xué)生表,插入數(shù)據(jù)(2條以上)。
更多sql請下載項目源文件,在resource/sql中。

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* 建立數(shù)據(jù)庫 */
CREATE DATABASE STUDENT_MANAGER;
USE STUDENT_MANAGER;
 
/***** 建立student表 *****/
CREATE TABLE STUDENT_TBL
(
  STUDENT_ID     VARCHAR(255) PRIMARY KEY,
  STUDENT_NAME    VARCHAR(10) NOT NULL,
  STUDENT_SEX    VARCHAR(10),
  STUDENT_BIRTHDAY  DATE,
  CLASS_ID      VARCHAR(255)
);
 
/*插入學(xué)生數(shù)據(jù)*/
INSERT INTO STUDENT_TBL (STUDENT_ID,
             STUDENT_NAME,
             STUDENT_SEX,
             STUDENT_BIRTHDAY,
             CLASS_ID)
 VALUES  (123456,
      '某某某',
      '女',
      '1980-08-01',
      121546
      )

 

創(chuàng)建連接MySql使用的配置文件mysql.properties。

?
1
2
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/student_manager?user=root&password=limingnihao&useUnicode=true&characterEncoding=UTF-8

 
 1.2.3搭建MyBatis環(huán)境
順序隨便,現(xiàn)在的順序是因為可以盡量的少的修改寫好的文件。

1.2.3.1創(chuàng)建實體類: StudentEntity

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
public class StudentEntity implements Serializable {
 
  private static final long serialVersionUID = 3096154202413606831L;
  private ClassEntity classEntity;
  private Date studentBirthday;
  private String studentID;
  private String studentName;
  private String studentSex;
   
  public ClassEntity getClassEntity() {
    return classEntity;
  }
 
  public Date getStudentBirthday() {
    return studentBirthday;
  }
 
  public String getStudentID() {
    return studentID;
  }
 
  public String getStudentName() {
    return studentName;
  }
 
  public String getStudentSex() {
    return studentSex;
  }
 
  public void setClassEntity(ClassEntity classEntity) {
    this.classEntity = classEntity;
  }
 
  public void setStudentBirthday(Date studentBirthday) {
    this.studentBirthday = studentBirthday;
  }
 
  public void setStudentID(String studentID) {
    this.studentID = studentID;
  }
 
  public void setStudentName(String studentName) {
    this.studentName = studentName;
  }
 
  public void setStudentSex(String studentSex) {
    this.studentSex = studentSex;
  }
}

1.2.3.2創(chuàng)建數(shù)據(jù)訪問接口
Student類對應(yīng)的dao接口:StudentMapper。

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
public interface StudentMapper {
   
  public StudentEntity getStudent(String studentID);
   
  public StudentEntity getStudentAndClass(String studentID);
   
  public List<StudentEntity> getStudentAll();
   
  public void insertStudent(StudentEntity entity);
   
  public void deleteStudent(StudentEntity entity);
   
  public void updateStudent(StudentEntity entity);
}

1.2.3.3創(chuàng)建SQL映射語句文件

Student類的sql語句文件StudentMapper.xml
resultMap標(biāo)簽:表字段與屬性的映射。
Select標(biāo)簽:查詢sql。

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.manager.data.StudentMapper">
 
  <resultMap type="StudentEntity" id="studentResultMap">
    <id property="studentID" column="STUDENT_ID"/>
    <result property="studentName" column="STUDENT_NAME"/>
    <result property="studentSex" column="STUDENT_SEX"/>
    <result property="studentBirthday" column="STUDENT_BIRTHDAY"/>
  </resultMap>
   
  <!-- 查詢學(xué)生,根據(jù)id -->
  <select id="getStudent" parameterType="String" resultType="StudentEntity" resultMap="studentResultMap">
    <![CDATA[
      SELECT * from STUDENT_TBL ST
        WHERE ST.STUDENT_ID = #{studentID}
    ]]>
  </select>
   
  <!-- 查詢學(xué)生列表 -->
  <select id="getStudentAll" resultType="com.manager.data.model.StudentEntity" resultMap="studentResultMap">
    <![CDATA[
      SELECT * from STUDENT_TBL
    ]]>
  </select>
   
</mapper>

1.2.3.4創(chuàng)建MyBatis的mapper配置文件
在src/main/resource中創(chuàng)建MyBatis配置文件:mybatis-config.xml。
typeAliases標(biāo)簽:給類起一個別名。com.manager.data.model.StudentEntity類,可以使用StudentEntity代替。
Mappers標(biāo)簽:加載MyBatis中實體類的SQL映射語句文件。

?
1
2
3
4
5
6
7
8
9
10
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
  <typeAliases>
    <typeAlias alias="StudentEntity" type="com.manager.data.model.StudentEntity"/>
  </typeAliases>
  <mappers>
    <mapper resource="com/manager/data/maps/StudentMapper.xml" />
  </mappers>
</configuration

1.2.3.5修改Spring 的配置文件
主要是添加SqlSession的制作工廠類的bean:SqlSessionFactoryBean,(在mybatis.spring包中)。需要指定配置文件位置和dataSource。
和數(shù)據(jù)訪問接口對應(yīng)的實現(xiàn)bean。通過MapperFactoryBean創(chuàng)建出來。需要執(zhí)行接口類全稱和SqlSession工廠bean的引用。

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!-- 導(dǎo)入屬性配置文件 -->
<context:property-placeholder location="classpath:mysql.properties" />
 
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
  <property name="driverClassName" value="${jdbc.driverClassName}" />
  <property name="url" value="${jdbc.url}" />
</bean>
 
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
  <property name="dataSource" ref="dataSource" />
</bean>
 
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
  <property name="configLocation" value="classpath:mybatis-config.xml" />
  <property name="dataSource" ref="dataSource" />
</bean>
 
<!— mapper bean -->
<bean id="studentMapper" class="org.mybatis.spring.MapperFactoryBean">
  <property name="mapperInterface" value="com.manager.data.StudentMapper" />
  <property name="sqlSessionFactory" ref="sqlSessionFactory" />
</bean>

也可以不定義mapper的bean,使用注解:
將StudentMapper加入注解

?
1
2
3
4
@Repository
@Transactional
public interface StudentMapper {
}

對應(yīng)的需要在dispatcher-servlet.xml中加入掃描:

?
1
2
3
4
5
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
  <property name="annotationClass" value="org.springframework.stereotype.Repository"/>
  <property name="basePackage" value="com.liming.manager"/>
  <property name="sqlSessionFactory" ref="sqlSessionFactory"/>
</bean>

1.2.4測試StudentMapper
使用SpringMVC測試,創(chuàng)建一個TestController,配置tomcat,訪問index.do頁面進(jìn)行測試:

?
1
2
3
4
5
6
7
8
9
10
11
12
@Controller
public class TestController {
 
  @Autowired
  private StudentMapper studentMapper;
   
  @RequestMapping(value = "index.do")
  public void indexPage() {  
    StudentEntity entity = studentMapper.getStudent("10000013");
    System.out.println("name:" + entity.getStudentName());
  }  
}

使用Junit測試:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
@RunWith(value = SpringJUnit4ClassRunner.class)
@ContextConfiguration(value = "test-servlet.xml")
public class StudentMapperTest {
   
  @Autowired
  private ClassMapper classMapper;
   
  @Autowired
  private StudentMapper studentMapper;
   
  @Transactional
  public void getStudentTest(){
    StudentEntity entity = studentMapper.getStudent("10000013");
    System.out.println("" + entity.getStudentID() + entity.getStudentName());
     
    List<StudentEntity> studentList = studentMapper.getStudentAll();
    for( StudentEntity entityTemp : studentList){
      System.out.println(entityTemp.getStudentName());
    }
     
  }
}

2.MyBatis的主配置文件
在定義sqlSessionFactory時需要指定MyBatis主配置文件:

?
1
2
3
4
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
  <property name="configLocation" value="classpath:mybatis-config.xml" />
  <property name="dataSource" ref="dataSource" />
</bean>

MyBatis配置文件中大標(biāo)簽configuration下子標(biāo)簽包括:

?
1
2
3
4
5
6
7
8
9
10
11
12
configuration
|--- properties
|--- settings
|--- typeAliases
|--- typeHandlers
|--- objectFactory
|--- plugins
|--- environments
|--- |--- environment
|--- |--- |--- transactionManager
|--- |--- |__ dataSource
|__ mappers

2.1 properties屬性

    properties和java的.properties的配置文件有關(guān)。配置properties的resource指定.properties的路徑,然后再在properties標(biāo)簽下配置property的name和value,則可以替換.properties文件中相應(yīng)屬性值。

?
1
2
3
4
5
6
7
  <!-- 屬性替換 -->
<properties resource="mysql.properties">
  <property name="jdbc.driverClassName" value="com.mysql.jdbc.Driver"/>
  <property name="jdbc.url" value="jdbc:mysql://localhost:3306/student_manager"/>
  <property name="username" value="root"/>
  <property name="password" value="limingnihao"/>
</properties>

 
2.2 settings設(shè)置
這是MyBatis 修改操作運(yùn)行過程細(xì)節(jié)的重要的步驟。下方這個表格描述了這些設(shè)置項、含義和默認(rèn)值。

設(shè)置項

描述

允許值

默認(rèn)值

cacheEnabled

對在此配置文件下的所有cache 進(jìn)行全局性開/關(guān)設(shè)置。

true | false

true

lazyLoadingEnabled

全局性設(shè)置懶加載。如果設(shè)為‘false',則所有相關(guān)聯(lián)的都會被初始化加載。

true | false

true

aggressiveLazyLoading

當(dāng)設(shè)置為‘true'的時候,懶加載的對象可能被任何懶屬性全部加載。否則,每個屬性都按需加載。

true | false

true

multipleResultSetsEnabled

允許和不允許單條語句返回多個數(shù)據(jù)集(取決于驅(qū)動需求)

true | false

true

useColumnLabel

使用列標(biāo)簽代替列名稱。不同的驅(qū)動器有不同的作法。參考一下驅(qū)動器文檔,或者用這兩個不同的選項進(jìn)行測試一下。

true | false

true

useGeneratedKeys

允許JDBC 生成主鍵。需要驅(qū)動器支持。如果設(shè)為了true,這個設(shè)置將強(qiáng)制使用被生成的主鍵,有一些驅(qū)動器不兼容不過仍然可以執(zhí)行。

true | false

false

autoMappingBehavior

指定MyBatis 是否并且如何來自動映射數(shù)據(jù)表字段與對象的屬性。PARTIAL將只自動映射簡單的,沒有嵌套的結(jié)果。FULL 將自動映射所有復(fù)雜的結(jié)果。

NONE,

PARTIAL,

FULL

PARTIAL

defaultExecutorType

配置和設(shè)定執(zhí)行器,SIMPLE 執(zhí)行器執(zhí)行其它語句。REUSE 執(zhí)行器可能重復(fù)使用prepared statements 語句,BATCH執(zhí)行器可以重復(fù)執(zhí)行語句和批量更新。

SIMPLE

REUSE

BATCH

SIMPLE

defaultStatementTimeout

設(shè)置一個時限,以決定讓驅(qū)動器等待數(shù)據(jù)庫回應(yīng)的多長時間為超時

正整數(shù)

Not Set

(null)


例如:

 

?
1
2
3
4
5
6
7
8
9
<settings>
  <setting name="cacheEnabled" value="true" />
  <setting name="lazyLoadingEnabled" value="true" />
  <setting name="multipleResultSetsEnabled" value="true" />
  <setting name="useColumnLabel" value="true" />
  <setting name="useGeneratedKeys" value="false" />
  <setting name="enhancementEnabled" value="false" />
  <setting name="defaultExecutorType" value="SIMPLE" />
</settings>

2.3 typeAliases類型別名
類型別名是Java 類型的簡稱。
它僅僅只是關(guān)聯(lián)到XML 配置,簡寫冗長的JAVA 類名。例如:

?
1
2
3
4
5
<typeAliases>
  <typeAlias alias="UserEntity" type="com.manager.data.model.UserEntity" />
  <typeAlias alias="StudentEntity" type="com.manager.data.model.StudentEntity" />
  <typeAlias alias="ClassEntity" type="com.manager.data.model.ClassEntity" />
</typeAliases>

使用這個配置,“StudentEntity”就能在任何地方代替“com.manager.data.model.StudentEntity”被使用。
對于普通的Java類型,有許多內(nèi)建的類型別名。它們都是大小寫不敏感的,由于重載的名字,要注意原生類型的特殊處理。

別名

映射的類型

_byte

byte

_long

long

_short

short

_int

int

_integer

int

_double

double

_float

float

_boolean

boolean

string

String

byte

Byte

long

Long

short

Short

int

Integer

integer

Integer

double

Double

float

Float

boolean

Boolean

date

Date

decimal

BigDecimal

bigdecimal

BigDecimal

object

Object

map

Map

hashmap

HashMap

list

List

arraylist

ArrayList

collection

Collection

iterator

Iterator

 

2.4 typeHandlers類型句柄
無論是MyBatis在預(yù)處理語句中設(shè)置一個參數(shù),還是從結(jié)果集中取出一個值時,類型處理器被用來將獲取的值以合適的方式轉(zhuǎn)換成Java類型。下面這個表格描述了默認(rèn)的類型處理器。

類型處理器

Java類型

JDBC類型

BooleanTypeHandler

Booleanboolean

任何兼容的布爾值

ByteTypeHandler

Bytebyte

任何兼容的數(shù)字或字節(jié)類型

ShortTypeHandler

Shortshort

任何兼容的數(shù)字或短整型

IntegerTypeHandler

Integerint

任何兼容的數(shù)字和整型

LongTypeHandler

Longlong

任何兼容的數(shù)字或長整型

FloatTypeHandler

Floatfloat

任何兼容的數(shù)字或單精度浮點型

DoubleTypeHandler

Doubledouble

任何兼容的數(shù)字或雙精度浮點型

BigDecimalTypeHandler

BigDecimal

任何兼容的數(shù)字或十進(jìn)制小數(shù)類型

StringTypeHandler

String

CHARVARCHAR類型

ClobTypeHandler

String

CLOBLONGVARCHAR類型

NStringTypeHandler

String

NVARCHARNCHAR類型

NClobTypeHandler

String

NCLOB類型

ByteArrayTypeHandler

byte[]

任何兼容的字節(jié)流類型

BlobTypeHandler

byte[]

BLOBLONGVARBINARY類型

DateTypeHandler

Datejava.util

TIMESTAMP類型

DateOnlyTypeHandler

Datejava.util

DATE類型

TimeOnlyTypeHandler

Datejava.util

TIME類型

SqlTimestampTypeHandler

Timestampjava.sql

TIMESTAMP類型

SqlDateTypeHandler

Datejava.sql

DATE類型

SqlTimeTypeHandler

Timejava.sql

TIME類型

ObjectTypeHandler

Any

其他或未指定類型

EnumTypeHandler

Enumeration類型

VARCHAR-任何兼容的字符串類型,作為代碼存儲(而不是索引)。


 
你可以重寫類型處理器或創(chuàng)建你自己的類型處理器來處理不支持的或非標(biāo)準(zhǔn)的類型。要這樣做的話,簡單實現(xiàn)TypeHandler接口(org.mybatis.type),然后映射新的類型處理器類到Java類型,還有可選的一個JDBC類型。然后再typeHandlers中添加這個類型處理器。
新定義的類型處理器將會覆蓋已經(jīng)存在的處理Java的String類型屬性和VARCHAR參數(shù)及結(jié)果的類型處理器。要注意MyBatis不會審視數(shù)據(jù)庫元信息來決定使用哪種類型,所以你必須在參數(shù)和結(jié)果映射中指定那是VARCHAR類型的字段,來綁定到正確的類型處理器上。這是因為MyBatis直到語句被執(zhí)行都不知道數(shù)據(jù)類型的這個現(xiàn)實導(dǎo)致的。

 

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
public class LimingStringTypeHandler implements TypeHandler {
 
  @Override
  public void setParameter(PreparedStatement ps, int i, Object parameter, JdbcType jdbcType) throws SQLException {
    System.out.println("setParameter - parameter: " + ((String) parameter) + ", jdbcType: " + jdbcType.TYPE_CODE);
    ps.setString(i, ((String) parameter));
  }
 
  @Override
  public Object getResult(ResultSet rs, String columnName) throws SQLException {
    System.out.println("getResult - columnName: " + columnName);
    return rs.getString(columnName);
  }
 
  @Override
  public Object getResult(CallableStatement cs, int columnIndex) throws SQLException {
    System.out.println("getResult - columnIndex: " + columnIndex);
    return cs.getString(columnIndex);
  }
}

在配置文件的typeHandlers中添加typeHandler標(biāo)簽。

?
1
2
3
<typeHandlers>
  <typeHandler javaType="String" jdbcType="VARCHAR" handler="liming.student.manager.type.LimingStringTypeHandler"/>
</typeHandlers>

2.5 ObjectFactory對象工廠
 
每次MyBatis 為結(jié)果對象創(chuàng)建一個新實例,都會用到ObjectFactory。默認(rèn)的ObjectFactory 與使用目標(biāo)類的構(gòu)造函數(shù)創(chuàng)建一個實例毫無區(qū)別,如果有已經(jīng)映射的參數(shù),那也可能使用帶參數(shù)的構(gòu)造函數(shù)。
如果你重寫ObjectFactory 的默認(rèn)操作,你可以通過繼承org.apache.ibatis.reflection.factory.DefaultObjectFactory創(chuàng)建一下你自己的。
ObjectFactory接口很簡單。它包含兩個創(chuàng)建用的方法,一個是處理默認(rèn)構(gòu)造方法的,另外一個是處理帶參數(shù)構(gòu)造方法的。最終,setProperties方法可以被用來配置ObjectFactory。在初始化你的ObjectFactory實例后,objectFactory元素體中定義的屬性會被傳遞給setProperties方法。

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
public class LimingObjectFactory extends DefaultObjectFactory {
 
  private static final long serialVersionUID = -399284318168302833L;
 
  @Override
  public Object create(Class type) {
    return super.create(type);
  }
 
  @Override
  public Object create(Class type, List<Class> constructorArgTypes, List<Object> constructorArgs) {
    System.out.println("create - type: " + type.toString());
    return super.create(type, constructorArgTypes, constructorArgs);
  }
 
  @Override
  public void setProperties(Properties properties) {
    System.out.println("setProperties - properties: " + properties.toString() + ", someProperty: " + properties.getProperty("someProperty"));
    super.setProperties(properties);
  }
 
}

配置文件中添加objectFactory標(biāo)簽

?
1
2
3
<objectFactory type="liming.student.manager.configuration.LimingObjectFactory">
  <property name="someProperty" value="100"/>
</objectFactory>

2.6 plugins插件

MyBatis允許你在某一點攔截已映射語句執(zhí)行的調(diào)用。默認(rèn)情況下,MyBatis允許使用插件來攔截方法調(diào)用:

  • Executor(update, query, flushStatements, commit, rollback, getTransaction, close, isClosed)
  • ParameterHandler(getParameterObject, setParameters)
  • ResultSetHandler(handleResultSets, handleOutputParameters)
  • StatementHandler(prepare, parameterize, batch, update, query)

這些類中方法的詳情可以通過查看每個方法的簽名來發(fā)現(xiàn),而且它們的源代碼在MyBatis的發(fā)行包中有。你應(yīng)該理解你覆蓋方法的行為,假設(shè)你所做的要比監(jiān)視調(diào)用要多。如果你嘗試修改或覆蓋一個給定的方法,你可能會打破MyBatis的核心。這是低層次的類和方法,要謹(jǐn)慎使用插件。
使用插件是它們提供的非常簡單的力量。簡單實現(xiàn)攔截器接口,要確定你想攔截的指定簽名。

2.7 environments環(huán)境
MyBatis 可以配置多個環(huán)境。這可以幫助你SQL 映射對應(yīng)多種數(shù)據(jù)庫等。

2.8 mappers映射器
這里是告訴MyBatis 去哪尋找映射SQL 的語句。可以使用類路徑中的資源引用,或者使用字符,輸入確切的URL 引用。
例如:

?
1
2
3
4
5
<mappers>
  <mapper resource="com/manager/data/maps/UserMapper.xml" />
  <mapper resource="com/manager/data/maps/StudentMapper.xml" />
  <mapper resource="com/manager/data/maps/ClassMapper.xml" />
</mappers>

延伸 · 閱讀

精彩推薦
  • JAVA教程作為Java程序員應(yīng)該掌握的10項技能

    作為Java程序員應(yīng)該掌握的10項技能

    這篇文章主要介紹了作為Java程序員應(yīng)該掌握的10項技能,包括java的知識點與相關(guān)的技能,對于java的學(xué)習(xí)有不錯的參考借鑒價值,需要的朋友可以參考下 ...

    一羽清寧2412019-12-18
  • JAVA教程Java性能優(yōu)化技巧匯總

    Java性能優(yōu)化技巧匯總

    這篇文章主要介紹了Java性能優(yōu)化技巧,匯總了提升java程序性能的常用技巧,非常具有實用價值,需要的朋友可以參考下 ...

    司青1752019-12-16
  • JAVA教程java之Object類用法實例

    java之Object類用法實例

    這篇文章主要介紹了java之Object類用法實例,是Java程序設(shè)計中比較重要的概念,以實例的形式對其定義及用法做了較為深入的講解,需要的朋友可以參考下 ...

    shichen20144002019-12-01
  • JAVA教程java實現(xiàn)動態(tài)代理示例分享

    java實現(xiàn)動態(tài)代理示例分享

    動態(tài)代理作為代理模式的一種擴(kuò)展形式,廣泛應(yīng)用于框架(尤其是基于AOP的框架)的設(shè)計與開發(fā),本文將通過實例來講解Java動態(tài)代理的實現(xiàn)過程。 ...

    java教程網(wǎng)3792019-11-15
  • JAVA教程eclipse中自動生成javadoc文檔的方法

    eclipse中自動生成javadoc文檔的方法

    這篇文章主要介紹了eclipse中自動生成javadoc文檔的方法,是實用eclipse開發(fā)Java程序時非常實用的技巧,對于進(jìn)行Java項目開發(fā)具有一定的參考借鑒價值,需要的朋...

    shichen20141292019-12-06
  • JAVA教程java獲取兩個數(shù)組中不同數(shù)據(jù)的方法

    java獲取兩個數(shù)組中不同數(shù)據(jù)的方法

    這篇文章主要介紹了java獲取兩個數(shù)組中不同數(shù)據(jù)的方法,實例分析了java操作數(shù)組的技巧,非常具有實用價值,需要的朋友可以參考下 ...

    java潮人4892019-12-13
  • JAVA教程java設(shè)計模式之建造者模式學(xué)習(xí)

    java設(shè)計模式之建造者模式學(xué)習(xí)

    建造者模式(Builder Pattern)主要用于“分步驟構(gòu)建一個復(fù)雜的對象”,在這其中“分步驟”是一個穩(wěn)定的算法,下面給出了詳細(xì)的示例 ...

    java技術(shù)網(wǎng)1862019-10-30
  • JAVA教程java實現(xiàn)單人版五子棋游戲

    java實現(xiàn)單人版五子棋游戲

    這篇文章主要為大家詳細(xì)介紹了java實現(xiàn)五子棋小游戲的相關(guān)資料,十分簡單實用,有不錯的參考借鑒價值,推薦給大家,需要的朋友可以參考下 ...

    lijiao1992020-03-31
主站蜘蛛池模板: 免费一级欧美片在线观看 | 亚洲视频在线免费看 | 91极品女神久色在线播放 | 手机在线观看网站免费视频 | 奶大逼紧 | 美女福利视频午夜在线 | 午夜办公室 | 91精品综合久久久久久五月天 | 国产白虎 | 国产精品久久久免费视频 | 日本欧美大码a在线视频播放 | 女子监狱第二季在线观看免费完整版 | 97se狠狠狠狠狼亚洲综合网 | 九九久久国产精品免费热6 九九精品视频一区二区三区 | 秋葵污视频 | 好逼365 | 日本动漫黄网站在线观看 | 91频视| 日本免费v片一二三区 | 精品第一国产综合精品蜜芽 | 2020精品极品国产色在线观看 | 亚洲伦理视频 | 黑人巨鞭大战白妞10级 | 日韩成人一区ftp在线播放 | 欧美性色欧美a在线播放 | 青草色视频 | 69日本xxⅹxxxxx19| 香蕉eeww99国产精选播放 | 无码AV熟妇素人内射V在线 | 精品国产国产精2020久久日 | 色综合久久六月婷婷中文字幕 | 无人知晓小说姜璟免费阅读 | 亚洲精选在线观看 | 18性夜影院午夜寂寞影院免费 | 91久久99热青草国产 | 久草在线草a免费线看 | 青春娱乐国产分类精品二 | 免费看黄色片的网站 | 糖心vlog麻豆精东影业传媒 | 国产成人永久免费视 | 97蝌蚪自拍自窝 |