遵循writing hessian serivce,我已经在我的spring应用程序中设置了Hessian webservice,并且它可以正常工作。
使用org.springframework.remoting.caucho.HessianServiceExporter - SpringFramework 3.1,Hessian 4.0.1,
public interface RetailService {
List<User> getUserList();
}
@Component
public class RetailServiceImpl implements RetailService {
public List<User> getUserList() {
List<User> list=//get from db
return list;
}
}
class User{
String name,otherFields;
//Exclude this from serialization
Role role;
}如何从序列化中排除某些字段。我可以编写一个不包括Role的包装器/继承类,但我更喜欢使用现有类本身的简单(如注释)。
发布于 2012-11-23 15:21:09
https://stackoverflow.com/questions/13524612
复制相似问题