将前端dist文件复制到go项目目录下 package mainimport ( "github.com/gin-gonic/gin" "github.com/gin-contrib/static")func main(){ r := gin.Default() r.Use(static.Serve("/", static.LocalFile("dist", false))) r.Run(":8083")}