package com.ruoyi.template.config;
|
|
import lombok.Data;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.stereotype.Component;
|
|
/**
|
* 模板模块的 yml 配置(<b>仅作兜底,不是主开关</b>)。
|
*
|
* <h3>⚠️ 主开关不在这里</h3>
|
* 主开关是 {@code sys_config} 参数配置表里的 {@code template.enabled},
|
* 由 {@link TemplateSwitch} <b>运行时热读</b>(进程内 10 秒缓存,改完最多 10 秒生效)。
|
* 本类只在「sys_config 里没有那一行」或「非 Spring 环境取不到配置服务」时兜底。
|
*
|
* <h3>为什么默认 true</h3>
|
* 模板是<b>纯数据管理</b>能力(宣教模板 / 语音模板 / 问卷模板 / 方案库的增删改查),
|
* 前端的模板管理页一直要用;关掉它只会让页面报模块不可用,没有任何收益。
|
* 要关闭请到「系统管理 → 参数设置」显式把 {@code template.enabled} 设为 false。
|
*/
|
@Data
|
@Component
|
@ConfigurationProperties(prefix = "template")
|
public class TemplateProperties {
|
|
/**
|
* yml 兜底开关(默认 true)
|
*/
|
private boolean enabled = true;
|
}
|