systems.dennis.shared.mongo.bean.MongoDateInstance Maven / Gradle / Ivy
The newest version!
package systems.dennis.shared.mongo.bean;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import systems.dennis.shared.annotations.entity.PrimaryDateSetter;
import java.time.LocalDate;
import java.util.Date;
@Component
@Scope("singleton")
public class MongoDateInstance implements PrimaryDateSetter {
@Override
public T getNewDateValue() {
return (T) LocalDate.now();
}
}