dev
This commit is contained in:
@@ -23,6 +23,7 @@ func main() {
|
|||||||
|
|
||||||
// 初始化Gin引擎
|
// 初始化Gin引擎
|
||||||
app := gin.Default()
|
app := gin.Default()
|
||||||
|
tmpl.New(app)
|
||||||
|
|
||||||
// 创建并加载自定义渲染器
|
// 创建并加载自定义渲染器
|
||||||
middleware.Mode(app)
|
middleware.Mode(app)
|
||||||
@@ -36,8 +37,6 @@ func main() {
|
|||||||
routers.RegistersPublic(app)
|
routers.RegistersPublic(app)
|
||||||
routers.RegistersAll(app)
|
routers.RegistersAll(app)
|
||||||
|
|
||||||
tmpl.New(app)
|
|
||||||
|
|
||||||
// start
|
// start
|
||||||
err := app.Run(fmt.Sprintf(":%s", config.Spec.Port))
|
err := app.Run(fmt.Sprintf(":%s", config.Spec.Port))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.apinb.com/bsm-sdk/core/cache/redis"
|
"git.apinb.com/bsm-sdk/core/cache/redis"
|
||||||
"git.apinb.com/bsm-sdk/core/with"
|
|
||||||
"git.apinb.com/senlinai/site/internal/config"
|
|
||||||
cache "github.com/patrickmn/go-cache"
|
cache "github.com/patrickmn/go-cache"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
@@ -19,6 +17,6 @@ var (
|
|||||||
func NewImpl() {
|
func NewImpl() {
|
||||||
// with activating
|
// with activating
|
||||||
MemoryService = cache.New(5*time.Minute, 10*time.Minute)
|
MemoryService = cache.New(5*time.Minute, 10*time.Minute)
|
||||||
RedisService = with.RedisCache(config.Spec.Cache) // redis cache
|
//RedisService = with.RedisCache(config.Spec.Cache) // redis cache
|
||||||
DBService = with.Databases(config.Spec.Databases, nil) // model
|
//DBService = with.Databases(config.Spec.Databases, nil) // model
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user