a_init.go 747 B

12345678910111213141516171819202122232425
  1. package services
  2. import (
  3. "app.yhyue.com/moapp/jybase/go-xweb/httpsession"
  4. "app.yhyue.com/moapp/jybase/go-xweb/xweb"
  5. _ "leadGeneration/services/filter"
  6. "time"
  7. )
  8. func init() {
  9. //开启redissession
  10. httpsession.IsRedisSessionStore = true
  11. xweb.Config.Profiler = true
  12. xweb.RootApp().AppConfig.StaticFileVersion = false
  13. xweb.RootApp().AppConfig.CheckXsrf = false
  14. xweb.RootApp().AppConfig.EnableHttpCache = false
  15. xweb.RootApp().AppConfig.Mode = xweb.Product
  16. xweb.RootApp().AppConfig.ReloadTemplates = true
  17. xweb.RootApp().AppConfig.SessionTimeout = 7 * 24 * time.Hour
  18. xweb.RootApp().Logger.SetOutputLevel(1) //输出日志,改为4则不输出任何日志
  19. xweb.RootApp().BasePath = "/leadGeneration"
  20. xweb.AddAction(&LeadGeneration{})
  21. }