使用java提供的JAXB来实现java到xml之间的转换,先创建两个持久化的类(Student和Classroom): Classroom: package com.model; public class Classroom { private int id; private String name; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getNa…
1.需要用到的包 2.实例 实体类 people package com.shore.entity; /** * @author DSHORE/2019-4-19 * */ public class People { private int pid; private String pname; private int age; private String job; private double sal; public People() { } public People(int pid, St…