Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想通过 json 生成一个没有给定属性的 setter 方法的类。jsonschema2pojo json 模式定义中是否有任何选项可以帮助我实现这一目标?
不幸的是,到目前为止,jsonschema2pojo 还没有提供一种方法来将其确定为特定的属性。您可以对整个文件执行此操作。如果您在线使用该工具,您可以取消选中“包含 getter 和 setter”,如果您在代码中使用它,则需要扩展和覆盖 DefaultGenerationConfig 中的方法