格式化此代码时:
@JoinTable(name = "UTI_COLLECTER_CTN",
joinColumns = @JoinColumn(name = "COD_UTI", referencedColumnName = "COD_UTI"),
inverseJoinColumns = @JoinColumn(name = "COD_CTN", referencedColumnName = "COD_CTN"))
eclipse在注释的每个右括号注释后添加一个空格,如下所示:
@JoinTable(name = "UTI_COLLECTER_CTN",
joinColumns = @JoinColumn(name = "COD_UTI", referencedColumnName = "COD_UTI") ,
inverseJoinColumns = @JoinColumn(name = "COD_CTN", referencedColumnName = "COD_CTN") )
如何预防? (删除格式化程序配置中的所有空格不会改变任何内容......)
答案 0 :(得分:1)
我终于找到了一个解决方法,我在内部注释之前和之后添加了大括号:
@JoinTable(name = "UTI_COLLECTER_CTN",
joinColumns = {@JoinColumn(name = "COD_UTI", referencedColumnName = "COD_UTI")},
inverseJoinColumns = {@JoinColumn(name = "COD_CTN", referencedColumnName = "COD_CTN")})
答案 1 :(得分:-1)