Java???·-Spring??HttpInvoker??
???????????? ???????[ 2014/11/18 11:54:53 ] ????????Java ??????? ??? ????
????Hessian??Burlap???????HTTP?????????????RMI??????????????????????????????RPC????а??????л????????RMI???Hessian??Burlap???
???????Hessian??Burlap???????????е????л????????RMI??????Java????????л??????????????????????????Hessian/Burlap?????л????????????????
????Spring????????????RMI????????HTTP????????????Spring??HttpInvoker????????
????Spring??HttpInvoker????????HTTP?????RPC???????????Java????????л??????
???????????????
?????????????????????????????????Serializable???
package entity;
import java.io.Serializable;
public class Fruit implements Serializable {
private String name;
private String color;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
}
??????????????????
????package service;
????import java.util.List;
????import entity.Fruit;
????public interface FruitService {
????List<Fruit> getFruitList();
????}
???????????????????????????е???
package service.impl;
import java.util.ArrayList;
import java.util.List;
import service.FruitService;
import entity.Fruit;
public class FruitServiceImpl implements FruitService {
public List<Fruit> getFruitList() {
List<Fruit> list = new ArrayList<Fruit>();
Fruit f1 = new Fruit();
f1.setName("????");
f1.setColor("???");
Fruit f2 = new Fruit();
f2.setName("???");
f2.setColor("???");
list.add(f1);
list.add(f2);
return list;
}
}????Hessian??Burlap???????HTTP?????????????RMI??????????????????????????????RPC????а??????л????????RMI???Hessian??Burlap???
???????Hessian??Burlap???????????е????л????????RMI??????Java????????л??????????????????????????Hessian/Burlap?????л????????????????
????Spring????????????RMI????????HTTP????????????Spring??HttpInvoker????????
????Spring??HttpInvoker????????HTTP?????RPC???????????Java????????л??????
???????????????
???????????????????????????????Serializable???
package entity;
import java.io.Serializable;
public class Fruit implements Serializable {
private String name;
private String color;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
}
??????????????????
????package service;
????import java.util.List;
????import entity.Fruit;
????public interface FruitService {
????List<Fruit> getFruitList();
????}
???????????????????????????е???
package service.impl;
import java.util.ArrayList;
import java.util.List;
import service.FruitService;
import entity.Fruit;
public class FruitServiceImpl implements FruitService {
public List<Fruit> getFruitList() {
List<Fruit> list = new ArrayList<Fruit>();
Fruit f1 = new Fruit();
f1.setName("????");
f1.setColor("???");
Fruit f2 = new Fruit();
f2.setName("???");
f2.setColor("???");
list.add(f1);
list.add(f2);
return list;
}
}
??????
???·???
??????????????????
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