package com.lanyuanxiaoyao.service.queue.configuration;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author lanyuanxiaoyao
 * @date 2023-05-06
 */
@Component
@ConfigurationProperties("data.save")
public class AutoSaveProperties {
    private Boolean enable = false;
    private String location = "data";

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public Boolean getEnable() {
        return enable;
    }

    public String getLocation() {
        return location;
    }

    @Override
    public String toString() {
        return "AutoSaveProperty{" +
                "enable=" + enable +
                ", location='" + location + '\'' +
                '}';
    }
}
