We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v3.1.0
Java
No response
在springboot中能否获取到classpath:simbot-bots/xxx.json的某个配置项?我希望在同一个地方定义和bot相关的配置项,但是不确定在springboot的其他位置能否获取到这些配置项?
The text was updated successfully, but these errors were encountered:
无法像 Spring 自身的配置那样直接获取具体配置项。如有需要建议直接自行解析,或直接配置在 Spring 的配置文件中。
Sorry, something went wrong.
是否有考虑在json中支持对环境变量的解析,形如
{ "client_id": "${BOT_CLIENT_ID}" }
这样对容器化的程序部署比较友好,而且也避免了将开发过程中的敏感信息误传到公开仓库中的问题
是否有考虑在json中支持对环境变量的解析
配置文件中对环境变量的支持实际上在组件中是有的,比如 mirai bot 有关密码相关的配置,但是这是针对某个组件的特化实现,并非全局支持的,比如KOOK目前就不支持。
也许会考虑为 KOOK 组件的token等敏感信息单独增加支持环境变量的新配置方式,可以追踪 为配置文件的部分敏感项增加环境变量支持 simbot-component-kook#100 ,但是 KOOK 组件最优先的是 重构 simbot-component-kook#82
是否有考虑在json中支持对环境变量的解析 配置文件中对环境变量的支持实际上在组件中是有的,比如 mirai bot 有关密码相关的配置,但是这是针对某个组件的特化实现,并非全局支持的,比如KOOK目前就不支持。 也许会考虑为 KOOK 组件的token等敏感信息单独增加支持环境变量的新配置方式,可以追踪 为配置文件的部分敏感项增加环境变量支持 simbot-component-kook#100 ,但是 KOOK 组件最优先的是 重构 simbot-component-kook#82
我可以协助处理这个问题,不过我还需要阅读下代码,我对kt不是很熟,而且是第一次接触simbot。相关问题到 simple-robot/simbot-component-kook#100 讨论
ForteScarlet
No branches or pull requests
版本号
v3.1.0
涉及的编程语言
Java
涉及的组件库
No response
疑问描述
在springboot中能否获取到classpath:simbot-bots/xxx.json的某个配置项?我希望在同一个地方定义和bot相关的配置项,但是不确定在springboot的其他位置能否获取到这些配置项?
The text was updated successfully, but these errors were encountered: