Skip to content

如何使用nacos config来连接数据库 #3740

Answered by czy88840616
KingDracula asked this question in Q&A
Discussion options

You must be logged in to vote

1、不要在 onConfigLoad 调用任意数据库的代码避免提前初始化,包括 inject
2、在 onConfigLoad 中直接用 nacos getConfig 获取配置

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@KingDracula
Comment options

Answer selected by KingDracula
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
type: question / discussion This issue or pull request need be discussion
2 participants