Skip to content

Commit

Permalink
router 注释
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghanzheng committed Jul 1, 2022
1 parent 7efd498 commit 95c2e88
Showing 1 changed file with 42 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,50 +12,91 @@
@ConfigurationProperties(prefix = "concept.router")
public class RouterProperties {

/**
* 是否启用路由
*/
private boolean enabled = true;

/**
* 路由仓库配置
*/
private RepositoryProperties repository = new RepositoryProperties();

/**
* 路由日志配置
*/
private LoggerProperties logger = new LoggerProperties();

/**
* Banner配置
*/
private BannerProperties banner = new BannerProperties();

/**
* 可视化配置
*/
private ManagementProperties management = new ManagementProperties();

@Data
public static class RepositoryProperties {

/**
* 路由仓库类型
*/
private RepositoryType type = RepositoryType.LOCAL;

/**
* 本地路由仓库配置
*/
private LocalProperties local = new LocalProperties();

public enum RepositoryType {

MEMORY, LOCAL
/**
* 内存
*/
MEMORY,

/**
* 本地文件
*/
LOCAL
}

@Data
public static class LocalProperties {

/**
* 本地文件目录
*/
private String path = new File(System.getProperty("user.home"), "concept/router").getAbsolutePath();
}
}

@Data
public static class LoggerProperties {

/**
* 是否启用路由日志
*/
private boolean enabled = true;
}

@Data
public static class BannerProperties {

/**
* 是否打印Banner
*/
private boolean enabled = true;
}

@Data
public static class ManagementProperties {

/**
* 是否启用可视化页面
*/
private boolean enabled = true;
}
}

0 comments on commit 95c2e88

Please sign in to comment.