From 16cf261948be8196f91f378ed14288380df22d7c Mon Sep 17 00:00:00 2001 From: QM303176530 <303176530@qq.com> Date: Thu, 11 Jun 2020 23:52:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=8A=9F=E8=83=BD=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=20=E4=BF=AE=E6=94=B9=E6=8F=92=E4=BB=B6=E5=8C=85?= =?UTF-8?q?=E7=9A=84=E5=AE=9E=E7=8E=B0=E6=96=B9=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/core/server.go | 9 +++++---- server/go.mod | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/server/core/server.go b/server/core/server.go index be85c784..35adb3db 100644 --- a/server/core/server.go +++ b/server/core/server.go @@ -4,6 +4,7 @@ import ( "fmt" "gin-vue-admin/global" "gin-vue-admin/initialize" + "github.com/piexlmax/gvaplug" "net/http" "time" ) @@ -17,10 +18,10 @@ func RunWindowsServer() { Router.Static("/form-generator", "./resource/page") // 插件安装 暂时只是后台功能 添加model 添加路由 添加对数据库的操作 详细插件测试模板可看https://github.com/piexlmax/gvaplug 此处不建议投入生产 - //err := initialize.InstallPlug(global.GVA_DB, Router, gvaplug.GvaPlug{}) - //if err != nil { - // panic(fmt.Sprintf("插件安装失败: %v", err)) - //} + err := initialize.InstallPlug(global.GVA_DB, Router, gvaplug.GvaPlug{}) + if err != nil { + panic(fmt.Sprintf("插件安装失败: %v", err)) + } // end 插件描述 address := fmt.Sprintf(":%d", global.GVA_CONFIG.System.Addr) diff --git a/server/go.mod b/server/go.mod index 149553fb..0ba08aa0 100644 --- a/server/go.mod +++ b/server/go.mod @@ -30,7 +30,7 @@ require ( github.com/onsi/gomega v1.4.3 // indirect github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 github.com/pelletier/go-toml v1.6.0 // indirect - github.com/piexlmax/gvaplug v0.0.5 + github.com/piexlmax/gvaplug v0.0.7 github.com/pkg/errors v0.9.1 // indirect github.com/qiniu/api.v7 v7.2.5+incompatible github.com/qiniu/x v7.0.8+incompatible // indirect