对封装有疑问,不知道它是否是一个愚蠢的问题要问,但无法找到答案,如果我有一个pojo类被序列化,并通过网络传递,有人可以轻松地通过setter方法破解对象并改变其状态,所以我的情况是封装如何实际上隐藏来自外部系统的数据?Java封装混淆
前
class TestSeralize implement Serializable{
//some setter
}
test=new TstSeralize();// passed over network.
//hack test by middleman attack & reset through setter