Package com.bytedesk.starter.controller
Class PageRouteController
java.lang.Object
com.bytedesk.starter.controller.PageRouteController
Controller for "/".
- Author:
- jackning
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadmin()admin 管理后台 http://127.0.0.1:9003/adminagent web聊天/客服端 http://127.0.0.1:9003/agentapidocs 文档 支持多语言路径:/apidocs, /apidocs/zh-CN, /apidocs/zh-TW http://127.0.0.1:9003/apidocschat()chatDemo(org.springframework.ui.Model model) visitor 访客对话窗口 http://127.0.0.1:9003/chat/demodocusaurus 文档 支持多语言路径:/docs, /docs/zh-CN, /docs/zh-TW http://127.0.0.1:9003/docshandleFeatureRoutes(String feature, org.springframework.ui.Model model) Features pages - support both with and without /features/ prefix For dynamic FTL template rendering (non-.html requests) http://127.0.0.1:9003/office http://127.0.0.1:9003/features/officehandlePageRoutes(String page, org.springframework.ui.Model model) Pages - support both with and without /pages/ prefix For dynamic FTL template rendering (non-.html requests) http://127.0.0.1:9003/download http://127.0.0.1:9003/pages/downloadhome(org.springframework.ui.Model model) 微语首页 http://127.0.0.1:9003 http://127.0.0.1:9003/home 多语言支持: http://127.0.0.1:9003/zh-TW/index.html http://127.0.0.1:9003/en/index.htmliframe()kanban 看板 http://127.0.0.1:9003/kanbanloadI18nProperties(String lang) Helper method to load i18n properties for a given languagemultiLanguageStaticPages(String lang, String feature, String page, org.springframework.ui.Model model) Multi-language static HTML support http://127.0.0.1:9003/zh-TW/index.html http://127.0.0.1:9003/en/index.html http://127.0.0.1:9003/zh-TW/features/team.html http://127.0.0.1:9003/en/pages/about.htmlnotebase - React SPA http://127.0.0.1:9003/notebase/spaces 注意: 1.rootStaticPages(String feature, String page, org.springframework.ui.Model model) Root static HTML pages for zh-CN (default language) http://127.0.0.1:9003/index.html http://127.0.0.1:9003/features/team.html http://127.0.0.1:9003/pages/about.htmlMulti-language /web support http://127.0.0.1:9003/web (默认简体中文) http://127.0.0.1:9003/web/zh-CN http://127.0.0.1:9003/web/zh-TW http://127.0.0.1:9003/web/en
-
Field Details
-
showDemo
-
customEnabled
-
customName
-
customLogo
-
customDescription
@Value("${bytedesk.custom.description:\u91cd\u590d\u5de5\u4f5c\u81ea\u52a8\u5316}") private String customDescription
-
-
Constructor Details
-
PageRouteController
public PageRouteController()
-
-
Method Details
-
home
微语首页 http://127.0.0.1:9003 http://127.0.0.1:9003/home 多语言支持: http://127.0.0.1:9003/zh-TW/index.html http://127.0.0.1:9003/en/index.html -
multiLanguageStaticPages
@GetMapping({"/{lang:zh-CN|zh-TW|en}/index.html","/{lang:zh-CN|zh-TW|en}/features/{feature:office|scrm|team|ai|kbase|voc|ticket|workflow|kanban|callcenter|video|service|open}.html","/{lang:zh-CN|zh-TW|en}/pages/{page:download|contact|about|privacy|terms}.html"}) public String multiLanguageStaticPages(@PathVariable String lang, @PathVariable(required=false) String feature, @PathVariable(required=false) String page, org.springframework.ui.Model model) Multi-language static HTML support http://127.0.0.1:9003/zh-TW/index.html http://127.0.0.1:9003/en/index.html http://127.0.0.1:9003/zh-TW/features/team.html http://127.0.0.1:9003/en/pages/about.html -
rootStaticPages
@GetMapping({"/index.html","/features/{feature:office|scrm|team|ai|kbase|voc|ticket|workflow|kanban|callcenter|video|service|open}.html","/pages/{page:download|contact|about|privacy|terms}.html"}) public String rootStaticPages(@PathVariable(required=false) String feature, @PathVariable(required=false) String page, org.springframework.ui.Model model) Root static HTML pages for zh-CN (default language) http://127.0.0.1:9003/index.html http://127.0.0.1:9003/features/team.html http://127.0.0.1:9003/pages/about.html -
web
@GetMapping({"/web","/web/{lang:zh-CN|zh-TW|en}"}) public String web(@PathVariable(required=false) String lang, org.springframework.ui.Model model) Multi-language /web support http://127.0.0.1:9003/web (默认简体中文) http://127.0.0.1:9003/web/zh-CN http://127.0.0.1:9003/web/zh-TW http://127.0.0.1:9003/web/en -
docs
@GetMapping({"/docs","/docs/","/docs/{lang:zh-CN|zh-TW}","/docs/{lang:zh-CN|zh-TW}/","/docs/{path:[^\\.]*}","/docs/{path:[^\\.]*}/{path2:[^\\.]*}","/docs/{lang:zh-CN|zh-TW}/{path:[^\\.]*}","/docs/{lang:zh-CN|zh-TW}/{path:[^\\.]*}/{path2:[^\\.]*}","/docs/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\\\.]*}","/docs/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\\\.]*}/{path4:[^\\\\\\\\.]*}","/docs/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\\\.]*}/{path4:[^\\\\\\\\.]*}/{path5:[^\\\\\\\\\\\\\\\\.]*}"}) public String docs(@PathVariable(required=false) String lang, @PathVariable(required=false) String path, @PathVariable(required=false) String path2) docusaurus 文档 支持多语言路径:/docs, /docs/zh-CN, /docs/zh-TW http://127.0.0.1:9003/docs -
apidocs
@GetMapping({"/apidocs","/apidocs/","/apidocs/{lang:zh-CN|zh-TW}","/apidocs/{lang:zh-CN|zh-TW}/","/apidocs/{path:[^\\.]*}","/apidocs/{path:[^\\.]*}/{path2:[^\\.]*}","/apidocs/{lang:zh-CN|zh-TW}/{path:[^\\.]*}","/apidocs/{lang:zh-CN|zh-TW}/{path:[^\\.]*}/{path2:[^\\.]*}","/apidocs/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\\\.]*}","/apidocs/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\\\.]*}/{path4:[^\\\\\\\\.]*}","/apidocs/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\\\.]*}/{path4:[^\\\\\\\\.]*}/{path5:[^\\\\\\\\\\\\\\\\.]*}"}) public String apidocs(@PathVariable(required=false) String lang, @PathVariable(required=false) String path, @PathVariable(required=false) String path2) apidocs 文档 支持多语言路径:/apidocs, /apidocs/zh-CN, /apidocs/zh-TW http://127.0.0.1:9003/apidocs -
admin
@GetMapping({"/admin","/admin/","/admin/{path:[^\\.]*}","/admin/{path:[^\\.]*}/{path2:[^\\.]*}","/admin/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\.]*}","/admin/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\.]*}/{path4:[^\\.]*}"}) public String admin()admin 管理后台 http://127.0.0.1:9003/admin -
agent
@GetMapping({"/agent","/agent/","/agent/{path:[^\\.]*}","/agent/{path:[^\\.]*}/{path2:[^\\.]*}","/agent/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\.]*}","/agent/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\.]*}/{path4:[^\\.]*}"}) public String agent(@PathVariable(required=false) String path) agent web聊天/客服端 http://127.0.0.1:9003/agent -
chatDemo
visitor 访客对话窗口 http://127.0.0.1:9003/chat/demo -
chat
@GetMapping({"/chat","/chat/","/chat/{path:[^\\.]*}","/chat/{path:[^\\.]*}/{path2:[^\\.]*}","/chat/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\.]*}","/chat/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\.]*}/{path4:[^\\.]*}"}) public String chat() -
iframe
-
workflow
@GetMapping({"/workflow","/workflow/","/workflow/{path:[^\\.]*}","/workflow/{path:[^\\.]*}/{path2:[^\\.]*}","/workflow/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\.]*}","/workflow/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\.]*}/{path4:[^\\.]*}"}) public String workflow(@PathVariable(required=false) String path, @PathVariable(required=false) String path2) -
notebase
@GetMapping({"/notebase","/notebase/","/notebase/{path:[^\\.]*}","/notebase/{path:[^\\.]*}/{path2:[^\\.]*}","/notebase/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\.]*}","/notebase/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\.]*}/{path4:[^\\.]*}"}) public String notebase(@PathVariable(required=false) String path, @PathVariable(required=false) String path2) notebase - React SPA http://127.0.0.1:9003/notebase/spaces 注意: 1. 静态资源请求(包含.的路径)会被 Spring 的资源处理器处理 2. 其他所有路径都转发到 index.html,由 React Router 处理 -
kanban
@GetMapping({"/kanban","/kanban/","/kanban/{path:[^\\.]*}","/kanban/{path:[^\\.]*}/{path2:[^\\.]*}","/kanban/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\.]*}","/kanban/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\.]*}/{path4:[^\\.]*}"}) public String kanban(@PathVariable(required=false) String path, @PathVariable(required=false) String path2) kanban 看板 http://127.0.0.1:9003/kanban -
reactdemo
@GetMapping({"/reactdemo","/reactdemo/","/reactdemo/{path:[^\\.]*}","/reactdemo/{path:[^\\.]*}/{path2:[^\\.]*}","/reactdemo/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\.]*}","/reactdemo/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\.]*}/{path4:[^\\.]*}"}) public String reactdemo(@PathVariable(required=false) String path, @PathVariable(required=false) String path2) -
forum
@GetMapping({"/forum","/forum/","/forum/{path:[^\\.]*}","/forum/{path:[^\\.]*}/{path2:[^\\.]*}","/forum/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\.]*}","/forum/{path:[^\\.]*}/{path2:[^\\.]*}/{path3:[^\\.]*}/{path4:[^\\.]*}"}) public String forum(@PathVariable(required=false) String path, @PathVariable(required=false) String path2) -
handleFeatureRoutes
@GetMapping({"/{feature:office|scrm|team|ai|kbase|voc|ticket|workflow|kanban|callcenter|video|service|open}","/features/{feature:office|scrm|team|ai|kbase|voc|ticket|workflow|kanban|callcenter|video|service|open}"}) public String handleFeatureRoutes(@PathVariable(required=false) String feature, org.springframework.ui.Model model) Features pages - support both with and without /features/ prefix For dynamic FTL template rendering (non-.html requests) http://127.0.0.1:9003/office http://127.0.0.1:9003/features/office -
handlePageRoutes
@GetMapping({"/{page:download|contact|about|privacy|terms}","/pages/{page:download|contact|about|privacy|terms}"}) public String handlePageRoutes(@PathVariable String page, org.springframework.ui.Model model) Pages - support both with and without /pages/ prefix For dynamic FTL template rendering (non-.html requests) http://127.0.0.1:9003/download http://127.0.0.1:9003/pages/download -
loadI18nProperties
Helper method to load i18n properties for a given language
-