位置:- 正文

java中transient是什么(java transactional)

编辑:rootadmin

推荐整理分享java中transient是什么(java transactional),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:java @transaction,trans java,transit java,java中的transient,java @transaction,java transient volatile,transit java,trans java,内容如对您有帮助,希望把文章链接给更多的朋友!

java中transient是什么(java transactional)

614

1、transient防止用这个关键词修饰的变量序列化。当对象被反序列化时,被 transient 修饰的变量值不会被持久化和恢复。

2、transient 只能修饰变量,不能修饰类和方法。

实例

publicCatalogTreeCatalog(StringcatalogId){CatalogcatalogNode=findById(catalogId).get();//查询当前节点List<Catalog>catalogList=findChild(catalogId);//查询该节点的所有子节点for(Catalogchild:catalogList){Catalogcatalog=TreeCatalog(child.getCatalog_id());catalogNode.getChildren().add(catalog);returncatalogNode;
本文链接地址:https://www.jiuchutong.com/zhishi/304796.html 转载请保留说明!
下一篇链接:https://www.jiuchutong.com/zhishi/304797.html
免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络