Merge branch 'develop' into feature/mhw-v1.01

This commit is contained in:
laodaming
2023-09-20 13:57:38 +08:00
82 changed files with 195 additions and 1267 deletions

View File

@@ -13,7 +13,6 @@ import (
"fusenapi/server/shopping-cart/internal/handler"
"fusenapi/server/shopping-cart/internal/svc"
"github.com/zeromicro/go-zero/core/conf"
"github.com/zeromicro/go-zero/rest"
)
@@ -22,9 +21,8 @@ var configFile = flag.String("f", "etc/shopping-cart.yaml", "the config file")
func main() {
flag.Parse()
cfgContent := fsconfig.StartNacosConfig(*configFile, nil)
var c config.Config
conf.LoadConfigFromYamlBytes([]byte(cfgContent), &c)
fsconfig.StartNacosConfig(*configFile, &c, nil)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {