Intellij IDEA @Nullable注解自动添加 发表于 2024-08-20 分类于 技术 Intellij IDEA @Nullable注解自动添加设置方法 Settings → Editor → General → Code Completion 开启 “Add @Nullable annotations” 选择插入位置:参数/返回值 效果自动为可能为null的方法参数添加@Nullable注解。 总结减少空指针异常。