我目前正在为我的新项目使用 Springboot 2.5.0 版。
我使用以下代码创建了一个实体类:
@SqlResultSetMapping(name = "GlobelabsApp", classes = @ConstructorResult(targetClass = App.class, columns = {
@ColumnResult(name = "id", type = Long.class),
@ColumnResult(name = "shortCode", type = String.class),
@ColumnResult(name = "crossTelcoShortCode", type = String.class),
@ColumnResult(name = "appId", type = String.class),
@ColumnResult(name = "appSecret", type = String.class),
@ColumnResult(name = "dateEntry", type = Date.class),
@ColumnResult(name = "enabled", type = Integer.class)
}))
public class App {
private Long id;
private String shortCode;
private String crossTelcoShortCode;
private String appId;
private String appSecret;
private Date dateEntry;
private Integer enabled;
public App() {
}
public App(Long id, String shortCode, String crossTelcoShortCode, String appId, String appSecret, Date dateEntry, Integer enabled) {
this.id = id;
this.shortCode = shortCode;
this.crossTelcoShortCode = crossTelcoShortCode;
this.appId = appId;
this.appSecret = appSecret;
this.dateEntry = dateEntry;
this.enabled = enabled;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getShortCode() {
return shortCode;
}
public void setShortCode(String shortCode) {
this.shortCode = shortCode;
}
public String getCrossTelcoShortCode() {
return crossTelcoShortCode;
}
public void setCrossTelcoShortCode(String crossTelcoShortCode) {
this.crossTelcoShortCode = crossTelcoShortCode;
}
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
public String getAppSecret() {
return appSecret;
}
public void setAppSecret(String appSecret) {
this.appSecret = appSecret;
}
public Date getDateEntry() {
return dateEntry;
}
public void setDateEntry(Date dateEntry) {
this.dateEntry = dateEntry;
}
public Integer getEnabled() {
return enabled;
}
public void setEnabled(Integer enabled) {
this.enabled = enabled;
}
}
这在 Springboot 2.4.4 之前已经使用过,具有相同的代码库。但现在我在调试日志中收到此消息。
我目前尝试的唯一解决方法是从 Springboot 2.5.0 降级到 2.4.4。