/**
 * 应用自定义配置属性。
 *
 * <p>对应 application.yml 中以 {@code app} 为前缀的配置项。</p>
 */
package com.hertz.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
@ConfigurationProperties(prefix = "app")
public class AppProperties {

  private Jwt jwt = new Jwt();
  private Upload upload = new Upload();

  @Data
  public static class Jwt {
    private String secret;
    private long expireSeconds;
  }

  @Data
  public static class Upload {
    private String rootPath;
    private String avatarPath;
    private String knowledgePath = "knowledge/";
  }
}
