package com.yfd.platform.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

@Component
public class DatabaseConfigReader {

    @Autowired
    private Environment environment;

    public String getDatabaseUrl() {
        return environment.getProperty("spring.datasource.druid.master.url");
    }

    public String getDatabaseUsername() {
        return environment.getProperty("spring.datasource.druid.master.username");
    }

    public String getDatabasePassword() {
        return environment.getProperty("spring.datasource.druid.master.password");
    }

    public String getBackupPath() {
        return environment.getProperty("spring.datasource.druid.master.backuppath");
    }
}
