pub struct AppConfig {Show 14 fields
pub profile: String,
pub server: ServerConfig,
pub database: DatabaseConfig,
pub multipart: MultipartConfig,
pub mybatis: MybatisConfig,
pub jwt: JwtConfig,
pub folder: FolderConfig,
pub rss: RssConfig,
pub sentry: SentryConfig,
pub springdoc: SpringdocConfig,
pub dev_console: DevConsoleConfig,
pub telemetry: TelemetryConfig,
pub tencent: TencentConfig,
pub aliyun: AliyunConfig,
}Expand description
应用总配置
对应 TOML 配置文件的根结构,聚合所有配置段。
通过 load() 从 base.toml + {profile}.toml 加载。
Fields§
§profile: String配置档名称(对应 spring.profiles.active)
server: ServerConfig服务配置
database: DatabaseConfig数据库配置
multipart: MultipartConfig文件上传配置
mybatis: MybatisConfigMyBatis 配置
jwt: JwtConfigJWT 配置
folder: FolderConfig文件夹配置
rss: RssConfigRSS 配置
sentry: SentryConfigSentry 配置
springdoc: SpringdocConfigSpringdoc 配置(pro 段无此项时使用默认值)
dev_console: DevConsoleConfigdev 控制台配置
telemetry: TelemetryConfig可观测性 / OTel 配置
tencent: TencentConfig腾讯云配置
aliyun: AliyunConfig阿里云配置
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AppConfig
impl<'de> Deserialize<'de> for AppConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AppConfig
impl RefUnwindSafe for AppConfig
impl Send for AppConfig
impl Sync for AppConfig
impl Unpin for AppConfig
impl UnsafeUnpin for AppConfig
impl UnwindSafe for AppConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request