Relevance.java代码如下:
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor; import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table; @Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Table(name = "relevance")
public class Relevance { @Id
@GeneratedValue(generator = "JDBC")
private Integer id; private String cityCode; private Integer distId; private String name; private String level; private String mapId;
}
按常理来说,我在其他地方应该能通过该类实体,能点出getter,setter,可是事实如下
以上情况,我每次都会重启IDEA,然后让他重新生成一边该类的class文件
解决方法
打开File--Setting-->Annotaion Processors,设置一下并重启。即可解决问题
重启后效果