当我创建一个需要自动获取的任何用户时,该用户使用 @CreatedBy 注释创建了该用户,并且当我操作任何需要使用 @LastModifiedBy 注释自动获取的内容时。但这现在行不通了。可能是什么原因?
This is my entity class
@Slf4j
@Getter
@Setter
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
public abstract class AbstractAuditingEntity implements Serializable {
private static final long serialVersionUID = 1L;
@CreatedBy
@Column(name = "created_by" , nullable = false, length = 50, updatable = false)
@JsonIgnore
private String createdBy;
@CreatedDate
@Column(name = "created_date", updatable = false)
@JsonIgnore
private Instant createdDate = Instant.now();
@LastModifiedBy
@Column(name = "last_modified_by", length = 50)
@JsonIgnore
private String lastModifiedBy;
@LastModifiedDate
@Column(name = "last_modified_date")
@JsonIgnore
private Instant lastModifiedDate = …Run Code Online (Sandbox Code Playgroud) 在此处输入图像描述这是我的控制器,我使用端口 localhost:8080 进行访问,它返回白色标签错误。可能是什么原因?
@RestController
public class EmployeeController {
@GetMapping("/")
public String hello() {
return "service is up and running";
}
Run Code Online (Sandbox Code Playgroud)