?????????·??????????????????????
???????????? ???????[ 2013/7/19 13:21:56 ] ????????
???????????У??????????????????????á?????????????????е?????
???????????DBUnit????????
?????????????????????????????????????????????????????????????????????Щ?????????и?????????????????DBUnit?????????????????????з????????鵣???????????????н??????????????????????????????????????????
??????pom.xml??????dbunit??springtestdbunit????????????????????DBUnit??
<dependency>
<groupId>org.dbunit</groupId>
<artifactId>dbunit</artifactId>
<version>2.4.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.springtestdbunit</groupId>
<artifactId>spring-test-dbunit</artifactId>
<version>1.0.1</version>
<scope>test</scope>
</dependency>
????DBUnit???xml?????????????????????????????????????????JSON????????????xml??
<xml version="1.0" encoding="utf-8"?>
<dataset>
<building id="1" name="SOHO"/>
<building id="2" name="New Gate Plaza"/>
<floor id="1" floor_num="2" building="1"/>
<floor id="2" floor_num="3" building="1"/>
<floor id="3" floor_num="5" building="2"/>
</dataset>
???????????????????? /src/test/resources/?У????????????????????????С????????????????????Dao????-????????????-dataset.xml ???????????????:UserDao-findByname-dataxml.set??????????????????????????????????????????????????????????????????????????????
???????
????1. ?????Element????Attribute????????????????????????????????
????2. ???????????????????????????????????????????????磺??????????????????????8???????????????4????????????????????????檔
?????????д????????
???????д?????????????±???????????????????????
package com.noyaxe.myapp.entity;
import javax.persistence.Entity;
import javax.persistence.Table;
@Entity
@Table(name = "building")
public class Building extends IdEntity {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11