package com.malk.server.common;

import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * 读取配置文件参考McConf
 */
@Data
@Component
@ConfigurationProperties(prefix = "file")
public class FilePath {

    @Autowired
    private Path path;

    @Autowired
    private Source source;

    @Data
    @Configuration
    @ConfigurationProperties(prefix = "file.path")
    public class Path {

        private String file;

        private String image;

        private String tmp;
    }

    @Data
    @Configuration
    @ConfigurationProperties(prefix = "file.source")
    public class Source {

        private String fonts;
    }
}
