booting-go

module
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2021 License: Apache-2.0

README

booting-go

介绍

基于iris和gorm的小型go web即开即用依赖注入框架

软件架构

web框架:iris

orm框架:gorm

安装教程
go get gitee.com/kristas/booting-go
使用说明

参考demo

简易部署

创建config.yml

server:
  port: 8888
iris:
  FireMethodNotAllowed: true
  DisableBodyConsumptionOnUnmarshal: true
  TimeFormat: "2006-01-02 15:04:05"
  Charset: UTF-8
  LogLevel: info # "disable","fatal","error","warn","info","debug"
  EnableOptimizations: true

创建main.go

package main

import (
 . "gitee.com/kristas/booting-go/demo/component_config"
 "gitee.com/kristas/booting-go/framework"
 "gitee.com/kristas/booting-go/framework/bean/bean_factory"
 "os"
)

func main() {
 var appName = "DemoApp"
 bean_factory.RegisterWithName("app_name", &appName) // 注册bean

 // 启动框架
 framework.Application().
 	Use(Components()...).Run(os.Args...)
}
启动
go run main.go
参与贡献
  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL