config file error

This commit is contained in:
2024-11-01 00:29:35 +08:00
parent dcac6578dc
commit 431ab13673
4 changed files with 9 additions and 5 deletions

View File

@@ -85,6 +85,7 @@ func SetUp1() {
mysqlHost := viper.GetString("mysql.Host")
jwtSecretKey := viper.GetString("jwt.SecretKey")
serverPort := viper.GetInt("server.Port")
DataBase = viper.Get("database")
templateGlob := viper.GetString("project.TemplateGlob")
// 打印获取到的配置值

View File

@@ -1,4 +1,4 @@
mysql:
database:
Type: mysql
Host: 127.0.0.1
Port: 3306