代码中点击右键(快捷键Ctrl+Alt+S) ->Source ->Generate Getters and Setters... ->全选(或选择需要生成的字段/方法) 动图: 静图: 转载于:https://www.cnblogs.com/tigerlion/p/10662793.html