好像有戏
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"Crimson-Gatekeeper/internal/common"
|
||||
"Crimson-Gatekeeper/internal/route"
|
||||
"fmt"
|
||||
|
||||
"github.com/go-spring/spring-core/gs"
|
||||
)
|
||||
@@ -9,8 +11,9 @@ import (
|
||||
type Test struct{}
|
||||
|
||||
func main() {
|
||||
http.HandleFunc("/echo", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Write([]byte("hello world!"))
|
||||
})
|
||||
gs.Provide(common.GetDataBaseClient)
|
||||
gs.Provide(common.GetQuery)
|
||||
gs.Provide(route.NewTestBoot).AsRunner()
|
||||
fmt.Println("注入完成")
|
||||
gs.Run()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user