我有一个实体一直给我这个异常org.hibernate.bytecode.internal.bytebuddy.PrivateAccessorException:private accessor [callbackUrl]
Java版本:17
Sping Boot Starter父级:3.1.1
如您所见,我为实体显式声明了setter和getter。我也尝试添加**@Access(AccessType.PROPERTY)**,但问题仍然存在。
@Entity
public class EWalletEntity {
public EWalletEntity() {
}
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@Enumerated(EnumType.STRING)
private CheckoutMethod checkoutMethod;
@Enumerated(EnumType.STRING)
private ChannelCode channelCode;
@Column
private Boolean redirectRequired;
@Column(name = "callback_url")
private String callbackUrl;
private String metadata;
@Column
private String customerId;
@Column
private String failureCode;
@Column
private String paymentMethodId;
@Column
private String lastCallback;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public CheckoutMethod getCheckoutMethod() {
return checkoutMethod;
}
public void setCheckoutMethod(CheckoutMethod checkoutMethod) {
this.checkoutMethod = checkoutMethod;
}
public ChannelCode getChannelCode() {
return channelCode;
}
public void setChannelCode(ChannelCode channelCode) {
this.channelCode = channelCode;
}
public Boolean getRedirectRequired() {
return redirectRequired;
}
public void setRedirectRequired(Boolean redirectRequired) {
this.redirectRequired = redirectRequired;
}
public String getCallbackUrl() {
return callbackUrl;
}
public void setCallbackUrl(String callbackUrl) {
this.callbackUrl = callbackUrl;
}
public String getMetadata() {
return metadata;
}
public void setMetadata(String metadata) {
this.metadata = metadata;
}
public String getCustomerId() {
return customerId;
}
public void setCustomerId(String customerId) {
this.customerId = customerId;
}
public String getFailureCode() {
return failureCode;
}
public void setFailureCode(String failureCode) {
this.failureCode = failureCode;
}
public String getPaymentMethodId() {
return paymentMethodId;
}
public void setPaymentMethodId(String paymentMethodId) {
this.paymentMethodId = paymentMethodId;
}
public String getLastCallback() {
return lastCallback;
}
public void setLastCallback(String lastCallback) {
this.lastCallback = lastCallback;
}
}
字符串
1条答案
按热度按时间bq8i3lrv1#
我相信这只是一个调试级别的消息?所以你不需要担心它,可以忽略它。如果您真的想从日志中删除它,请将该包的日志记录器级别(例如
org.hibernate.bytecode.internal.bytebuddy
)配置为INFO。有关更多详细信息,请参阅here上的Hibernate创建者的答案。