2026-01-21 17:44:51 +08:00
|
|
|
package application
|
|
|
|
|
|
|
|
|
|
import (
|
2026-01-21 19:40:21 +08:00
|
|
|
"context"
|
|
|
|
|
|
2026-01-21 17:44:51 +08:00
|
|
|
"github.com/gin-gonic/gin"
|
2026-01-21 19:40:21 +08:00
|
|
|
"github.com/go-spring/spring-core/gs"
|
2026-01-21 17:44:51 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type Controller interface {
|
|
|
|
|
RegisterRoute()
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-21 19:40:21 +08:00
|
|
|
type AppPak struct {
|
|
|
|
|
core *gin.Engine
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *AppPak) ListenAndServe(sig gs.ReadySignal) error {
|
|
|
|
|
s.core = gin.Default()
|
|
|
|
|
s.core.Run("7777")
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (_ *AppPak) Shutdown(ctx context.Context) error {
|
|
|
|
|
return nil
|
2026-01-21 17:44:51 +08:00
|
|
|
}
|