├── api-gateway-server └── src │ └── main │ ├── resources │ ├── static │ │ ├── doc │ │ │ └── help.pdf │ │ ├── images │ │ │ ├── 网关截图1.png │ │ │ ├── 网关截图2.png │ │ │ ├── 网关截图3.png │ │ │ ├── 网关截图4.png │ │ │ ├── 网关截图5.png │ │ │ ├── 网关截图6.png │ │ │ ├── blocks.gif │ │ │ ├── nav_link.png │ │ │ ├── noscript.gif │ │ │ ├── postman.png │ │ │ ├── tabicons.png │ │ │ ├── directory.png │ │ │ ├── plugin_big.gif │ │ │ ├── CategorizeMenu.png │ │ │ ├── TableDrawTable.png │ │ │ ├── gateway-design.png │ │ │ ├── gateway-technical.jpg │ │ │ ├── layout-browser-hd-bg.gif │ │ │ ├── tools-sprites-trans.gif │ │ │ └── ShowCustomPropertiesPage.png │ │ ├── js │ │ │ ├── themes │ │ │ │ ├── icons │ │ │ │ │ ├── back.png │ │ │ │ │ ├── cut.png │ │ │ │ │ ├── help.png │ │ │ │ │ ├── no.png │ │ │ │ │ ├── ok.png │ │ │ │ │ ├── redo.png │ │ │ │ │ ├── undo.png │ │ │ │ │ ├── cancel.png │ │ │ │ │ ├── pencil.png │ │ │ │ │ ├── print.png │ │ │ │ │ ├── reload.png │ │ │ │ │ ├── search.png │ │ │ │ │ ├── edit_add.png │ │ │ │ │ ├── filesave.png │ │ │ │ │ └── edit_remove.png │ │ │ │ ├── gray │ │ │ │ │ ├── images │ │ │ │ │ │ ├── Thumbs.db │ │ │ │ │ │ ├── menu.gif │ │ │ │ │ │ ├── menu_sep.png │ │ │ │ │ │ ├── tabs_close.gif │ │ │ │ │ │ ├── tree_file.gif │ │ │ │ │ │ ├── button_a_bg.gif │ │ │ │ │ │ ├── combo_arrow.gif │ │ │ │ │ │ ├── datebox_arrow.png │ │ │ │ │ │ ├── messager_info.gif │ │ │ │ │ │ ├── panel_loading.gif │ │ │ │ │ │ ├── panel_title.gif │ │ │ │ │ │ ├── panel_tools.gif │ │ │ │ │ │ ├── tabs_enabled.gif │ │ │ │ │ │ ├── tree_arrows.gif │ │ │ │ │ │ ├── tree_dnd_no.png │ │ │ │ │ │ ├── tree_dnd_yes.png │ │ │ │ │ │ ├── tree_folder.gif │ │ │ │ │ │ ├── tree_loading.gif │ │ │ │ │ │ ├── button_span_bg.gif │ │ │ │ │ │ ├── menu_downarrow.png │ │ │ │ │ │ ├── menu_rightarrow.png │ │ │ │ │ │ ├── messager_error.gif │ │ │ │ │ │ ├── pagination_last.gif │ │ │ │ │ │ ├── pagination_load.png │ │ │ │ │ │ ├── pagination_next.gif │ │ │ │ │ │ ├── pagination_prev.gif │ │ │ │ │ │ ├── tabs_leftarrow.png │ │ │ │ │ │ ├── tabs_rightarrow.png │ │ │ │ │ │ ├── tree_checkbox_0.gif │ │ │ │ │ │ ├── tree_checkbox_1.gif │ │ │ │ │ │ ├── tree_checkbox_2.gif │ │ │ │ │ │ ├── accordion_collapse.png │ │ │ │ │ │ ├── accordion_expand.png │ │ │ │ │ │ ├── button_plain_hover.png │ │ │ │ │ │ ├── calendar_nextmonth.gif │ │ │ │ │ │ ├── calendar_nextyear.gif │ │ │ │ │ │ ├── calendar_prevmonth.gif │ │ │ │ │ │ ├── calendar_prevyear.gif │ │ │ │ │ │ ├── datagrid_header_bg.gif │ │ │ │ │ │ ├── datagrid_sort_asc.gif │ │ │ │ │ │ ├── datagrid_sort_desc.gif │ │ │ │ │ │ ├── datagrid_title_bg.gif │ │ │ │ │ │ ├── layout_button_down.gif │ │ │ │ │ │ ├── layout_button_left.gif │ │ │ │ │ │ ├── layout_button_up.gif │ │ │ │ │ │ ├── messager_question.gif │ │ │ │ │ │ ├── messager_warning.gif │ │ │ │ │ │ ├── pagination_first.gif │ │ │ │ │ │ ├── pagination_loading.gif │ │ │ │ │ │ ├── panel_tool_expand.gif │ │ │ │ │ │ ├── spinner_arrow_down.gif │ │ │ │ │ │ ├── spinner_arrow_up.gif │ │ │ │ │ │ ├── tree_folder_open.gif │ │ │ │ │ │ ├── datagrid_row_expand.gif │ │ │ │ │ │ ├── layout_button_right.gif │ │ │ │ │ │ ├── menu_split_downarrow.png │ │ │ │ │ │ ├── panel_tool_collapse.gif │ │ │ │ │ │ ├── validatebox_pointer.gif │ │ │ │ │ │ ├── validatebox_warning.png │ │ │ │ │ │ └── datagrid_row_collapse.gif │ │ │ │ │ ├── combobox.css │ │ │ │ │ ├── menubutton.css │ │ │ │ │ ├── dialog.css │ │ │ │ │ ├── datebox.css │ │ │ │ │ ├── accordion.css │ │ │ │ │ ├── messager.css │ │ │ │ │ ├── validatebox.css │ │ │ │ │ ├── combo.css │ │ │ │ │ ├── splitbutton.css │ │ │ │ │ ├── spinner.css │ │ │ │ │ ├── pagination.css │ │ │ │ │ ├── window.css │ │ │ │ │ ├── menu.css │ │ │ │ │ ├── linkbutton.css │ │ │ │ │ ├── panel.css │ │ │ │ │ └── layout.css │ │ │ │ ├── default │ │ │ │ │ ├── images │ │ │ │ │ │ ├── Thumbs.db │ │ │ │ │ │ ├── menu.gif │ │ │ │ │ │ ├── menu_sep.png │ │ │ │ │ │ ├── tabs_close.gif │ │ │ │ │ │ ├── tree_file.gif │ │ │ │ │ │ ├── button_a_bg.gif │ │ │ │ │ │ ├── combo_arrow.gif │ │ │ │ │ │ ├── panel_title.png │ │ │ │ │ │ ├── panel_tools.gif │ │ │ │ │ │ ├── tabs_active.png │ │ │ │ │ │ ├── tabs_enabled.png │ │ │ │ │ │ ├── tree_arrows.gif │ │ │ │ │ │ ├── tree_dnd_no.png │ │ │ │ │ │ ├── tree_dnd_yes.png │ │ │ │ │ │ ├── tree_folder.gif │ │ │ │ │ │ ├── tree_loading.gif │ │ │ │ │ │ ├── button_span_bg.gif │ │ │ │ │ │ ├── datebox_arrow.png │ │ │ │ │ │ ├── menu_downarrow.png │ │ │ │ │ │ ├── menu_rightarrow.png │ │ │ │ │ │ ├── messager_error.gif │ │ │ │ │ │ ├── messager_info.gif │ │ │ │ │ │ ├── pagination_last.gif │ │ │ │ │ │ ├── pagination_load.png │ │ │ │ │ │ ├── pagination_next.gif │ │ │ │ │ │ ├── pagination_prev.gif │ │ │ │ │ │ ├── panel_loading.gif │ │ │ │ │ │ ├── tabs_leftarrow.png │ │ │ │ │ │ ├── tabs_rightarrow.png │ │ │ │ │ │ ├── tree_checkbox_0.gif │ │ │ │ │ │ ├── tree_checkbox_1.gif │ │ │ │ │ │ ├── tree_checkbox_2.gif │ │ │ │ │ │ ├── accordion_expand.png │ │ │ │ │ │ ├── calendar_nextyear.gif │ │ │ │ │ │ ├── calendar_prevyear.gif │ │ │ │ │ │ ├── datagrid_sort_asc.gif │ │ │ │ │ │ ├── datagrid_title_bg.png │ │ │ │ │ │ ├── layout_button_up.gif │ │ │ │ │ │ ├── messager_question.gif │ │ │ │ │ │ ├── messager_warning.gif │ │ │ │ │ │ ├── pagination_first.gif │ │ │ │ │ │ ├── panel_tool_expand.gif │ │ │ │ │ │ ├── spinner_arrow_up.gif │ │ │ │ │ │ ├── tree_folder_open.gif │ │ │ │ │ │ ├── accordion_collapse.png │ │ │ │ │ │ ├── button_plain_hover.png │ │ │ │ │ │ ├── calendar_nextmonth.gif │ │ │ │ │ │ ├── calendar_prevmonth.gif │ │ │ │ │ │ ├── datagrid_header_bg.gif │ │ │ │ │ │ ├── datagrid_row_expand.gif │ │ │ │ │ │ ├── datagrid_sort_desc.gif │ │ │ │ │ │ ├── layout_button_down.gif │ │ │ │ │ │ ├── layout_button_left.gif │ │ │ │ │ │ ├── layout_button_right.gif │ │ │ │ │ │ ├── menu_split_downarrow.png │ │ │ │ │ │ ├── pagination_loading.gif │ │ │ │ │ │ ├── panel_tool_collapse.gif │ │ │ │ │ │ ├── spinner_arrow_down.gif │ │ │ │ │ │ ├── validatebox_pointer.gif │ │ │ │ │ │ ├── validatebox_warning.png │ │ │ │ │ │ └── datagrid_row_collapse.gif │ │ │ │ │ ├── combobox.css │ │ │ │ │ ├── menubutton.css │ │ │ │ │ ├── dialog.css │ │ │ │ │ ├── datebox.css │ │ │ │ │ ├── accordion.css │ │ │ │ │ ├── messager.css │ │ │ │ │ ├── validatebox.css │ │ │ │ │ ├── combo.css │ │ │ │ │ ├── splitbutton.css │ │ │ │ │ ├── spinner.css │ │ │ │ │ ├── pagination.css │ │ │ │ │ ├── window.css │ │ │ │ │ ├── menu.css │ │ │ │ │ ├── linkbutton.css │ │ │ │ │ ├── panel.css │ │ │ │ │ └── layout.css │ │ │ │ └── icon.css │ │ │ ├── sign.js │ │ │ └── locale │ │ │ │ ├── easyui-lang-zh_TW.js │ │ │ │ ├── easyui-lang-af.js │ │ │ │ ├── easyui-lang-da.js │ │ │ │ ├── easyui-lang-nl.js │ │ │ │ ├── easyui-lang-en.js │ │ │ │ ├── easyui-lang-bg.js │ │ │ │ ├── easyui-lang-cs.js │ │ │ │ ├── easyui-lang-ca.js │ │ │ │ ├── easyui-lang-de.js │ │ │ │ ├── easyui-lang-fr.js │ │ │ │ └── easyui-lang-zh_CN.js │ │ ├── jsonview │ │ │ └── jquery.json-viewer.css │ │ ├── pagejs │ │ │ └── common.js │ │ └── css │ │ │ ├── default.css │ │ │ └── default.css.bak │ ├── templates │ │ ├── monitor │ │ │ └── api-log.html │ │ ├── user │ │ │ └── role-list.html │ │ ├── struct │ │ │ ├── json-preview.html │ │ │ └── struct-list.html │ │ └── api │ │ │ └── api-list.html │ └── type-struct-tpl.json │ └── java │ └── com │ └── zhiyong │ └── gateway │ ├── admin │ ├── config │ │ └── RedisSessionConfig.java │ ├── model │ │ ├── ApiVo.java │ │ ├── LoginUser.java │ │ └── TypeStruct.java │ ├── common │ │ └── AdminConstant.java │ └── controller │ │ └── MonitorController.java │ ├── server │ ├── processor │ │ ├── ApiProcessor.java │ │ └── impl │ │ │ ├── TenantContextProcessor.java │ │ │ ├── LoginCheckProcessor.java │ │ │ ├── AuthCheckProcessor.java │ │ │ ├── FlowControlProcessor.java │ │ │ ├── ServiceInvokeProcessor.java │ │ │ └── callback │ │ │ └── CallbackConfigLoadProcessor.java │ ├── Application.java │ ├── configuration │ │ └── ThreadPoolConfig.java │ └── constant │ │ └── RequestHeaderConstant.java │ └── common │ └── filter │ └── CorsFilter.java ├── api-gateway-common ├── src │ └── main │ │ └── java │ │ └── com │ │ └── zhiyong │ │ └── gateway │ │ └── common │ │ ├── errorcode │ │ ├── ErrorCode.java │ │ └── CommonErrorCode.java │ │ ├── model │ │ ├── PageResult.java │ │ ├── Response.java │ │ └── PageRequest.java │ │ ├── constant │ │ ├── ParamConstant.java │ │ ├── CacheConstant.java │ │ └── CommonConstant.java │ │ ├── enums │ │ ├── ApiType.java │ │ ├── ApiMetrics.java │ │ ├── ApiState.java │ │ ├── TypeStructState.java │ │ └── ErrorCode.java │ │ ├── exception │ │ └── GatewayException.java │ │ └── util │ │ └── AssertUtil.java └── pom.xml ├── api-gateway-dal └── src │ └── main │ ├── java │ └── com │ │ └── zhiyong │ │ └── gateway │ │ └── dal │ │ ├── domain │ │ ├── ApiCfgExt.java │ │ └── AuthExt.java │ │ └── dao │ │ ├── ApiCountExtMapper.java │ │ ├── UserExtMapper.java │ │ └── ApiCfgExtMapper.java │ └── resources │ └── mapper │ ├── UserExtMapper.xml │ └── ApiCountExtMapper.xml ├── api-gateway-biz └── src │ └── main │ ├── java │ └── com │ │ └── zhiyong │ │ └── gateway │ │ └── biz │ │ ├── configuration │ │ └── ElasticJobConfig.java │ │ ├── model │ │ ├── ApiUser.java │ │ ├── ApiParams.java │ │ ├── ApiCache.java │ │ ├── ServiceRequest.java │ │ ├── ApiResult.java │ │ ├── BaseRequest.java │ │ └── ApiRequest.java │ │ ├── service │ │ ├── RpcProxyService.java │ │ ├── OptLogService.java │ │ ├── MonitorService.java │ │ ├── ApiCountService.java │ │ ├── StructConfigService.java │ │ ├── UserService.java │ │ └── impl │ │ │ └── OptLogServiceImpl.java │ │ ├── cache │ │ ├── ApiConfigLocalCache.java │ │ └── ApiConfigCache.java │ │ ├── job │ │ └── CountApiInvokeDataJob.java │ │ └── listener │ │ └── ConfigChangeMessageListener.java │ └── resources │ └── elasticjob-config.xml ├── .gitignore ├── api-gateway-facade ├── src │ └── main │ │ └── java │ │ └── com │ │ └── zhiyong │ │ └── gateway │ │ └── facade │ │ ├── model │ │ ├── Teacher.java │ │ ├── Live.java │ │ ├── Module.java │ │ ├── Course.java │ │ ├── Answer.java │ │ └── Question.java │ │ └── tools │ │ ├── PojoTypeParserTest.java │ │ └── TypeStruct.java └── pom.xml ├── api-gateway-model └── pom.xml └── api-gateway-integration └── pom.xml /api-gateway-server/src/main/resources/static/doc/help.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/doc/help.pdf -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/images/网关截图1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/images/网关截图1.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/images/网关截图2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/images/网关截图2.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/images/网关截图3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/images/网关截图3.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/images/网关截图4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/images/网关截图4.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/images/网关截图5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/images/网关截图5.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/images/网关截图6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/images/网关截图6.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/images/blocks.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/images/blocks.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/images/nav_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/images/nav_link.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/images/noscript.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/images/noscript.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/images/postman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/images/postman.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/images/tabicons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/images/tabicons.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/images/directory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/images/directory.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/images/plugin_big.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/images/plugin_big.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/icons/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/icons/back.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/icons/cut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/icons/cut.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/icons/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/icons/help.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/icons/no.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/icons/no.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/icons/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/icons/ok.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/icons/redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/icons/redo.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/icons/undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/icons/undo.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/images/CategorizeMenu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/images/CategorizeMenu.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/images/TableDrawTable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/images/TableDrawTable.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/images/gateway-design.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/images/gateway-design.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/icons/cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/icons/cancel.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/icons/pencil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/icons/pencil.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/icons/print.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/icons/print.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/icons/reload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/icons/reload.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/icons/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/icons/search.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/images/gateway-technical.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/images/gateway-technical.jpg -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/icons/edit_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/icons/edit_add.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/icons/filesave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/icons/filesave.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/images/layout-browser-hd-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/images/layout-browser-hd-bg.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/images/tools-sprites-trans.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/images/tools-sprites-trans.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/Thumbs.db -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/menu.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/menu.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/icons/edit_remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/icons/edit_remove.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/Thumbs.db -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/menu.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/menu.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/menu_sep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/menu_sep.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/images/ShowCustomPropertiesPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/images/ShowCustomPropertiesPage.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/tabs_close.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/tabs_close.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/tree_file.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/tree_file.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/menu_sep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/menu_sep.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/tabs_close.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/tabs_close.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/tree_file.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/tree_file.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/button_a_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/button_a_bg.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/combo_arrow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/combo_arrow.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/datebox_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/datebox_arrow.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/messager_info.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/messager_info.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/panel_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/panel_loading.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/panel_title.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/panel_title.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/panel_tools.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/panel_tools.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/tabs_enabled.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/tabs_enabled.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/tree_arrows.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/tree_arrows.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/tree_dnd_no.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/tree_dnd_no.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/tree_dnd_yes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/tree_dnd_yes.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/tree_folder.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/tree_folder.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/tree_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/tree_loading.gif -------------------------------------------------------------------------------- /api-gateway-common/src/main/java/com/zhiyong/gateway/common/errorcode/ErrorCode.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.common.errorcode; 2 | 3 | public interface ErrorCode { 4 | int getCode(); 5 | 6 | String getMsg(); 7 | } 8 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/button_a_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/button_a_bg.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/combo_arrow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/combo_arrow.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/panel_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/panel_title.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/panel_tools.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/panel_tools.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/tabs_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/tabs_active.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/tabs_enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/tabs_enabled.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/tree_arrows.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/tree_arrows.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/tree_dnd_no.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/tree_dnd_no.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/tree_dnd_yes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/tree_dnd_yes.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/tree_folder.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/tree_folder.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/tree_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/tree_loading.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/button_span_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/button_span_bg.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/menu_downarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/menu_downarrow.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/menu_rightarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/menu_rightarrow.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/messager_error.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/messager_error.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/pagination_last.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/pagination_last.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/pagination_load.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/pagination_load.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/pagination_next.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/pagination_next.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/pagination_prev.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/pagination_prev.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/tabs_leftarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/tabs_leftarrow.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/tabs_rightarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/tabs_rightarrow.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/tree_checkbox_0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/tree_checkbox_0.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/tree_checkbox_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/tree_checkbox_1.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/tree_checkbox_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/tree_checkbox_2.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/button_span_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/button_span_bg.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/datebox_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/datebox_arrow.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/menu_downarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/menu_downarrow.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/menu_rightarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/menu_rightarrow.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/messager_error.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/messager_error.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/messager_info.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/messager_info.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/pagination_last.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/pagination_last.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/pagination_load.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/pagination_load.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/pagination_next.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/pagination_next.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/pagination_prev.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/pagination_prev.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/panel_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/panel_loading.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/tabs_leftarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/tabs_leftarrow.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/tabs_rightarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/tabs_rightarrow.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/tree_checkbox_0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/tree_checkbox_0.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/tree_checkbox_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/tree_checkbox_1.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/tree_checkbox_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/tree_checkbox_2.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/accordion_collapse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/accordion_collapse.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/accordion_expand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/accordion_expand.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/button_plain_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/button_plain_hover.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/calendar_nextmonth.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/calendar_nextmonth.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/calendar_nextyear.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/calendar_nextyear.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/calendar_prevmonth.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/calendar_prevmonth.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/calendar_prevyear.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/calendar_prevyear.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/datagrid_header_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/datagrid_header_bg.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/datagrid_sort_asc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/datagrid_sort_asc.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/datagrid_sort_desc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/datagrid_sort_desc.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/datagrid_title_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/datagrid_title_bg.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/layout_button_down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/layout_button_down.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/layout_button_left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/layout_button_left.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/layout_button_up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/layout_button_up.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/messager_question.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/messager_question.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/messager_warning.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/messager_warning.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/pagination_first.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/pagination_first.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/pagination_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/pagination_loading.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/panel_tool_expand.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/panel_tool_expand.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/spinner_arrow_down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/spinner_arrow_down.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/spinner_arrow_up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/spinner_arrow_up.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/tree_folder_open.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/tree_folder_open.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/accordion_expand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/accordion_expand.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/calendar_nextyear.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/calendar_nextyear.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/calendar_prevyear.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/calendar_prevyear.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/datagrid_sort_asc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/datagrid_sort_asc.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/datagrid_title_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/datagrid_title_bg.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/layout_button_up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/layout_button_up.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/messager_question.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/messager_question.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/messager_warning.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/messager_warning.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/pagination_first.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/pagination_first.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/panel_tool_expand.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/panel_tool_expand.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/spinner_arrow_up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/spinner_arrow_up.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/tree_folder_open.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/tree_folder_open.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/datagrid_row_expand.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/datagrid_row_expand.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/layout_button_right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/layout_button_right.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/menu_split_downarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/menu_split_downarrow.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/panel_tool_collapse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/panel_tool_collapse.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/validatebox_pointer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/validatebox_pointer.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/validatebox_warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/validatebox_warning.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/accordion_collapse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/accordion_collapse.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/button_plain_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/button_plain_hover.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/calendar_nextmonth.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/calendar_nextmonth.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/calendar_prevmonth.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/calendar_prevmonth.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/datagrid_header_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/datagrid_header_bg.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/datagrid_row_expand.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/datagrid_row_expand.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/datagrid_sort_desc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/datagrid_sort_desc.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/layout_button_down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/layout_button_down.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/layout_button_left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/layout_button_left.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/layout_button_right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/layout_button_right.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/menu_split_downarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/menu_split_downarrow.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/pagination_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/pagination_loading.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/panel_tool_collapse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/panel_tool_collapse.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/spinner_arrow_down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/spinner_arrow_down.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/validatebox_pointer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/validatebox_pointer.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/validatebox_warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/validatebox_warning.png -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/images/datagrid_row_collapse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/gray/images/datagrid_row_collapse.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/images/datagrid_row_collapse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoomtech2021/api-gateway/HEAD/api-gateway-server/src/main/resources/static/js/themes/default/images/datagrid_row_collapse.gif -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/combobox.css: -------------------------------------------------------------------------------- 1 | .combobox-item{ 2 | padding:2px; 3 | font-size:12px; 4 | padding:3px; 5 | padding-right:0px; 6 | } 7 | .combobox-item-hover{ 8 | background:#fafafa; 9 | } 10 | .combobox-item-selected{ 11 | background:#FBEC88; 12 | } -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/combobox.css: -------------------------------------------------------------------------------- 1 | .combobox-item{ 2 | padding:2px; 3 | font-size:12px; 4 | padding:3px; 5 | padding-right:0px; 6 | } 7 | .combobox-item-hover{ 8 | background:#fafafa; 9 | } 10 | .combobox-item-selected{ 11 | background:#FBEC88; 12 | } -------------------------------------------------------------------------------- /api-gateway-dal/src/main/java/com/zhiyong/gateway/dal/domain/ApiCfgExt.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.dal.domain; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * @ClassName ApiCfgExt 7 | * @Description: TODO 8 | * @Author 毛军锐 9 | * @Date 2020/11/27 下午9:01 10 | **/ 11 | @Data 12 | public class ApiCfgExt extends ApiCfg { 13 | 14 | private String groupName; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /api-gateway-dal/src/main/java/com/zhiyong/gateway/dal/domain/AuthExt.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.dal.domain; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * @ClassName AuthExt 7 | * @Description: TODO 8 | * @Author 毛军锐 9 | * @Date 2020/12/22 下午2:22 10 | **/ 11 | @Data 12 | public class AuthExt extends Auth { 13 | 14 | private String account; 15 | private String groupName; 16 | } 17 | -------------------------------------------------------------------------------- /api-gateway-biz/src/main/java/com/zhiyong/gateway/biz/configuration/ElasticJobConfig.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.biz.configuration; 2 | 3 | 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.context.annotation.ImportResource; 6 | 7 | @Configuration 8 | @ImportResource(locations = {"classpath:elasticjob-config.xml"}) 9 | public class ElasticJobConfig { 10 | } 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | **/bin/** 4 | 5 | ### STS ### 6 | .apt_generated 7 | .classpath 8 | .factorypath 9 | .project 10 | .settings 11 | .springBeans 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | nbproject/private/ 21 | build/ 22 | nbbuild/ 23 | dist/ 24 | nbdist/ 25 | .nb-gradle/ 26 | .mvn 27 | logs 28 | .DS_Store 29 | -------------------------------------------------------------------------------- /api-gateway-biz/src/main/java/com/zhiyong/gateway/biz/model/ApiUser.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.biz.model; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | 6 | /** 7 | * @ClassName ApiUser 8 | * @Description: api请求用户 9 | * @Author 毛军锐 10 | * @Date 2020/12/1 下午2:03 11 | **/ 12 | @Data 13 | @Builder 14 | public class ApiUser { 15 | private Long userId; 16 | private Long userName; 17 | private Long tenantId; 18 | } 19 | -------------------------------------------------------------------------------- /api-gateway-common/src/main/java/com/zhiyong/gateway/common/model/PageResult.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.common.model; 2 | 3 | import java.util.List; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | 7 | /** 8 | * @ClassName PageResult 9 | * @Description: 分页对象 10 | * @Author 毛军锐 11 | * @Date 2020/11/26 下午8:01 12 | **/ 13 | @Data 14 | @Builder 15 | public class PageResult { 16 | private long total; 17 | private List rows; 18 | private int pageNum; 19 | private int pageSize; 20 | } 21 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/java/com/zhiyong/gateway/admin/config/RedisSessionConfig.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.admin.config; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession; 5 | 6 | /** 7 | * @ClassName RedisSessionConfig 8 | * @Description: TODO 9 | * @Author 毛军锐 10 | * @Date 2020/12/1 下午1:44 11 | **/ 12 | @Configuration 13 | @EnableRedisHttpSession 14 | public class RedisSessionConfig { 15 | } 16 | -------------------------------------------------------------------------------- /api-gateway-facade/src/main/java/com/zhiyong/gateway/facade/model/Teacher.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.facade.model; 2 | 3 | import java.io.Serializable; 4 | import lombok.Data; 5 | 6 | /** 7 | * @ClassName Teacher 8 | * @Description: TODO 9 | * @Author 毛军锐 10 | * @Date 2020/12/3 下午11:43 11 | **/ 12 | @Data 13 | public class Teacher implements Serializable { 14 | private static final long serialVersionUID = 8017524915434020989L; 15 | private Long id; 16 | private String name; 17 | private String sku; 18 | private int age; 19 | } 20 | -------------------------------------------------------------------------------- /api-gateway-common/src/main/java/com/zhiyong/gateway/common/constant/ParamConstant.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.common.constant; 2 | 3 | /** 4 | * @ClassName ParamConstant 5 | * @Description: 参数变量常量 6 | * @Author 毛军锐 7 | * @Date 2020/12/3 下午8:01 8 | **/ 9 | public class ParamConstant { 10 | 11 | public static final String NAME = "name"; 12 | public static final String TYPE = "type"; 13 | public static final String DESC = "desc"; 14 | public static final String CHILDREN = "children"; 15 | public static final String MAP = "map"; 16 | } 17 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/menubutton.css: -------------------------------------------------------------------------------- 1 | .m-btn-downarrow{ 2 | display:inline-block; 3 | width:12px; 4 | background:url('images/menu_downarrow.png') no-repeat 4px 6px; 5 | } 6 | 7 | a.m-btn-active{ 8 | background-position: bottom right; 9 | } 10 | a.m-btn-active span.l-btn-left{ 11 | background-position: bottom left; 12 | } 13 | a.m-btn-plain-active{ 14 | background:transparent; 15 | border:1px solid #7eabcd; 16 | _padding:0px 5px 0px 0px; 17 | -moz-border-radius:3px; 18 | -webkit-border-radius: 3px; 19 | } 20 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/menubutton.css: -------------------------------------------------------------------------------- 1 | .m-btn-downarrow{ 2 | display:inline-block; 3 | width:12px; 4 | background:url('images/menu_downarrow.png') no-repeat 4px 6px; 5 | } 6 | 7 | a.m-btn-active{ 8 | background-position: bottom right; 9 | } 10 | a.m-btn-active span.l-btn-left{ 11 | background-position: bottom left; 12 | } 13 | a.m-btn-plain-active{ 14 | background:transparent; 15 | border:1px solid #d3d3d3; 16 | _padding:0px 5px 0px 0px; 17 | -moz-border-radius:3px; 18 | -webkit-border-radius: 3px; 19 | } 20 | -------------------------------------------------------------------------------- /api-gateway-common/src/main/java/com/zhiyong/gateway/common/model/Response.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.common.model; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * @author tumingjian 创建时间: 2020-11-18 17:23 功能说明: 7 | */ 8 | public interface Response extends Serializable { 9 | /** 10 | * 响应code码 11 | * @return 12 | */ 13 | int getCode(); 14 | 15 | /** 16 | * 响应消息.一般在返回错误码时才关注消息 17 | * @return 18 | */ 19 | String getMsg(); 20 | 21 | /** 22 | * 结果数据 23 | * @return 24 | */ 25 | T getData(); 26 | } 27 | -------------------------------------------------------------------------------- /api-gateway-facade/src/main/java/com/zhiyong/gateway/facade/model/Live.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.facade.model; 2 | 3 | import java.io.Serializable; 4 | import lombok.Data; 5 | 6 | /** 7 | * @ClassName LiveModel 8 | * @Description: TODO 9 | * @Author 毛军锐 10 | * @Date 2020/12/3 下午11:42 11 | **/ 12 | @Data 13 | public class Live implements Serializable { 14 | 15 | private static final long serialVersionUID = -4679912676096177203L; 16 | private Long id; 17 | private Course course; 18 | private Teacher teacher; 19 | private Question[] questions; 20 | } 21 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/dialog.css: -------------------------------------------------------------------------------- 1 | .dialog-content{ 2 | overflow:auto; 3 | } 4 | .dialog-toolbar{ 5 | background:#fafafa; 6 | padding:2px 5px; 7 | border-bottom:1px solid #eee; 8 | } 9 | .dialog-tool-separator{ 10 | float:left; 11 | height:24px; 12 | border-left:1px solid #ccc; 13 | border-right:1px solid #fff; 14 | margin:2px 1px; 15 | } 16 | .dialog-button{ 17 | border-top:1px solid #eee; 18 | background:#fafafa; 19 | padding:5px 5px; 20 | text-align:right; 21 | } 22 | .dialog-button .l-btn{ 23 | margin-left:5px; 24 | } -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/dialog.css: -------------------------------------------------------------------------------- 1 | .dialog-content{ 2 | overflow:auto; 3 | } 4 | .dialog-toolbar{ 5 | background:#fafafa; 6 | padding:2px 5px; 7 | border-bottom:1px solid #eee; 8 | } 9 | .dialog-tool-separator{ 10 | float:left; 11 | height:24px; 12 | border-left:1px solid #ccc; 13 | border-right:1px solid #fff; 14 | margin:2px 1px; 15 | } 16 | .dialog-button{ 17 | border-top:1px solid #eee; 18 | background:#fafafa; 19 | padding:5px 5px; 20 | text-align:right; 21 | } 22 | .dialog-button .l-btn{ 23 | margin-left:5px; 24 | } -------------------------------------------------------------------------------- /api-gateway-facade/src/main/java/com/zhiyong/gateway/facade/model/Module.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.facade.model; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | import lombok.Data; 6 | 7 | /** 8 | * @ClassName Module 9 | * @Description: TODO 10 | * @Author 毛军锐 11 | * @Date 2020/12/3 下午11:44 12 | **/ 13 | @Data 14 | public class Module implements Serializable { 15 | private static final long serialVersionUID = 1486339284747460095L; 16 | private Long id; 17 | private String name; 18 | private List courses; 19 | private List lives; 20 | } 21 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/java/com/zhiyong/gateway/admin/model/ApiVo.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.admin.model; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | 6 | /** 7 | * @ClassName ApiVo 8 | * @Description: TODO 9 | * @Author 毛军锐 10 | * @Date 2020/12/10 下午6:13 11 | **/ 12 | @Data 13 | @Builder 14 | public class ApiVo { 15 | private Integer id; 16 | private String method; 17 | private String apiName; 18 | private String apiDesc; 19 | private String apiVersion; 20 | private Integer apiType; 21 | private Integer needLogin; 22 | private String httpMethod; 23 | } 24 | -------------------------------------------------------------------------------- /api-gateway-facade/src/main/java/com/zhiyong/gateway/facade/model/Course.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.facade.model; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | import lombok.Data; 6 | 7 | /** 8 | * @ClassName Course 9 | * @Description: TODO 10 | * @Author 毛军锐 11 | * @Date 2020/12/3 下午11:42 12 | **/ 13 | @Data 14 | public class Course implements Serializable { 15 | private static final long serialVersionUID = -5044959402198845281L; 16 | 17 | private Long id; 18 | private String name; 19 | private String desc; 20 | private int type; 21 | private int sku; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /api-gateway-facade/src/main/java/com/zhiyong/gateway/facade/model/Answer.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.facade.model; 2 | 3 | import java.io.Serializable; 4 | import lombok.Data; 5 | 6 | /** 7 | * @ClassName Answer 8 | * @Description: TODO 9 | * @Author 毛军锐 10 | * @Date 2020/12/5 上午11:24 11 | **/ 12 | @Data 13 | public class Answer implements Serializable { 14 | private static final long serialVersionUID = 2609403705968421420L; 15 | 16 | private Long id; 17 | private String indexNo; 18 | private String desc; 19 | private int score; 20 | private String imgUrl; 21 | private String videoUrl; 22 | } 23 | -------------------------------------------------------------------------------- /api-gateway-dal/src/main/java/com/zhiyong/gateway/dal/dao/ApiCountExtMapper.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.dal.dao; 2 | 3 | import com.zhiyong.gateway.dal.domain.ApiCount; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | /** 8 | * @ClassName ApiCountExtMapper 9 | * @Description: TODO 10 | * @Author 毛军锐 11 | * @Date 2020/12/9 下午4:44 12 | **/ 13 | public interface ApiCountExtMapper { 14 | 15 | List queryApiCount(@Param("apiName") String apiName, @Param("startTime") String startTime, 16 | @Param("endTime") String endTime, @Param("sort") String sort); 17 | } 18 | -------------------------------------------------------------------------------- /api-gateway-biz/src/main/java/com/zhiyong/gateway/biz/service/RpcProxyService.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.biz.service; 2 | 3 | import com.zhiyong.gateway.biz.model.ServiceRequest; 4 | import com.zhiyong.gateway.common.exception.GatewayException; 5 | 6 | /** 7 | * @ClassName RpcProxyService 8 | * @Description: rpc远程调用代理接口 9 | * @Author 毛军锐 10 | * @Date 2020/11/24 下午8:18 11 | **/ 12 | public interface RpcProxyService { 13 | 14 | /** 15 | * 远程方法调用 16 | * 17 | * @param request 18 | * @return 19 | * @throws GatewayException 20 | */ 21 | Object invoke(ServiceRequest request) throws GatewayException; 22 | } 23 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/java/com/zhiyong/gateway/server/processor/ApiProcessor.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.server.processor; 2 | 3 | import com.zhiyong.gateway.common.exception.GatewayException; 4 | import com.zhiyong.gateway.server.context.ApiContext; 5 | 6 | /** 7 | * @ClassName ApiProcessor 8 | * @Description: API处理器 9 | * @Author 毛军锐 10 | * @Date 2020/11/25 上午11:37 11 | **/ 12 | public interface ApiProcessor { 13 | 14 | /** 15 | * 处理器名称 16 | */ 17 | String getName(); 18 | 19 | /** 20 | * 处理操作 21 | * @param context 22 | */ 23 | void run(ApiContext context) throws GatewayException; 24 | } 25 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/java/com/zhiyong/gateway/admin/common/AdminConstant.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.admin.common; 2 | 3 | /** 4 | * @ClassName AdminConstant 5 | * @Description: TODO 6 | * @Author 毛军锐 7 | * @Date 2020/12/1 上午10:28 8 | **/ 9 | public class AdminConstant { 10 | 11 | /** 12 | * 登录用户 13 | */ 14 | public static final String LOGIN_USER = "GATEWAY:LOGIN_USER"; 15 | 16 | /** 17 | * 登录验证码 18 | */ 19 | public static final String LOGIN_IMG_CODE = "GATEWAY:LOGIN_IMG_CODE"; 20 | 21 | /** 22 | * 登录状态过期时间,默认2小时 23 | */ 24 | public static final int LOGIN_TIMEOUT = 2 * 3600; 25 | } 26 | -------------------------------------------------------------------------------- /api-gateway-biz/src/main/java/com/zhiyong/gateway/biz/model/ApiParams.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.biz.model; 2 | 3 | import java.util.Map; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | 7 | /** 8 | * @ClassName ApiParamsDto 9 | * @Description: api请求参数对象 10 | * @Author 毛军锐 11 | * @Date 2020/11/25 上午10:49 12 | **/ 13 | @Data 14 | @Builder 15 | public class ApiParams { 16 | /** 17 | * 参数类型列表 18 | */ 19 | private String[] paramTypes; 20 | 21 | /** 22 | * 参数值列表 23 | */ 24 | private Object[] paramValues; 25 | 26 | /** 27 | * 签名参数集合 28 | */ 29 | private Map signParams; 30 | } 31 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/java/com/zhiyong/gateway/admin/model/LoginUser.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.admin.model; 2 | 3 | import java.io.Serializable; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | 7 | /** 8 | * @ClassName LoginUser 9 | * @Description: 登录用户 10 | * @Author 毛军锐 11 | * @Date 2020/11/25 下午10:52 12 | **/ 13 | @Data 14 | @Builder 15 | public class LoginUser implements Serializable { 16 | 17 | private static final long serialVersionUID = -4864623167237522411L; 18 | /** 19 | * 用户ID 20 | */ 21 | private Integer userId; 22 | 23 | /** 24 | * 用户名 25 | */ 26 | private String userName; 27 | } 28 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/sign.js: -------------------------------------------------------------------------------- 1 | function doSign(params, appSecret) { 2 | if (!(typeof params == "object")) { 3 | alert('签名参数格式错误'); 4 | return; 5 | } 6 | var paramArr = []; 7 | for (var key in params) { 8 | if(key == 'session' || key == 'tenantId'){ 9 | continue; 10 | } 11 | var value = params[key]; 12 | if (value && value != '') { 13 | paramArr.push(key + params[key]); 14 | } 15 | } 16 | var sortParams = paramArr.sort().join(''); 17 | var hmacSign = hex_hmac_md5(appSecret, sortParams); 18 | return hmacSign.toUpperCase(); 19 | } 20 | -------------------------------------------------------------------------------- /api-gateway-common/src/main/java/com/zhiyong/gateway/common/enums/ApiType.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.common.enums; 2 | 3 | /** 4 | * @ClassName ApiType 5 | * @Description: TODO 6 | * @Author 毛军锐 7 | * @Date 2020/11/27 下午10:03 8 | **/ 9 | public enum ApiType { 10 | API(0, "普通API"), 11 | CALL_BACK(1, "回调API"), 12 | ; 13 | 14 | private int code; 15 | private String desc; 16 | 17 | ApiType(int code, String desc) { 18 | this.code = code; 19 | this.desc = desc; 20 | } 21 | 22 | public int getCode() { 23 | return code; 24 | } 25 | 26 | public String getDesc() { 27 | return desc; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /api-gateway-dal/src/main/java/com/zhiyong/gateway/dal/dao/UserExtMapper.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.dal.dao; 2 | 3 | import com.zhiyong.gateway.dal.domain.ApiCfg; 4 | import com.zhiyong.gateway.dal.domain.AuthExt; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | /** 9 | * @ClassName UserExtMapper 10 | * @Description: TODO 11 | * @Author 毛军锐 12 | * @Date 2020/12/22 下午2:23 13 | **/ 14 | public interface UserExtMapper { 15 | 16 | /** 17 | * 查询权限列表 18 | * @param account 19 | * @param sort 20 | * @return 21 | */ 22 | List queryAuthList(@Param("account") String account, @Param("sort") String sort); 23 | } 24 | -------------------------------------------------------------------------------- /api-gateway-facade/src/main/java/com/zhiyong/gateway/facade/tools/PojoTypeParserTest.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.facade.tools; 2 | 3 | import com.zhiyong.gateway.facade.model.Question; 4 | import java.util.List; 5 | import org.junit.Test; 6 | 7 | /** 8 | * @ClassName PojoTypeParserTest 9 | * @Description: TODO 10 | * @Author 毛军锐 11 | * @Date 2020/12/8 下午4:56 12 | **/ 13 | public class PojoTypeParserTest { 14 | 15 | @Test 16 | public void test() { 17 | String typeName = "questions"; 18 | String typeJson = new PojoTypeParser>>() { 19 | }.run(typeName).toJson(); 20 | 21 | System.out.println(typeJson); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /api-gateway-common/src/main/java/com/zhiyong/gateway/common/constant/CacheConstant.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.common.constant; 2 | 3 | /** 4 | * @ClassName CacheConstant 5 | * @Description: TODO 6 | * @Author 毛军锐 7 | * @Date 2020/12/21 上午10:38 8 | **/ 9 | public class CacheConstant { 10 | 11 | /** 12 | * 默认2年 13 | */ 14 | public static final int API_CONFIG_REDIS_EXPIRED = 2 * 365 * 24 * 3600; 15 | 16 | /** 17 | * 默认7天 18 | */ 19 | public static final int API_CONFIG_LOCAL_EXPIRED = 7 * 24 * 3600; 20 | 21 | /** 22 | * 本地缓存清除消息topic 23 | */ 24 | public static final String LOCAL_CACHE_CONFIG_CLEAR_TOPIC = "gateway:local-cache-config-clear"; 25 | } 26 | -------------------------------------------------------------------------------- /api-gateway-biz/src/main/java/com/zhiyong/gateway/biz/service/OptLogService.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.biz.service; 2 | 3 | import com.github.pagehelper.PageInfo; 4 | import com.zhiyong.gateway.common.model.PageRequest; 5 | import com.zhiyong.gateway.dal.domain.OptLog; 6 | 7 | /** 8 | * @ClassName OptLogService 9 | * @Description: TODO 10 | * @Author 毛军锐 11 | * @Date 2020/12/22 上午11:01 12 | **/ 13 | public interface OptLogService { 14 | 15 | /** 16 | * 保存操作日志 17 | * @param optLog 18 | */ 19 | void saveOptLog(OptLog optLog); 20 | 21 | /** 22 | * 分页查询LOG 23 | * @return 24 | */ 25 | PageInfo pagerOptLog(String content, PageRequest pageRequest); 26 | } 27 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/templates/monitor/api-log.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 致用网关平台-ZYAPI 6 | 7 | 8 | 9 | 10 | 11 |
12 |

攻城狮正在加班开发中,敬请期待。

13 |
14 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/templates/user/role-list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 致用网关平台-ZYAPI 6 | 7 | 8 | 9 | 10 | 11 |
12 |

攻城狮正在加班开发中,敬请期待。

13 |
14 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/datebox.css: -------------------------------------------------------------------------------- 1 | .datebox .combo-arrow{ 2 | background:url('images/datebox_arrow.png') no-repeat center center; 3 | } 4 | .datebox-calendar-inner{ 5 | height:180px; 6 | } 7 | .datebox-button{ 8 | height:18px; 9 | padding:2px 5px; 10 | font-size:12px; 11 | background-color:#fafafa; 12 | text-align:center; 13 | } 14 | .datebox-current,.datebox-close{ 15 | float:left; 16 | color:#888; 17 | text-decoration:none; 18 | font-weight:bold; 19 | } 20 | .datebox-close{ 21 | float:right; 22 | } 23 | .datebox-ok{ 24 | color:#888; 25 | text-decoration:none; 26 | font-weight:bold; 27 | } 28 | .datebox-button-hover{ 29 | color:#A4BED4; 30 | } 31 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/datebox.css: -------------------------------------------------------------------------------- 1 | .datebox .combo-arrow{ 2 | background:url('images/datebox_arrow.png') no-repeat center center; 3 | } 4 | .datebox-calendar-inner{ 5 | height:180px; 6 | } 7 | .datebox-button{ 8 | height:18px; 9 | padding:2px 5px; 10 | font-size:12px; 11 | background-color:#fafafa; 12 | text-align:center; 13 | } 14 | .datebox-current,.datebox-close{ 15 | float:left; 16 | color:#888; 17 | text-decoration:none; 18 | font-weight:bold; 19 | } 20 | .datebox-close{ 21 | float:right; 22 | } 23 | .datebox-ok{ 24 | color:#888; 25 | text-decoration:none; 26 | font-weight:bold; 27 | } 28 | .datebox-button-hover{ 29 | color:#A4BED4; 30 | } 31 | -------------------------------------------------------------------------------- /api-gateway-dal/src/main/java/com/zhiyong/gateway/dal/dao/ApiCfgExtMapper.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.dal.dao; 2 | 3 | import com.zhiyong.gateway.dal.domain.ApiCfgExt; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | /** 8 | * @ClassName ApiCfgExtMapper 9 | * @Description: TODO 10 | * @Author 毛军锐 11 | * @Date 2020/11/27 下午8:57 12 | **/ 13 | public interface ApiCfgExtMapper { 14 | 15 | /** 16 | * 查询API配置明细 17 | * @param apiName 18 | * @param apiDesc 19 | * @return 20 | */ 21 | List queryApiDetail(@Param("apiName") String apiName, @Param("apiDesc") String apiDesc, 22 | @Param("groupId") Integer groupId, @Param("sort") String sort); 23 | } 24 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/accordion.css: -------------------------------------------------------------------------------- 1 | .accordion{ 2 | background:#fff; 3 | overflow:hidden; 4 | } 5 | .accordion .accordion-header{ 6 | background:#E0ECFF; 7 | border-top-width:0; 8 | cursor:pointer; 9 | } 10 | .accordion .accordion-header .panel-title{ 11 | font-weight:normal; 12 | } 13 | .accordion .accordion-header-selected .panel-title{ 14 | font-weight:bold; 15 | } 16 | .accordion-noborder .accordion-header{ 17 | border-width:0 0 1px; 18 | } 19 | .accordion-noborder .accordion-body{ 20 | border-width:0px; 21 | } 22 | .accordion-collapse{ 23 | background:url('images/accordion_collapse.png') no-repeat; 24 | } 25 | .accordion-expand{ 26 | background:url('images/accordion_expand.png') no-repeat; 27 | } 28 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/accordion.css: -------------------------------------------------------------------------------- 1 | .accordion{ 2 | background:#fff; 3 | overflow:hidden; 4 | } 5 | .accordion .accordion-header{ 6 | background:#efefef; 7 | border-top-width:0; 8 | cursor:pointer; 9 | } 10 | .accordion .accordion-header .panel-title{ 11 | font-weight:normal; 12 | } 13 | .accordion .accordion-header-selected .panel-title{ 14 | font-weight:bold; 15 | } 16 | .accordion-noborder .accordion-header{ 17 | border-width:0 0 1px; 18 | } 19 | .accordion-noborder .accordion-body{ 20 | border-width:0px; 21 | } 22 | .accordion-collapse{ 23 | background:url('images/accordion_collapse.png') no-repeat; 24 | } 25 | .accordion-expand{ 26 | background:url('images/accordion_expand.png') no-repeat; 27 | } 28 | -------------------------------------------------------------------------------- /api-gateway-biz/src/main/java/com/zhiyong/gateway/biz/model/ApiCache.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.biz.model; 2 | 3 | import com.zhiyong.gateway.dal.domain.ApiCfg; 4 | import com.zhiyong.gateway.dal.domain.ApiParamCfg; 5 | import com.zhiyong.gateway.dal.domain.ApiResultCfg; 6 | import java.io.Serializable; 7 | import java.util.List; 8 | import lombok.Builder; 9 | import lombok.Data; 10 | 11 | /** 12 | * @ClassName ApiCache 13 | * @Description: TODO 14 | * @Author 毛军锐 15 | * @Date 2020/12/1 下午8:49 16 | **/ 17 | @Data 18 | public class ApiCache implements Serializable { 19 | private static final long serialVersionUID = 7374601711950263607L; 20 | private ApiCfg apiCfg; 21 | private List paramCfgs; 22 | private List resultCfgs; 23 | } 24 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/java/com/zhiyong/gateway/server/Application.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.server; 2 | 3 | import org.apache.dubbo.config.spring.context.annotation.DubboComponentScan; 4 | import org.mybatis.spring.annotation.MapperScan; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | import org.springframework.context.annotation.ComponentScan; 8 | 9 | @SpringBootApplication 10 | @ComponentScan("com.zhiyong.gateway") 11 | @MapperScan("com.zhiyong.gateway.dal.dao") 12 | @DubboComponentScan(value = {"com.zhiyong.gateway.biz.facade"}) 13 | public class Application { 14 | public static void main(String[] args) { 15 | SpringApplication.run(Application.class, args); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/messager.css: -------------------------------------------------------------------------------- 1 | .messager-body{ 2 | padding:5px 10px; 3 | } 4 | .messager-button{ 5 | text-align:center; 6 | padding-top:10px; 7 | } 8 | .messager-icon{ 9 | float:left; 10 | width:47px; 11 | height:35px; 12 | } 13 | .messager-error{ 14 | background:url('images/messager_error.gif') no-repeat scroll left top; 15 | } 16 | .messager-info{ 17 | background:url('images/messager_info.gif') no-repeat scroll left top; 18 | } 19 | .messager-question{ 20 | background:url('images/messager_question.gif') no-repeat scroll left top; 21 | } 22 | .messager-warning{ 23 | background:url('images/messager_warning.gif') no-repeat scroll left top; 24 | } 25 | .messager-input{ 26 | width: 262px; 27 | border:1px solid #ccc; 28 | } -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/messager.css: -------------------------------------------------------------------------------- 1 | .messager-body{ 2 | padding:5px 10px; 3 | } 4 | .messager-button{ 5 | text-align:center; 6 | padding-top:10px; 7 | } 8 | .messager-icon{ 9 | float:left; 10 | width:47px; 11 | height:35px; 12 | } 13 | .messager-error{ 14 | background:url('images/messager_error.gif') no-repeat scroll left top; 15 | } 16 | .messager-info{ 17 | background:url('images/messager_info.gif') no-repeat scroll left top; 18 | } 19 | .messager-question{ 20 | background:url('images/messager_question.gif') no-repeat scroll left top; 21 | } 22 | .messager-warning{ 23 | background:url('images/messager_warning.gif') no-repeat scroll left top; 24 | } 25 | .messager-input{ 26 | width: 262px; 27 | border:1px solid #ccc; 28 | } -------------------------------------------------------------------------------- /api-gateway-common/src/main/java/com/zhiyong/gateway/common/model/PageRequest.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.common.model; 2 | 3 | import lombok.Data; 4 | import org.apache.commons.lang3.StringUtils; 5 | 6 | /** 7 | * @ClassName PageRequest 8 | * @Description: TODO 9 | * @Author 毛军锐 10 | * @Date 2020/12/9 下午3:37 11 | **/ 12 | @Data 13 | public class PageRequest { 14 | private int page = 1; 15 | private int rows = 10; 16 | private String sort; 17 | private String order = " asc "; 18 | 19 | /** 20 | * 获取排序字段 21 | * 22 | * @return 23 | */ 24 | public String getSortColumn() { 25 | if (StringUtils.isNotBlank(sort)) { 26 | return sort.replaceAll("[A-Z]", "_$0").toLowerCase(); 27 | } 28 | return sort; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /api-gateway-common/src/main/java/com/zhiyong/gateway/common/enums/ApiMetrics.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.common.enums; 2 | 3 | /** 4 | * @ClassName ApiMetrics 5 | * @Description: 监控指标 6 | * @Author 毛军锐 7 | * @Date 2020/12/2 上午12:42 8 | **/ 9 | public enum ApiMetrics { 10 | 11 | TOTAL_COUNT("total_count", "总次数"), 12 | SUCC_COUNT("succ_count", "成功次数"), 13 | TOTAL_SPENDS("total_spends", "总耗时"), 14 | MAX_SPENDS("max_spends", "最大耗时"), 15 | ; 16 | 17 | private String code; 18 | private String desc; 19 | 20 | ApiMetrics(String code, String desc) { 21 | this.code = code; 22 | this.desc = desc; 23 | } 24 | 25 | public String getCode() { 26 | return code; 27 | } 28 | 29 | public String getDesc() { 30 | return desc; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/type-struct-tpl.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "testModel", 3 | "desc": "测试模型", 4 | "type": "com.zhiyong.gateway.facade.model.TestModel", 5 | "collectionType": "java.util.Map", 6 | "children": [{ 7 | "name": "map", 8 | "desc": "测试模型", 9 | "type": "com.zhiyong.gateway.facade.model.TestModel" 10 | }, { 11 | "name": "testModels", 12 | "desc": "测试模型", 13 | "type": "com.zhiyong.gateway.facade.model.TestModel" 14 | }, { 15 | "name": "mapList", 16 | "desc": "测试模型MAP", 17 | "type": "com.zhiyong.gateway.facade.model.TestModel", 18 | "collectionType": "java.util.Map", 19 | "mapping": { 20 | "*": { 21 | "name": "map", 22 | "desc": "测试模型", 23 | "type": "com.zhiyong.gateway.facade.model.TestModel" 24 | } 25 | } 26 | }] 27 | } -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/validatebox.css: -------------------------------------------------------------------------------- 1 | .validatebox-invalid{ 2 | background:#FFFFEE url('images/validatebox_warning.png') no-repeat right 1px; 3 | } 4 | .validatebox-tip{ 5 | position:absolute; 6 | width:200px; 7 | height:auto; 8 | display:none; 9 | z-index:9900000; 10 | } 11 | .validatebox-tip-content{ 12 | display:inline-block; 13 | position:absolute; 14 | top:0px; 15 | left:10px; 16 | padding:3px 5px; 17 | border:1px solid #CC9933; 18 | background:#FFFFCC; 19 | z-index:9900001; 20 | font-size:12px; 21 | } 22 | .validatebox-tip-pointer{ 23 | background:url('images/validatebox_pointer.gif') no-repeat left top; 24 | display:inline-block; 25 | width:10px; 26 | height:19px; 27 | position:absolute; 28 | left:1px; 29 | top:0px; 30 | z-index:9900002; 31 | } -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/validatebox.css: -------------------------------------------------------------------------------- 1 | .validatebox-invalid{ 2 | background:#FFFFEE url('images/validatebox_warning.png') no-repeat right 1px; 3 | } 4 | .validatebox-tip{ 5 | position:absolute; 6 | width:200px; 7 | height:auto; 8 | display:none; 9 | z-index:9900000; 10 | } 11 | .validatebox-tip-content{ 12 | display:inline-block; 13 | position:absolute; 14 | top:0px; 15 | left:10px; 16 | padding:3px 5px; 17 | border:1px solid #CC9933; 18 | background:#FFFFCC; 19 | z-index:9900001; 20 | font-size:12px; 21 | } 22 | .validatebox-tip-pointer{ 23 | background:url('images/validatebox_pointer.gif') no-repeat left top; 24 | display:inline-block; 25 | width:10px; 26 | height:19px; 27 | position:absolute; 28 | left:1px; 29 | top:0px; 30 | z-index:9900002; 31 | } -------------------------------------------------------------------------------- /api-gateway-biz/src/main/java/com/zhiyong/gateway/biz/service/MonitorService.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.biz.service; 2 | 3 | import com.zhiyong.gateway.dal.domain.ApiCount; 4 | import java.util.Date; 5 | 6 | /** 7 | * @ClassName MonitorService 8 | * @Description: 监控服务 9 | * @Author 毛军锐 10 | * @Date 2020/12/1 下午11:44 11 | **/ 12 | public interface MonitorService { 13 | 14 | /** 15 | * 统计API调用情况 16 | * @param method api名称 17 | * @param version 版本号 18 | * @param spends 耗时 19 | * @param isSucc 是否成功 20 | */ 21 | void countCallApi(String method, String version, long spends, boolean isSucc); 22 | 23 | /** 24 | * 获取API调用统计数据 25 | * @param method 26 | * @param version 27 | * @param date 28 | */ 29 | ApiCount getCallApiCount(String method, String version, Date date); 30 | } 31 | -------------------------------------------------------------------------------- /api-gateway-facade/src/main/java/com/zhiyong/gateway/facade/model/Question.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.facade.model; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | import java.util.Map; 6 | import lombok.Data; 7 | 8 | /** 9 | * @ClassName Question 10 | * @Description: TODO 11 | * @Author 毛军锐 12 | * @Date 2020/12/3 下午11:45 13 | **/ 14 | @Data 15 | public class Question implements Serializable { 16 | private static final long serialVersionUID = 2515965040073080345L; 17 | 18 | private Long id; 19 | private String indexNo; 20 | private int answerNum; 21 | private int optionType; 22 | private int required; 23 | private String desc; 24 | private String[] imgUrls; 25 | private String[] videoUrls; 26 | private Map> answers; 27 | private List> answerAll; 28 | } 29 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/java/com/zhiyong/gateway/server/processor/impl/TenantContextProcessor.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.server.processor.impl; 2 | 3 | import com.zhiyong.gateway.common.exception.GatewayException; 4 | import com.zhiyong.gateway.server.context.ApiContext; 5 | import com.zhiyong.gateway.server.processor.ApiProcessor; 6 | import org.springframework.stereotype.Component; 7 | 8 | /** 9 | * @ClassName TenantContextProcessor 10 | * @Description: 租户上下文处理器 11 | * @Author 毛军锐 12 | * @Date 2020/12/4 下午5:24 13 | **/ 14 | @Component 15 | public class TenantContextProcessor implements ApiProcessor { 16 | 17 | @Override 18 | public String getName() { 19 | return TenantContextProcessor.class.getName(); 20 | } 21 | 22 | @Override 23 | public void run(ApiContext context) throws GatewayException { 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /api-gateway-biz/src/main/java/com/zhiyong/gateway/biz/model/ServiceRequest.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.biz.model; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | 6 | /** 7 | * @ClassName ServiceRequest 8 | * @Description: 远程服务调用请求对象 9 | * @Author 毛军锐 10 | * @Date 2020/11/25 下午7:20 11 | **/ 12 | @Data 13 | @Builder 14 | public class ServiceRequest { 15 | 16 | /** 17 | * 接口类名(完整路径) 18 | */ 19 | private String interfaceName; 20 | 21 | /** 22 | * 调用方法名 23 | */ 24 | private String method; 25 | 26 | /** 27 | * 调用接口版本 28 | */ 29 | private String version; 30 | 31 | /** 32 | * 接口调用超时时间 33 | */ 34 | private int timeout; 35 | 36 | /** 37 | * 接口方法参数类型列表 38 | */ 39 | private String[] paramTypes; 40 | 41 | /** 42 | * 接口方法参数值列表 43 | */ 44 | private Object[] paramValues; 45 | } 46 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/combo.css: -------------------------------------------------------------------------------- 1 | .combo{ 2 | display:inline-block; 3 | white-space:nowrap; 4 | font-size:12px; 5 | margin:0; 6 | padding:0; 7 | border:1px solid #d3d3d3; 8 | } 9 | .combo-text{ 10 | font-size:12px; 11 | border:0px; 12 | line-height:20px; 13 | height:20px; 14 | padding:0px; 15 | *height:18px; 16 | *line-height:18px; 17 | _height:18px; 18 | _line-height:18px; 19 | } 20 | .combo-arrow{ 21 | background:#E0ECF9 url('images/combo_arrow.gif') no-repeat 3px 4px; 22 | width:18px; 23 | height:20px; 24 | overflow:hidden; 25 | display:inline-block; 26 | vertical-align:top; 27 | cursor:pointer; 28 | opacity:0.6; 29 | filter:alpha(opacity=60); 30 | } 31 | .combo-arrow-hover{ 32 | opacity:1.0; 33 | filter:alpha(opacity=100); 34 | } 35 | .combo-panel{ 36 | background:#fff; 37 | overflow:auto; 38 | } 39 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/java/com/zhiyong/gateway/server/processor/impl/LoginCheckProcessor.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.server.processor.impl; 2 | 3 | import com.zhiyong.gateway.common.exception.GatewayException; 4 | import com.zhiyong.gateway.server.context.ApiContext; 5 | import com.zhiyong.gateway.server.processor.ApiProcessor; 6 | import lombok.extern.slf4j.Slf4j; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * @ClassName LoginCheckProcessor 11 | * @Description: 登录检查处理器 12 | * @Author 毛军锐 13 | * @Date 2020/11/25 下午1:22 14 | **/ 15 | @Component 16 | @Slf4j 17 | public class LoginCheckProcessor implements ApiProcessor { 18 | 19 | @Override 20 | public String getName() { 21 | return LoginCheckProcessor.class.getName(); 22 | } 23 | 24 | @Override 25 | public void run(ApiContext context) throws GatewayException { 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/combo.css: -------------------------------------------------------------------------------- 1 | .combo{ 2 | display:inline-block; 3 | white-space:nowrap; 4 | font-size:12px; 5 | margin:0; 6 | padding:0; 7 | border:1px solid #A4BED4; 8 | } 9 | .combo-text{ 10 | font-size:12px; 11 | border:0px; 12 | line-height:20px; 13 | height:20px; 14 | padding:0px; 15 | *height:18px; 16 | *line-height:18px; 17 | _height:18px; 18 | _line-height:18px; 19 | } 20 | .combo-arrow{ 21 | background:#E0ECF9 url('images/combo_arrow.gif') no-repeat 3px 4px; 22 | width:18px; 23 | height:20px; 24 | overflow:hidden; 25 | display:inline-block; 26 | vertical-align:top; 27 | cursor:pointer; 28 | opacity:0.6; 29 | filter:alpha(opacity=60); 30 | } 31 | .combo-arrow-hover{ 32 | opacity:1.0; 33 | filter:alpha(opacity=100); 34 | } 35 | .combo-panel{ 36 | background:#fff; 37 | overflow:auto; 38 | } 39 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/java/com/zhiyong/gateway/server/processor/impl/AuthCheckProcessor.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.server.processor.impl; 2 | 3 | import com.zhiyong.gateway.common.exception.GatewayException; 4 | import com.zhiyong.gateway.server.context.ApiContext; 5 | import com.zhiyong.gateway.server.processor.ApiProcessor; 6 | import lombok.extern.slf4j.Slf4j; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * @ClassName AccessAuthCheckProcessor 11 | * @Description: 访问权限检查处理器 12 | * @Author 毛军锐 13 | * @Date 2020/11/25 下午1:25 14 | **/ 15 | @Component 16 | @Slf4j 17 | public class AuthCheckProcessor implements ApiProcessor { 18 | 19 | @Override 20 | public String getName() { 21 | return AuthCheckProcessor.class.getName(); 22 | } 23 | 24 | @Override 25 | public void run(ApiContext context) throws GatewayException { 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/splitbutton.css: -------------------------------------------------------------------------------- 1 | .s-btn-downarrow{ 2 | display:inline-block; 3 | width:16px; 4 | background:url('images/menu_downarrow.png') no-repeat 9px center; 5 | } 6 | 7 | a.s-btn-active{ 8 | background-position: bottom right; 9 | } 10 | a.s-btn-active span.l-btn-left{ 11 | background-position: bottom left; 12 | } 13 | a.s-btn-active .s-btn-downarrow{ 14 | background:url('images/menu_split_downarrow.png') no-repeat 4px -18px; 15 | } 16 | a:hover.l-btn .s-btn-downarrow{ 17 | background:url('images/menu_split_downarrow.png') no-repeat 4px -18px; 18 | } 19 | 20 | a.s-btn-plain-active{ 21 | background:transparent; 22 | border:1px solid #7eabcd; 23 | _padding:0px 5px 0px 0px; 24 | -moz-border-radius:3px; 25 | -webkit-border-radius: 3px; 26 | } 27 | a.s-btn-plain-active .s-btn-downarrow{ 28 | background:url('images/menu_split_downarrow.png') no-repeat 4px -18px; 29 | } -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/splitbutton.css: -------------------------------------------------------------------------------- 1 | .s-btn-downarrow{ 2 | display:inline-block; 3 | width:16px; 4 | background:url('images/menu_downarrow.png') no-repeat 9px center; 5 | } 6 | 7 | a.s-btn-active{ 8 | background-position: bottom right; 9 | } 10 | a.s-btn-active span.l-btn-left{ 11 | background-position: bottom left; 12 | } 13 | a.s-btn-active .s-btn-downarrow{ 14 | background:url('images/menu_split_downarrow.png') no-repeat 4px -18px; 15 | } 16 | a:hover.l-btn .s-btn-downarrow{ 17 | background:url('images/menu_split_downarrow.png') no-repeat 4px -18px; 18 | } 19 | 20 | a.s-btn-plain-active{ 21 | background:transparent; 22 | border:1px solid #d3d3d3; 23 | _padding:0px 5px 0px 0px; 24 | -moz-border-radius:3px; 25 | -webkit-border-radius: 3px; 26 | } 27 | a.s-btn-plain-active .s-btn-downarrow{ 28 | background:url('images/menu_split_downarrow.png') no-repeat 4px -18px; 29 | } -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/templates/struct/json-preview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 网关说明 7 | 8 | 9 | 10 | 11 | 17 | 18 |
19 |
20 |

21 |     
22 |
23 | 24 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/spinner.css: -------------------------------------------------------------------------------- 1 | .spinner{ 2 | display:inline-block; 3 | white-space:nowrap; 4 | font-size:12px; 5 | margin:0; 6 | padding:0; 7 | border:1px solid #A4BED4; 8 | } 9 | .spinner-text{ 10 | font-size:12px; 11 | border:0px; 12 | line-height:20px; 13 | height:20px; 14 | padding:0px; 15 | *height:18px; 16 | *line-height:18px; 17 | _height:18px; 18 | _line-height:18px; 19 | } 20 | .spinner-arrow{ 21 | display:inline-block; 22 | vertical-align:top; 23 | margin:0; 24 | padding:0; 25 | } 26 | .spinner-arrow-up,.spinner-arrow-down{ 27 | display:block; 28 | background:#E0ECF9 url('images/spinner_arrow_up.gif') no-repeat 5px 2px; 29 | font-size:1px; 30 | width:18px; 31 | height:10px; 32 | } 33 | .spinner-arrow-down{ 34 | background:#E0ECF9 url('images/spinner_arrow_down.gif') no-repeat 5px 3px; 35 | } 36 | .spinner-arrow-hover{ 37 | background-color:#ECF9F9; 38 | } -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/spinner.css: -------------------------------------------------------------------------------- 1 | .spinner{ 2 | display:inline-block; 3 | white-space:nowrap; 4 | font-size:12px; 5 | margin:0; 6 | padding:0; 7 | border:1px solid #d3d3d3; 8 | } 9 | .spinner-text{ 10 | font-size:12px; 11 | border:0px; 12 | line-height:20px; 13 | height:20px; 14 | padding:0px; 15 | *height:18px; 16 | *line-height:18px; 17 | _height:18px; 18 | _line-height:18px; 19 | } 20 | .spinner-arrow{ 21 | display:inline-block; 22 | vertical-align:top; 23 | margin:0; 24 | padding:0; 25 | } 26 | .spinner-arrow-up,.spinner-arrow-down{ 27 | display:block; 28 | background:#E0ECF9 url('images/spinner_arrow_up.gif') no-repeat 5px 2px; 29 | font-size:1px; 30 | width:18px; 31 | height:10px; 32 | } 33 | .spinner-arrow-down{ 34 | background:#E0ECF9 url('images/spinner_arrow_down.gif') no-repeat 5px 3px; 35 | } 36 | .spinner-arrow-hover{ 37 | background-color:#ECF9F9; 38 | } -------------------------------------------------------------------------------- /api-gateway-biz/src/main/java/com/zhiyong/gateway/biz/service/ApiCountService.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.biz.service; 2 | 3 | import com.github.pagehelper.PageInfo; 4 | import com.zhiyong.gateway.common.model.PageRequest; 5 | import com.zhiyong.gateway.dal.domain.ApiCount; 6 | import com.zhiyong.gateway.dal.domain.AppCfg; 7 | 8 | /** 9 | * @ClassName ApiCountService 10 | * @Description: Api调用统计接口 11 | * @Author 毛军锐 12 | * @Date 2020/12/9 下午2:16 13 | **/ 14 | public interface ApiCountService { 15 | 16 | /** 17 | * 保存API统计数据 18 | * 19 | * @param apiCount 20 | * @return 21 | */ 22 | int saveApiCount(ApiCount apiCount); 23 | 24 | /** 25 | * 查询API统计数据 26 | * 27 | * @param apiName 28 | * @param startTime 29 | * @param endTime 30 | * @param pageRequest 31 | * @return 32 | */ 33 | PageInfo pagerListApiCount(String apiName, String startTime, String endTime, PageRequest pageRequest); 34 | } 35 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/java/com/zhiyong/gateway/admin/model/TypeStruct.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.admin.model; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | import lombok.Data; 6 | 7 | /** 8 | * @ClassName TypeStruct 9 | * @Description: TODO 10 | * @Author 毛军锐 11 | * @Date 2020/12/3 下午8:51 12 | **/ 13 | @Data 14 | public class TypeStruct { 15 | 16 | /** 17 | * 属性ID 18 | */ 19 | private Long id; 20 | 21 | /** 22 | * 属性名 23 | */ 24 | private String name; 25 | 26 | /** 27 | * 注释 28 | */ 29 | private String desc; 30 | 31 | /** 32 | * 属性类型(POJO:完整的类名) 33 | */ 34 | private String type; 35 | 36 | /** 37 | * 只需要根类型指定:只能是集合类型 38 | */ 39 | private String collectionType; 40 | 41 | /** 42 | * map类型属性 43 | * key:属性名 value:属性值类型 44 | */ 45 | private Map mapping; 46 | 47 | /** 48 | * 属性类型集合 49 | */ 50 | private List children; 51 | } 52 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/jsonview/jquery.json-viewer.css: -------------------------------------------------------------------------------- 1 | ul.json-dict, ol.json-array { 2 | list-style-type: none; 3 | margin: 0 0 0 1px; 4 | border-left: 1px dotted #ccc; 5 | padding-left: 2em 6 | } 7 | 8 | .json-string { 9 | color: #0b7500 10 | } 11 | 12 | .json-literal { 13 | color: #1a01cc; 14 | font-weight: 700 15 | } 16 | 17 | a.json-toggle { 18 | position: relative; 19 | color: inherit; 20 | text-decoration: none 21 | } 22 | 23 | a.json-toggle:focus { 24 | outline: none 25 | } 26 | 27 | a.json-toggle:before { 28 | color: #aaa; 29 | content: "\25BC"; 30 | position: absolute; 31 | display: inline-block; 32 | width: 1em; 33 | left: -1em 34 | } 35 | 36 | a.json-toggle.collapsed:before { 37 | transform: rotate(-90deg); 38 | -ms-transform: rotate(-90deg); 39 | -webkit-transform: rotate(-90deg) 40 | } 41 | 42 | a.json-placeholder { 43 | color: #aaa; 44 | padding: 0 1em; 45 | text-decoration: none 46 | } 47 | 48 | a.json-placeholder:hover { 49 | text-decoration: underline 50 | } -------------------------------------------------------------------------------- /api-gateway-model/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | com.zhiyong.gateway 5 | api-gateway-parent 6 | 1.0.0-SNAPSHOT 7 | ../pom.xml 8 | 9 | 4.0.0 10 | com.zhiyong.gateway 11 | api-gateway-model 12 | ${api-gateway.version} 13 | 14 | api-gateway-model 15 | 16 | 17 | 18 | org.projectlombok 19 | lombok 20 | 21 | 22 | com.alibaba 23 | fastjson 24 | 25 | 26 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/java/com/zhiyong/gateway/server/configuration/ThreadPoolConfig.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.server.configuration; 2 | 3 | import java.util.concurrent.Executor; 4 | import java.util.concurrent.ThreadPoolExecutor; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; 8 | 9 | /** 10 | * @ClassName ThreadPoolConfiguration 11 | * @Description: TODO 12 | * @Author 毛军锐 13 | * @Date 2020/12/1 下午11:51 14 | **/ 15 | @Configuration 16 | public class ThreadPoolConfig { 17 | 18 | @Bean 19 | public Executor threadExecutor() { 20 | ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); 21 | executor.setCorePoolSize(30); 22 | executor.setMaxPoolSize(50); 23 | executor.setQueueCapacity(2000); 24 | executor.setThreadNamePrefix("monitor-thread-"); 25 | executor.setRejectedExecutionHandler(new ThreadPoolExecutor.DiscardOldestPolicy()); 26 | executor.initialize(); 27 | return executor; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /api-gateway-common/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | com.zhiyong.gateway 5 | api-gateway-parent 6 | 1.0.0-SNAPSHOT 7 | ../pom.xml 8 | 9 | 4.0.0 10 | com.zhiyong.gateway 11 | api-gateway-common 12 | ${api-gateway.version} 13 | 14 | api-gateway-common 15 | jar 16 | 17 | 18 | 19 | org.projectlombok 20 | lombok 21 | 22 | 23 | org.apache.commons 24 | commons-lang3 25 | 26 | 27 | -------------------------------------------------------------------------------- /api-gateway-biz/src/main/java/com/zhiyong/gateway/biz/model/ApiResult.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.biz.model; 2 | 3 | import java.io.Serializable; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | 7 | /** 8 | * @ClassName ApiResponse 9 | * @Description: 网关统一响应对象 10 | * @Author 毛军锐 11 | * @Date 2020/11/24 下午8:39 12 | **/ 13 | @Data 14 | @Builder 15 | public class ApiResult implements Serializable { 16 | private static final long serialVersionUID = -4302529587307861184L; 17 | 18 | /** 19 | * 请求唯一ID 20 | */ 21 | private String requestId; 22 | 23 | /** 24 | * 响应状态码 25 | */ 26 | private Integer code = 200; 27 | 28 | /** 29 | * 响应状态描述信息 30 | */ 31 | private String msg = "OK"; 32 | 33 | /** 34 | * 响应对象信息 35 | */ 36 | private Object data; 37 | 38 | /** 39 | * 构建异常对象 40 | * 41 | * @param code 42 | * @param msg 43 | * @return 44 | */ 45 | public static ApiResult buildErrorResult(int code, String msg) { 46 | ApiResult apiResult = ApiResult.builder().build(); 47 | apiResult.setCode(code); 48 | apiResult.setMsg(msg); 49 | return apiResult; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/icon.css: -------------------------------------------------------------------------------- 1 | .icon-add{ 2 | background:url('icons/edit_add.png') no-repeat; 3 | } 4 | .icon-edit{ 5 | background:url('icons/pencil.png') no-repeat; 6 | } 7 | .icon-remove{ 8 | background:url('icons/edit_remove.png') no-repeat; 9 | } 10 | .icon-save{ 11 | background:url('icons/filesave.png') no-repeat; 12 | } 13 | .icon-cut{ 14 | background:url('icons/cut.png') no-repeat; 15 | } 16 | .icon-ok{ 17 | background:url('icons/ok.png') no-repeat; 18 | } 19 | .icon-no{ 20 | background:url('icons/no.png') no-repeat; 21 | } 22 | .icon-cancel{ 23 | background:url('icons/cancel.png') no-repeat; 24 | } 25 | .icon-reload{ 26 | background:url('icons/reload.png') no-repeat; 27 | } 28 | .icon-search{ 29 | background:url('icons/search.png') no-repeat; 30 | } 31 | .icon-print{ 32 | background:url('icons/print.png') no-repeat; 33 | } 34 | .icon-help{ 35 | background:url('icons/help.png') no-repeat; 36 | } 37 | .icon-undo{ 38 | background:url('icons/undo.png') no-repeat; 39 | } 40 | .icon-redo{ 41 | background:url('icons/redo.png') no-repeat; 42 | } 43 | .icon-back{ 44 | background:url('icons/back.png') no-repeat; 45 | } 46 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/pagination.css: -------------------------------------------------------------------------------- 1 | .pagination{ 2 | zoom:1; 3 | } 4 | .pagination table{ 5 | float:left; 6 | height:30px; 7 | } 8 | .pagination-btn-separator{ 9 | float:left; 10 | height:24px; 11 | border-left:1px solid #ccc; 12 | border-right:1px solid #fff; 13 | margin:3px 1px; 14 | } 15 | .pagination-num{ 16 | border:1px solid #ccc; 17 | margin:0 2px; 18 | } 19 | .pagination-page-list{ 20 | margin:0px 6px; 21 | } 22 | .pagination-info{ 23 | float:right; 24 | padding-right:6px; 25 | padding-top:8px; 26 | font-size:12px; 27 | } 28 | .pagination span{ 29 | font-size:12px; 30 | } 31 | .pagination-first{ 32 | background:url('images/pagination_first.gif') no-repeat; 33 | } 34 | .pagination-prev{ 35 | background:url('images/pagination_prev.gif') no-repeat; 36 | } 37 | .pagination-next{ 38 | background:url('images/pagination_next.gif') no-repeat; 39 | } 40 | .pagination-last{ 41 | background:url('images/pagination_last.gif') no-repeat; 42 | } 43 | .pagination-load{ 44 | background:url('images/pagination_load.png') no-repeat; 45 | } 46 | .pagination-loading{ 47 | background:url('images/pagination_loading.gif') no-repeat; 48 | } 49 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/pagination.css: -------------------------------------------------------------------------------- 1 | .pagination{ 2 | zoom:1; 3 | } 4 | .pagination table{ 5 | float:left; 6 | height:30px; 7 | } 8 | .pagination-btn-separator{ 9 | float:left; 10 | height:24px; 11 | border-left:1px solid #ccc; 12 | border-right:1px solid #fff; 13 | margin:3px 1px; 14 | } 15 | .pagination-num{ 16 | border:1px solid #ccc; 17 | margin:0 2px; 18 | } 19 | .pagination-page-list{ 20 | margin:0px 6px; 21 | } 22 | .pagination-info{ 23 | float:right; 24 | padding-right:6px; 25 | padding-top:8px; 26 | font-size:12px; 27 | } 28 | .pagination span{ 29 | font-size:12px; 30 | } 31 | .pagination-first{ 32 | background:url('images/pagination_first.gif') no-repeat; 33 | } 34 | .pagination-prev{ 35 | background:url('images/pagination_prev.gif') no-repeat; 36 | } 37 | .pagination-next{ 38 | background:url('images/pagination_next.gif') no-repeat; 39 | } 40 | .pagination-last{ 41 | background:url('images/pagination_last.gif') no-repeat; 42 | } 43 | .pagination-load{ 44 | background:url('images/pagination_load.png') no-repeat; 45 | } 46 | .pagination-loading{ 47 | background:url('images/pagination_loading.gif') no-repeat; 48 | } 49 | -------------------------------------------------------------------------------- /api-gateway-biz/src/main/java/com/zhiyong/gateway/biz/model/BaseRequest.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.biz.model; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * @ClassName BaseRequest 7 | * @Description: 基础请求信息 8 | * @Author 毛军锐 9 | * @Date 2020/11/25 上午11:42 10 | **/ 11 | @Data 12 | public class BaseRequest { 13 | 14 | /** 15 | * 客户端IP 16 | */ 17 | private String clientIp; 18 | 19 | /** 20 | * 请求域名 21 | */ 22 | private String host; 23 | 24 | /** 25 | * 请求路径 26 | */ 27 | private String path; 28 | 29 | /** 30 | * 请求类型 31 | */ 32 | private String reqMethod; 33 | 34 | /** 35 | * 请求referer 36 | */ 37 | private String referer; 38 | 39 | /** 40 | * 请求contentType 41 | */ 42 | private String contentType; 43 | 44 | /** 45 | * 请求客户端 46 | */ 47 | private String userAgent; 48 | 49 | /** 50 | * 请求参数 51 | */ 52 | private String queryStr; 53 | 54 | /** 55 | * 移动端设备ID 56 | */ 57 | private String deviceId; 58 | 59 | /** 60 | * 移动端操作系统 61 | */ 62 | private String os; 63 | 64 | /** 65 | * 移动端操作系统版本 66 | */ 67 | private String osVersion; 68 | } 69 | -------------------------------------------------------------------------------- /api-gateway-common/src/main/java/com/zhiyong/gateway/common/exception/GatewayException.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.common.exception; 2 | 3 | import com.zhiyong.gateway.common.enums.ErrorCode; 4 | 5 | /** 6 | * @ClassName GatewayException 7 | * @Description: 统一网关异常 8 | * @Author 毛军锐 9 | * @Date 2020/11/24 下午8:44 10 | **/ 11 | public class GatewayException extends RuntimeException { 12 | private ErrorCode errorCode; 13 | 14 | public GatewayException(ErrorCode errorCode) { 15 | super(errorCode.getDesc()); 16 | this.errorCode = errorCode; 17 | } 18 | 19 | public GatewayException(ErrorCode errorCode, String message) { 20 | super(message); 21 | this.errorCode = errorCode; 22 | } 23 | 24 | public GatewayException(ErrorCode errorCode, String message, Throwable cause) { 25 | super(message, cause); 26 | this.errorCode = errorCode; 27 | } 28 | 29 | public GatewayException(ErrorCode errorCode, Throwable cause) { 30 | super(cause); 31 | this.errorCode = errorCode; 32 | } 33 | 34 | public ErrorCode getErrorCode() { 35 | return errorCode; 36 | } 37 | 38 | @Override 39 | public String getMessage() { 40 | return super.getMessage(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /api-gateway-biz/src/main/resources/elasticjob-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 15 | 16 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /api-gateway-common/src/main/java/com/zhiyong/gateway/common/constant/CommonConstant.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.common.constant; 2 | 3 | /** 4 | * @ClassName CommonConstant 5 | * @Description: 公共常量定义 6 | * @Author 毛军锐 7 | * @Date 2020/11/26 上午11:52 8 | **/ 9 | public class CommonConstant { 10 | 11 | /** 12 | * 是 13 | */ 14 | public static final int YES = 1; 15 | 16 | /** 17 | * 否 18 | */ 19 | public static final int NO = 0; 20 | 21 | /** 22 | * 有效 23 | */ 24 | public static final int VALID = 0; 25 | 26 | /** 27 | * 删除 28 | */ 29 | public static final int DELETED = 1; 30 | 31 | /** 32 | * 需要 33 | */ 34 | public static final int NEED = 0; 35 | 36 | /** 37 | * 不需要 38 | */ 39 | public static final int NO_NEED = 1; 40 | 41 | /** 42 | * 不限制 43 | */ 44 | public static final int NO_LIMIT = -1; 45 | 46 | /** 47 | * API配置缓存KEY前缀 48 | */ 49 | public static final String APP_CFG_KEY_PRE = "gateway-api:app-cfg:"; 50 | public static final String API_CFG_KEY_PRE = "gateway-api:api-cfg:"; 51 | public static final String API_COUNT_KEY_PRE = "gateway-api:api-count:"; 52 | public static final String DATA_STRUCT_JSON_PRE = "gateway-api:data-struct-json:"; 53 | } 54 | -------------------------------------------------------------------------------- /api-gateway-facade/src/main/java/com/zhiyong/gateway/facade/tools/TypeStruct.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.facade.tools; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.alibaba.fastjson.annotation.JSONField; 5 | import java.util.List; 6 | import lombok.Data; 7 | 8 | /** 9 | * @ClassName TypeStruct 10 | * @Description: POJO复杂对象类型数据结构 11 | * @Author 毛军锐 12 | * @Date 2020/12/3 下午8:51 13 | **/ 14 | @Data 15 | public class TypeStruct { 16 | 17 | /** 18 | * 属性ID 19 | */ 20 | private Long id; 21 | 22 | /** 23 | * 属性名 24 | */ 25 | @JSONField(ordinal = 1) 26 | private String name; 27 | 28 | /** 29 | * 注释 30 | */ 31 | private String desc; 32 | 33 | /** 34 | * 属性类型(POJO:完整的类名) 35 | */ 36 | @JSONField(ordinal = 2) 37 | private String type; 38 | 39 | /** 40 | * 只需要根类型指定:只能是集合类型 41 | */ 42 | @JSONField(ordinal = 3) 43 | private String collectionType; 44 | 45 | /** 46 | * 属性类型集合 47 | */ 48 | @JSONField(ordinal = 4) 49 | private List children; 50 | 51 | /** 52 | * 转配置JSON 53 | * @return 54 | */ 55 | public String toJson() { 56 | if (this != null) { 57 | return JSON.toJSONString(this); 58 | } 59 | return ""; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/java/com/zhiyong/gateway/server/constant/RequestHeaderConstant.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.server.constant; 2 | 3 | /** 4 | * @ClassName RequestHeaderConstant 5 | * @Description: 请求头字段名常量 6 | * @Author 毛军锐 7 | * @Date 2020/11/25 下午3:14 8 | **/ 9 | public class RequestHeaderConstant { 10 | public static final String HOST = "Host"; 11 | public static final String REFERER = "referer"; 12 | public static final String USER_AGENT = "User-Agent"; 13 | public static final String DEVICE_ID = "DeviceId"; 14 | public static final String OS = "os"; 15 | public static final String OS_VERSION = "osVersion"; 16 | public static final String APP_KEY = "appKey"; 17 | public static final String APP_SECRET = "appSecret"; 18 | public static final String METHOD = "method"; 19 | public static final String SESSION = "session"; 20 | public static final String TIMESTAMP = "timestamp"; 21 | public static final String VERSION = "version"; 22 | public static final String SIGN = "sign"; 23 | public static final String TENANT_ID = "tenantId"; 24 | public static final String CONTENT_TYPE_FORM = "application/x-www-form-urlencoded"; 25 | public static final String CONTENT_TYPE_MULTIPART = "multipart/form-data"; 26 | public static final String CONTENT_TYPE_JSON = "application/json"; 27 | 28 | 29 | } 30 | -------------------------------------------------------------------------------- /api-gateway-dal/src/main/resources/mapper/UserExtMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 24 | -------------------------------------------------------------------------------- /api-gateway-common/src/main/java/com/zhiyong/gateway/common/enums/ApiState.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.common.enums; 2 | 3 | /** 4 | * @ClassName ApiState 5 | * @Description: TODO 6 | * @Author 毛军锐 7 | * @Date 2020/11/27 下午10:03 8 | **/ 9 | public enum ApiState { 10 | TEMP(0, "草稿"), 11 | UP_LINE(1, "已发布"), 12 | DOWN_LINE(2, "已下线"), 13 | ; 14 | 15 | private int code; 16 | private String desc; 17 | 18 | ApiState(int code, String desc) { 19 | this.code = code; 20 | this.desc = desc; 21 | } 22 | 23 | public int getCode() { 24 | return code; 25 | } 26 | 27 | public String getDesc() { 28 | return desc; 29 | } 30 | 31 | /** 32 | * 状态机 33 | * @param oldState 34 | * @param newState 35 | * @return 36 | */ 37 | public static boolean changeState(int oldState, int newState) { 38 | switch (oldState) { 39 | case 1: { 40 | if (newState == 0) { 41 | return false; 42 | } 43 | return true; 44 | } 45 | case 2: { 46 | if (newState == 0 || newState == 1) { 47 | return false; 48 | } 49 | return true; 50 | } 51 | default: { 52 | return true; 53 | } 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /api-gateway-common/src/main/java/com/zhiyong/gateway/common/util/AssertUtil.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.common.util; 2 | 3 | import com.zhiyong.gateway.common.enums.ErrorCode; 4 | import com.zhiyong.gateway.common.exception.GatewayException; 5 | import org.apache.commons.lang3.StringUtils; 6 | 7 | /** 8 | * @ClassName AssertUtil 9 | * @Description: 断言 10 | * @Author 毛军锐 11 | * @Date 2020/11/25 下午3:31 12 | **/ 13 | public class AssertUtil { 14 | 15 | /** 16 | * 非空校验 17 | * @param name 18 | * @param value 19 | */ 20 | public static void notNull(String name, Object value) { 21 | if (value == null) { 22 | throw new GatewayException(ErrorCode.ISV_ILLEGAL_ARGUMENT, name + "不存在"); 23 | } 24 | } 25 | 26 | /** 27 | * 非空校验 28 | * @param name 29 | * @param value 30 | */ 31 | public static void notEmpty(String name, String value) { 32 | if (StringUtils.isBlank(value)) { 33 | throw new GatewayException(ErrorCode.ISV_ILLEGAL_ARGUMENT, name + "不能为空"); 34 | } 35 | } 36 | 37 | /** 38 | * 数字校验 39 | * @param name 40 | * @param value 41 | */ 42 | public static void isNumber(String name, String value) { 43 | if (StringUtils.isNumeric(value)) { 44 | throw new GatewayException(ErrorCode.ISV_ILLEGAL_ARGUMENT, name + "必须是数字格式"); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /api-gateway-common/src/main/java/com/zhiyong/gateway/common/enums/TypeStructState.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.common.enums; 2 | 3 | /** 4 | * @ClassName TypeStructState 5 | * @Description: TODO 6 | * @Author 毛军锐 7 | * @Date 2020/11/27 下午10:03 8 | **/ 9 | public enum TypeStructState { 10 | TEMP(0, "草稿"), 11 | UP_LINE(1, "已发布"), 12 | DOWN_LINE(2, "已下线"), 13 | ; 14 | 15 | private int code; 16 | private String desc; 17 | 18 | TypeStructState(int code, String desc) { 19 | this.code = code; 20 | this.desc = desc; 21 | } 22 | 23 | public int getCode() { 24 | return code; 25 | } 26 | 27 | public String getDesc() { 28 | return desc; 29 | } 30 | 31 | /** 32 | * 状态机 33 | * @param oldState 34 | * @param newState 35 | * @return 36 | */ 37 | public static boolean changeState(int oldState, int newState) { 38 | switch (oldState) { 39 | case 1: { 40 | if (newState == 0) { 41 | return false; 42 | } 43 | return true; 44 | } 45 | case 2: { 46 | if (newState == 0 || newState == 1) { 47 | return false; 48 | } 49 | return true; 50 | } 51 | default: { 52 | return true; 53 | } 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/window.css: -------------------------------------------------------------------------------- 1 | .window { 2 | font-size:12px; 3 | position:absolute; 4 | overflow:hidden; 5 | background:#eee url('images/panel_title.gif') repeat-x; 6 | padding:5px; 7 | border:1px solid #D3D3D3; 8 | -moz-border-radius:5px; 9 | -webkit-border-radius: 5px; 10 | } 11 | .window-shadow{ 12 | position:absolute; 13 | background:#ddd; 14 | -moz-border-radius:5px; 15 | -webkit-border-radius: 5px; 16 | -moz-box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2); 17 | -webkit-box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2); 18 | filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); 19 | } 20 | .window .window-header{ 21 | background:transparent; 22 | padding:2px 0px 4px 0px; 23 | } 24 | .window .window-body{ 25 | background:#fff; 26 | border:1px solid #D3D3D3; 27 | border-top-width:0px; 28 | } 29 | .window .window-header .panel-icon{ 30 | left:1px; 31 | top:1px; 32 | } 33 | .window .window-header .panel-with-icon{ 34 | padding-left:18px; 35 | } 36 | .window .window-header .panel-tool{ 37 | top:0px; 38 | right:1px; 39 | } 40 | .window-proxy{ 41 | position:absolute; 42 | overflow:hidden; 43 | border:1px dashed #3F3F3F; 44 | } 45 | .window-mask{ 46 | position:absolute; 47 | left:0; 48 | top:0; 49 | width:100%; 50 | height:100%; 51 | filter:alpha(opacity=40); 52 | opacity:0.40; 53 | background:#ccc; 54 | display1:none; 55 | font-size:1px; 56 | *zoom:1; 57 | overflow:hidden; 58 | } 59 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/window.css: -------------------------------------------------------------------------------- 1 | .window { 2 | font-size:12px; 3 | position:absolute; 4 | overflow:hidden; 5 | background:transparent url('images/panel_title.png'); 6 | background1:#878787; 7 | padding:5px; 8 | border:1px solid #99BBE8; 9 | -moz-border-radius:5px; 10 | -webkit-border-radius: 5px; 11 | } 12 | .window-shadow{ 13 | position:absolute; 14 | background:#ddd; 15 | -moz-border-radius:5px; 16 | -webkit-border-radius: 5px; 17 | -moz-box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2); 18 | -webkit-box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2); 19 | filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); 20 | } 21 | .window .window-header{ 22 | background:transparent; 23 | padding:2px 0px 4px 0px; 24 | } 25 | .window .window-body{ 26 | background:#fff; 27 | border:1px solid #99BBE8; 28 | border-top-width:0px; 29 | } 30 | .window .window-header .panel-icon{ 31 | left:1px; 32 | top:1px; 33 | } 34 | .window .window-header .panel-with-icon{ 35 | padding-left:18px; 36 | } 37 | .window .window-header .panel-tool{ 38 | top:0px; 39 | right:1px; 40 | } 41 | .window-proxy{ 42 | position:absolute; 43 | overflow:hidden; 44 | border:1px dashed #15428b; 45 | } 46 | .window-mask{ 47 | position:absolute; 48 | left:0; 49 | top:0; 50 | width:100%; 51 | height:100%; 52 | filter:alpha(opacity=40); 53 | opacity:0.40; 54 | background:#ccc; 55 | display1:none; 56 | font-size:1px; 57 | *zoom:1; 58 | overflow:hidden; 59 | } 60 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/menu.css: -------------------------------------------------------------------------------- 1 | .menu{ 2 | position:absolute; 3 | background:#f0f0f0 url('images/menu.gif') repeat-y; 4 | margin:0; 5 | padding:2px; 6 | border:1px solid #ccc; 7 | overflow:hidden; 8 | } 9 | .menu-item{ 10 | position:relative; 11 | margin:0; 12 | padding:0; 13 | height:22px; 14 | line-height:20px; 15 | overflow:hidden; 16 | font-size:12px; 17 | cursor:pointer; 18 | border:1px solid transparent; 19 | _border:1px solid #f0f0f0; 20 | } 21 | .menu-text{ 22 | position:absolute; 23 | left:28px; 24 | top:0px; 25 | } 26 | .menu-icon{ 27 | position:absolute; 28 | width:16px; 29 | height:16px; 30 | top:3px; 31 | left:2px; 32 | } 33 | .menu-rightarrow{ 34 | position: absolute; 35 | width:4px; 36 | height:7px; 37 | top:7px; 38 | right:5px; 39 | background:url('images/menu_rightarrow.png') no-repeat; 40 | } 41 | .menu-sep{ 42 | margin:3px 0px 3px 24px; 43 | line-height:2px; 44 | font-size:2px; 45 | background:url('images/menu_sep.png') repeat-x; 46 | } 47 | .menu-active{ 48 | border:1px solid #7eabcd; 49 | background:#fafafa; 50 | -moz-border-radius:3px; 51 | -webkit-border-radius: 3px; 52 | } 53 | .menu-shadow{ 54 | position:absolute; 55 | background:#ddd; 56 | -moz-border-radius:5px; 57 | -webkit-border-radius: 5px; 58 | -moz-box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2); 59 | -webkit-box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2); 60 | filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); 61 | } 62 | 63 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/menu.css: -------------------------------------------------------------------------------- 1 | .menu{ 2 | position:absolute; 3 | background:#f0f0f0 url('images/menu.gif') repeat-y; 4 | margin:0; 5 | padding:2px; 6 | border:1px solid #ccc; 7 | overflow:hidden; 8 | } 9 | .menu-item{ 10 | position:relative; 11 | margin:0; 12 | padding:0; 13 | height:22px; 14 | line-height:20px; 15 | overflow:hidden; 16 | font-size:12px; 17 | cursor:pointer; 18 | border:1px solid transparent; 19 | _border:1px solid #f0f0f0; 20 | } 21 | .menu-text{ 22 | position:absolute; 23 | left:28px; 24 | top:0px; 25 | } 26 | .menu-icon{ 27 | position:absolute; 28 | width:16px; 29 | height:16px; 30 | top:3px; 31 | left:2px; 32 | } 33 | .menu-rightarrow{ 34 | position: absolute; 35 | width:4px; 36 | height:7px; 37 | top:7px; 38 | right:5px; 39 | background:url('images/menu_rightarrow.png') no-repeat; 40 | } 41 | .menu-sep{ 42 | margin:3px 0px 3px 24px; 43 | line-height:2px; 44 | font-size:2px; 45 | background:url('images/menu_sep.png') repeat-x; 46 | } 47 | .menu-active{ 48 | border:1px solid #d3d3d3; 49 | background:#fafafa; 50 | -moz-border-radius:3px; 51 | -webkit-border-radius: 3px; 52 | } 53 | .menu-shadow{ 54 | position:absolute; 55 | background:#ddd; 56 | -moz-border-radius:5px; 57 | -webkit-border-radius: 5px; 58 | -moz-box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2); 59 | -webkit-box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2); 60 | filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); 61 | } 62 | 63 | -------------------------------------------------------------------------------- /api-gateway-biz/src/main/java/com/zhiyong/gateway/biz/cache/ApiConfigLocalCache.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.biz.cache; 2 | 3 | import com.google.common.cache.Cache; 4 | import com.google.common.cache.CacheBuilder; 5 | import com.zhiyong.gateway.common.constant.CacheConstant; 6 | import java.util.concurrent.TimeUnit; 7 | import javax.annotation.PostConstruct; 8 | import org.apache.commons.lang3.StringUtils; 9 | import org.springframework.stereotype.Component; 10 | 11 | /** 12 | * @ClassName ApiConfigLocalCache 13 | * @Description: API配置本地缓存 14 | * @Author 毛军锐 15 | * @Date 2020/12/21 上午10:33 16 | **/ 17 | @Component 18 | public class ApiConfigLocalCache { 19 | 20 | private Cache localCache = null; 21 | 22 | @PostConstruct 23 | public void init() { 24 | localCache = CacheBuilder.newBuilder() 25 | .initialCapacity(30).maximumSize(5000) 26 | .expireAfterWrite(CacheConstant.API_CONFIG_LOCAL_EXPIRED, TimeUnit.SECONDS).build(); 27 | } 28 | 29 | public void setValue(String key, Object value) { 30 | if (StringUtils.isBlank(key) || value == null) { 31 | return; 32 | } 33 | localCache.put(key, value); 34 | } 35 | 36 | public Object getValue(String key) { 37 | if (StringUtils.isBlank(key)) { 38 | return null; 39 | } 40 | return localCache.getIfPresent(key); 41 | } 42 | 43 | public void delete(String key) { 44 | if (StringUtils.isBlank(key)) { 45 | return; 46 | } 47 | localCache.invalidate(key); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /api-gateway-biz/src/main/java/com/zhiyong/gateway/biz/service/StructConfigService.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.biz.service; 2 | 3 | import com.github.pagehelper.PageInfo; 4 | import com.zhiyong.gateway.common.model.PageRequest; 5 | import com.zhiyong.gateway.dal.domain.PojoTypeJson; 6 | import java.util.List; 7 | 8 | /** 9 | * @ClassName DataStructService 10 | * @Description: 数据结构服务 11 | * @Author 毛军锐 12 | * @Date 2020/12/3 下午1:43 13 | **/ 14 | public interface StructConfigService { 15 | 16 | /** 17 | * 保存数据结构类型json 18 | * 19 | * @param pojoTypeJson 20 | * @return 21 | */ 22 | int savePojoTypeJson(PojoTypeJson pojoTypeJson); 23 | 24 | /** 25 | * 获取所有数据结构类型JSON 26 | * 27 | * @return 28 | */ 29 | List listAll(); 30 | 31 | /** 32 | * 获取所有数据结构类型JSON 33 | * 34 | * @return 35 | */ 36 | List getValidList(String typeName); 37 | 38 | /** 39 | * 分页查询类型配置列表 40 | * @return 41 | */ 42 | PageInfo pagerPojoTypeJson(String typeName, String typeDesc, PageRequest pageRequest); 43 | 44 | /** 45 | * 根据数据结构名查询数据结构配置 46 | * @param name 47 | * @return 48 | */ 49 | PojoTypeJson queryPojoTypeJsonByName(String name); 50 | 51 | /** 52 | * 根据ID查询数据结构配置 53 | * @param id 54 | * @return 55 | */ 56 | PojoTypeJson getPojoTypeJsonById(Integer id); 57 | 58 | /** 59 | * 变更状态 60 | * @param userName 61 | * @param id 62 | * @param nowState 63 | * @param newState 64 | * @return 65 | */ 66 | int changeState(String userName, Integer id, Integer nowState, Integer newState); 67 | } 68 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/linkbutton.css: -------------------------------------------------------------------------------- 1 | a.l-btn{ 2 | color:#444; 3 | background:url('images/button_a_bg.gif') no-repeat top right; 4 | font-size:12px; 5 | text-decoration:none; 6 | display:inline-block; 7 | zoom:1; 8 | height:24px; 9 | padding-right:18px; 10 | cursor:pointer; 11 | outline:none; 12 | } 13 | a.l-btn-plain{ 14 | background:transparent; 15 | padding-right:5px; 16 | border:1px solid transparent; 17 | _border:0px solid #efefef; 18 | _padding:1px 6px 1px 1px; 19 | } 20 | 21 | a.l-btn-disabled{ 22 | color:#ccc; 23 | opacity:0.5; 24 | filter:alpha(opacity=50); 25 | cursor:default; 26 | } 27 | a.l-btn span.l-btn-left{ 28 | display:block; 29 | background:url('images/button_span_bg.gif') no-repeat top left; 30 | padding:4px 0px 4px 18px; 31 | line-height:16px; 32 | } 33 | a.l-btn-plain span.l-btn-left{ 34 | background:transparent; 35 | padding-left:5px; 36 | } 37 | 38 | a.l-btn span span.l-btn-text{ 39 | display:inline-block; 40 | height:16px; 41 | line-height:16px; 42 | padding:0px; 43 | } 44 | a.l-btn span span span.l-btn-empty{ 45 | display:inline-block; 46 | padding:0px; 47 | width:16px; 48 | } 49 | a:hover.l-btn{ 50 | background-position: bottom right; 51 | outline:none; 52 | } 53 | a:hover.l-btn span.l-btn-left{ 54 | background-position: bottom left; 55 | } 56 | 57 | a:hover.l-btn-plain{ 58 | border:1px solid #d3d3d3; 59 | background:url('images/button_plain_hover.png') repeat-x left bottom; 60 | _padding:0px 5px 0px 0px; 61 | } 62 | a:hover.l-btn-disabled{ 63 | background-position:top right; 64 | } 65 | a:hover.l-btn-disabled span.l-btn-left{ 66 | background-position:top left; 67 | } 68 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/linkbutton.css: -------------------------------------------------------------------------------- 1 | a.l-btn{ 2 | color:#444; 3 | background:url('images/button_a_bg.gif') no-repeat top right; 4 | font-size:12px; 5 | text-decoration:none; 6 | display:inline-block; 7 | zoom:1; 8 | height:24px; 9 | padding-right:18px; 10 | cursor:pointer; 11 | outline:none; 12 | } 13 | a.l-btn-plain{ 14 | background:transparent; 15 | padding-right:5px; 16 | border:1px solid transparent; 17 | _border:0px solid #efefef; 18 | _padding:1px 6px 1px 1px; 19 | } 20 | 21 | a.l-btn-disabled{ 22 | color:#ccc; 23 | opacity:0.5; 24 | filter:alpha(opacity=50); 25 | cursor:default; 26 | } 27 | a.l-btn span.l-btn-left{ 28 | display:block; 29 | background:url('images/button_span_bg.gif') no-repeat top left; 30 | padding:4px 0px 4px 18px; 31 | line-height:16px; 32 | } 33 | a.l-btn-plain span.l-btn-left{ 34 | background:transparent; 35 | padding-left:5px; 36 | } 37 | 38 | a.l-btn span span.l-btn-text{ 39 | display:inline-block; 40 | height:16px; 41 | line-height:16px; 42 | padding:0px; 43 | } 44 | a.l-btn span span span.l-btn-empty{ 45 | display:inline-block; 46 | padding:0px; 47 | width:16px; 48 | } 49 | a:hover.l-btn{ 50 | background-position: bottom right; 51 | outline:none; 52 | } 53 | a:hover.l-btn span.l-btn-left{ 54 | background-position: bottom left; 55 | } 56 | 57 | a:hover.l-btn-plain{ 58 | border:1px solid #7eabcd; 59 | background:url('images/button_plain_hover.png') repeat-x left bottom; 60 | _padding:0px 5px 0px 0px; 61 | } 62 | a:hover.l-btn-disabled{ 63 | background-position:top right; 64 | } 65 | a:hover.l-btn-disabled span.l-btn-left{ 66 | background-position:top left; 67 | } 68 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/java/com/zhiyong/gateway/server/processor/impl/FlowControlProcessor.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.server.processor.impl; 2 | 3 | import com.alibaba.csp.sentinel.Entry; 4 | import com.alibaba.csp.sentinel.SphU; 5 | import com.alibaba.csp.sentinel.slots.block.BlockException; 6 | import com.zhiyong.gateway.common.enums.ErrorCode; 7 | import com.zhiyong.gateway.common.exception.GatewayException; 8 | import com.zhiyong.gateway.server.context.ApiContext; 9 | import com.zhiyong.gateway.server.processor.ApiProcessor; 10 | import org.springframework.stereotype.Component; 11 | 12 | /** 13 | * @ClassName FlowControlProcessor 14 | * @Description: 流控处理器 15 | * @Author 毛军锐 16 | * @Date 2020/11/25 下午1:29 17 | **/ 18 | @Component 19 | public class FlowControlProcessor implements ApiProcessor { 20 | 21 | @Override 22 | public String getName() { 23 | return FlowControlProcessor.class.getName(); 24 | } 25 | 26 | /** 27 | * 流控处理,流控规则设置请参考 FlowControlRuleCache 28 | * @param context 29 | * @throws GatewayException 30 | */ 31 | @Override 32 | public void run(ApiContext context) throws GatewayException { 33 | Entry apiCallLimit = null; 34 | 35 | try { 36 | String method = context.getApiRequest().getMethod(); 37 | String version = context.getApiRequest().getVersion(); 38 | String resource = method + ":" + version; 39 | apiCallLimit = SphU.entry(resource); 40 | } catch (BlockException e1) { 41 | throw new GatewayException(ErrorCode.ISP_SYSTEM_ERROR, "API被限流了"); 42 | } finally { 43 | if (apiCallLimit != null) { 44 | apiCallLimit.exit(); 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /api-gateway-biz/src/main/java/com/zhiyong/gateway/biz/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.biz.service; 2 | 3 | import com.github.pagehelper.PageInfo; 4 | import com.zhiyong.gateway.common.model.PageRequest; 5 | import com.zhiyong.gateway.dal.domain.Auth; 6 | import com.zhiyong.gateway.dal.domain.AuthExt; 7 | import com.zhiyong.gateway.dal.domain.User; 8 | 9 | /** 10 | * @ClassName UserService 11 | * @Description: 用户服务 12 | * @Author 毛军锐 13 | * @Date 2020/11/30 下午7:53 14 | **/ 15 | public interface UserService { 16 | 17 | /** 18 | * 保存用户 19 | * 20 | * @param user 21 | * @return 22 | */ 23 | Integer saveUser(User user); 24 | 25 | /** 26 | * 获取用户列表 27 | * 28 | * @return 29 | */ 30 | PageInfo pagerUser(String account, PageRequest pageRequest); 31 | 32 | /** 33 | * 获取用户 34 | * 35 | * @param account 36 | * @return 37 | */ 38 | User getUserByAccount(String account); 39 | 40 | /** 41 | * 重置密码 42 | * 43 | * @param id 44 | * @param newPwd 45 | * @return 46 | */ 47 | boolean resetPassword(Integer id, String newPwd); 48 | 49 | /** 50 | * 保存权限 51 | * 52 | * @param auth 53 | * @return 54 | */ 55 | Integer saveAuth(Auth auth); 56 | 57 | /** 58 | * 获取权限列表 59 | * 60 | * @return 61 | */ 62 | PageInfo pagerAuth(String account, PageRequest pageRequest); 63 | 64 | /** 65 | * 删除权限 66 | * 67 | * @param id 68 | * @return 69 | */ 70 | int delAuth(Integer id); 71 | 72 | /** 73 | * 获取用户权限 74 | * @param userId 75 | * @param apiGroup 76 | * @return 77 | */ 78 | Auth getAuth(Integer userId, Integer apiGroup); 79 | } 80 | -------------------------------------------------------------------------------- /api-gateway-common/src/main/java/com/zhiyong/gateway/common/errorcode/CommonErrorCode.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.common.errorcode; 2 | 3 | public enum CommonErrorCode implements ErrorCode { 4 | /** 5 | * 成功返回码 6 | */ 7 | CODE_SUCCESS(200, "OK"), 8 | 9 | /** 10 | * 返回内容为空 11 | */ 12 | CODE_CONTENT_EMPTY(204, "OK"), 13 | 14 | /** 15 | * 访问被拒绝 16 | */ 17 | CODE_REJECT(403, "未授权"), 18 | 19 | /** 20 | * 无权限访问 21 | */ 22 | CODE_NO_AUTH(401, "未认证"), 23 | 24 | /** 25 | * 请求方法错误 26 | */ 27 | CODE_NOT_EXIST(404, "请求方法错误"), 28 | 29 | /** 30 | * 请求版本错误 31 | */ 32 | CODE_VERSION_ERROR(406, "请求版本错误"), 33 | 34 | /** 35 | * 获取锁错误 36 | */ 37 | CODE_GET_LOCK_ERROR(423, "获取锁失败"), 38 | 39 | /** 40 | * 服务器错误 41 | */ 42 | CODE_SERVER_ERROR(600, "服务器错误"), 43 | /** 44 | * 服务超时 45 | */ 46 | CODE_SERVER_TIMEOUT(601, "服务超时"), 47 | /** 48 | * 其他业务码定义 49 | */ 50 | CODE_COMMON_ERROR(800, "默认异常"), 51 | /** 52 | * 缺少必填参数 53 | */ 54 | CODE_PARAM_NULL(801, "缺少必填参数"), 55 | 56 | /** 57 | * 请求参数错误 58 | */ 59 | CODE_PARAM_ERROR(802, "请求参数不合法"), 60 | 61 | /** 62 | * 租户ID为空异常 63 | */ 64 | TENANT_ID_EMPTY_ERROR(998, "租户ID为空"), 65 | 66 | /** 67 | * 租户上下文为空异常 68 | */ 69 | TENANT_CONTEXT_EMPTY_ERROR(999, "租户上下文为空"); 70 | 71 | private int code; 72 | private String msg; 73 | 74 | CommonErrorCode(int code, String msg) { 75 | this.code = code; 76 | this.msg = msg; 77 | } 78 | 79 | @Override 80 | public int getCode() { 81 | return code; 82 | } 83 | 84 | @Override 85 | public String getMsg() { 86 | return msg; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/locale/easyui-lang-zh_TW.js: -------------------------------------------------------------------------------- 1 | if ($.fn.pagination){ 2 | $.fn.pagination.defaults.beforePageText = '第'; 3 | $.fn.pagination.defaults.afterPageText = '共{pages}頁'; 4 | $.fn.pagination.defaults.displayMsg = '顯示{from}到{to},共{total}記錄'; 5 | } 6 | if ($.fn.datagrid){ 7 | $.fn.datagrid.defaults.loadMsg = '正在處理,請稍待。。。'; 8 | } 9 | if ($.messager){ 10 | $.messager.defaults.ok = '確定'; 11 | $.messager.defaults.cancel = '取消'; 12 | } 13 | if ($.fn.validatebox){ 14 | $.fn.validatebox.defaults.missingMessage = '該輸入項為必輸項'; 15 | $.fn.validatebox.defaults.rules.email.message = '請輸入有效的電子郵件地址'; 16 | $.fn.validatebox.defaults.rules.url.message = '請輸入有效的URL地址'; 17 | $.fn.validatebox.defaults.rules.length.message = '輸入內容長度必須介於{0}和{1}之間'; 18 | } 19 | if ($.fn.numberbox){ 20 | $.fn.numberbox.defaults.missingMessage = '該輸入項為必輸項'; 21 | } 22 | if ($.fn.combobox){ 23 | $.fn.combobox.defaults.missingMessage = '該輸入項為必輸項'; 24 | } 25 | if ($.fn.combotree){ 26 | $.fn.combotree.defaults.missingMessage = '該輸入項為必輸項'; 27 | } 28 | if ($.fn.calendar){ 29 | $.fn.calendar.defaults.weeks = ['日','一','二','三','四','五','六']; 30 | $.fn.calendar.defaults.months = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月']; 31 | } 32 | if ($.fn.datebox){ 33 | $.fn.datebox.defaults.currentText = '今天'; 34 | $.fn.datebox.defaults.closeText = '關閉'; 35 | $.fn.datebox.defaults.okText = '確定'; 36 | $.fn.datebox.defaults.missingMessage = '該輸入項為必輸項'; 37 | } 38 | if ($.fn.datetimebox && $.fn.datebox){ 39 | $.extend($.fn.datetimebox.defaults,{ 40 | currentText: $.fn.datebox.defaults.currentText, 41 | closeText: $.fn.datebox.defaults.closeText, 42 | okText: $.fn.datebox.defaults.okText, 43 | missingMessage: $.fn.datebox.defaults.missingMessage 44 | }); 45 | } 46 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/java/com/zhiyong/gateway/server/processor/impl/ServiceInvokeProcessor.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.server.processor.impl; 2 | 3 | import com.zhiyong.gateway.biz.model.ServiceRequest; 4 | import com.zhiyong.gateway.biz.service.RpcProxyService; 5 | import com.zhiyong.gateway.common.exception.GatewayException; 6 | import com.zhiyong.gateway.server.context.ApiContext; 7 | import com.zhiyong.gateway.server.processor.ApiProcessor; 8 | import java.util.ArrayList; 9 | import java.util.HashMap; 10 | import java.util.List; 11 | import java.util.Map; 12 | import javax.annotation.Resource; 13 | import org.springframework.stereotype.Component; 14 | 15 | /** 16 | * @ClassName ServiceInvokeProcessor 17 | * @Description: 远程服务调用处理器 18 | * @Author 毛军锐 19 | * @Date 2020/11/25 下午1:31 20 | **/ 21 | @Component 22 | public class ServiceInvokeProcessor implements ApiProcessor { 23 | 24 | @Resource 25 | private RpcProxyService rpcProxyService; 26 | 27 | @Override 28 | public String getName() { 29 | return ServiceInvokeProcessor.class.getName(); 30 | } 31 | 32 | @Override 33 | public void run(ApiContext context) throws GatewayException { 34 | ServiceRequest serviceRequest = ServiceRequest.builder() 35 | .interfaceName(context.getApiCfg().getRpcInterface()) 36 | .method(context.getApiCfg().getRpcMethod()) 37 | .timeout(context.getApiCfg().getTimeout()) 38 | .version(context.getApiCfg().getRpcVersion()) 39 | .paramTypes(context.getApiParams().getParamTypes()) 40 | .paramValues(context.getApiParams().getParamValues()) 41 | .build(); 42 | Object result = rpcProxyService.invoke(serviceRequest); 43 | context.setApiResult(result); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /api-gateway-dal/src/main/resources/mapper/ApiCountExtMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 33 | -------------------------------------------------------------------------------- /api-gateway-integration/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | com.zhiyong.gateway 5 | api-gateway-parent 6 | 1.0.0-SNAPSHOT 7 | ../pom.xml 8 | 9 | 4.0.0 10 | com.zhiyong.gateway 11 | api-gateway-integration 12 | ${api-gateway.version} 13 | 14 | api-gateway-integration 15 | jar 16 | 17 | 18 | 19 | org.apache.dubbo 20 | dubbo-spring-boot-starter 21 | 22 | 23 | com.zhiyong.gateway 24 | api-gateway-common 25 | 26 | 27 | com.zhiyong.gateway 28 | api-gateway-model 29 | 30 | 31 | org.springframework.boot 32 | spring-boot-starter-actuator 33 | 34 | 35 | org.apache.commons 36 | commons-lang3 37 | 38 | 39 | commons-collections 40 | commons-collections 41 | 42 | 43 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/java/com/zhiyong/gateway/common/filter/CorsFilter.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.common.filter; 2 | 3 | import java.io.IOException; 4 | import java.nio.charset.StandardCharsets; 5 | import javax.servlet.Filter; 6 | import javax.servlet.FilterChain; 7 | import javax.servlet.ServletException; 8 | import javax.servlet.ServletRequest; 9 | import javax.servlet.ServletResponse; 10 | import javax.servlet.http.HttpServletRequest; 11 | import javax.servlet.http.HttpServletResponse; 12 | import org.apache.commons.lang3.StringUtils; 13 | import org.springframework.context.annotation.Configuration; 14 | import org.springframework.core.annotation.Order; 15 | 16 | /** 17 | * @ClassName CorsConfig 18 | * @Description: 跨域访问的配置 19 | * @Author 毛军锐 20 | * @Date 2020/12/9 下午6:54 21 | **/ 22 | @Configuration 23 | @Order(2) 24 | public class CorsFilter implements Filter { 25 | 26 | @Override 27 | public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) 28 | throws IOException, ServletException { 29 | HttpServletRequest request = (HttpServletRequest) servletRequest; 30 | HttpServletResponse response = (HttpServletResponse) servletResponse; 31 | String origin = request.getHeader("origin"); 32 | response.setCharacterEncoding(StandardCharsets.UTF_8.name()); 33 | response.setHeader("Access-Control-Allow-Credentials", "true"); 34 | response.setHeader("Access-Control-Allow-Origin", StringUtils.isEmpty(origin) ? "*" : origin); 35 | response.setHeader("Access-Control-Allow-Headers", 36 | "Origin, X-Requested-With, Content-Type, Accept ,X-FETCH-METHOD, x-hx-sign-ignore,x-resource-code"); 37 | response.setHeader("Access-Control-Allow-Methods", "GET, POST, PATCH, PUT, DELETE, OPTIONS"); 38 | filterChain.doFilter(servletRequest, servletResponse); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/locale/easyui-lang-af.js: -------------------------------------------------------------------------------- 1 | if ($.fn.pagination){ 2 | $.fn.pagination.defaults.beforePageText = 'Bladsy'; 3 | $.fn.pagination.defaults.afterPageText = 'Van {pages}'; 4 | $.fn.pagination.defaults.displayMsg = 'Wys (from) tot (to) van (total) items'; 5 | } 6 | if ($.fn.datagrid){ 7 | $.fn.datagrid.defaults.loadMsg = 'Verwerking, wag asseblief ...'; 8 | } 9 | if ($.messager){ 10 | $.messager.defaults.ok = 'Ok'; 11 | $.messager.defaults.cancel = 'Die styl'; 12 | } 13 | if ($.fn.validatebox){ 14 | $.fn.validatebox.defaults.missingMessage = "Die veld is verpligtend."; 15 | $.fn.validatebox.defaults.rules.email.message = "Gee 'n geldige e-pos adres."; 16 | $.fn.validatebox.defaults.rules.url.message = "Gee 'n geldige URL nie."; 17 | $.fn.validatebox.defaults.rules.length.message = "Voer 'n waarde tussen {0} en {1}."; 18 | } 19 | if ($.fn.numberbox){ 20 | $.fn.numberbox.defaults.missingMessage = 'Die veld is verpligtend.'; 21 | } 22 | if ($.fn.combobox){ 23 | $.fn.combobox.defaults.missingMessage = 'Die veld is verpligtend.'; 24 | } 25 | if ($.fn.combotree){ 26 | $.fn.combotree.defaults.missingMessage = 'Die veld is verpligtend.'; 27 | } 28 | if ($.fn.calendar){ 29 | $.fn.calendar.defaults.weeks = ['S','M','T','W','T','F','S']; 30 | $.fn.calendar.defaults.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; 31 | } 32 | if ($.fn.datebox){ 33 | $.fn.datebox.defaults.currentText = 'Vandag'; 34 | $.fn.datebox.defaults.closeText = 'Sluit'; 35 | $.fn.datebox.defaults.okText = 'Ok'; 36 | $.fn.datebox.defaults.missingMessage = 'Die veld is verpligtend.'; 37 | } 38 | if ($.fn.datetimebox && $.fn.datebox){ 39 | $.extend($.fn.datetimebox.defaults,{ 40 | currentText: $.fn.datebox.defaults.currentText, 41 | closeText: $.fn.datebox.defaults.closeText, 42 | okText: $.fn.datebox.defaults.okText, 43 | missingMessage: $.fn.datebox.defaults.missingMessage 44 | }); 45 | } 46 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/locale/easyui-lang-da.js: -------------------------------------------------------------------------------- 1 | if ($.fn.pagination){ 2 | $.fn.pagination.defaults.beforePageText = 'Page'; 3 | $.fn.pagination.defaults.afterPageText = 'af {pages}'; 4 | $.fn.pagination.defaults.displayMsg = 'Viser {from} til {to} af {total} poster'; 5 | } 6 | if ($.fn.datagrid){ 7 | $.fn.datagrid.defaults.loadMsg = 'Behandling, vent venligst ...'; 8 | } 9 | if ($.messager){ 10 | $.messager.defaults.ok = 'Ok'; 11 | $.messager.defaults.cancel = 'Annuller'; 12 | } 13 | if ($.fn.validatebox){ 14 | $.fn.validatebox.defaults.missingMessage = 'Dette felt er påkrævet.'; 15 | $.fn.validatebox.defaults.rules.email.message = 'Angiv en gyldig e-mail-adresse.'; 16 | $.fn.validatebox.defaults.rules.url.message = 'Angiv en gyldig webadresse.'; 17 | $.fn.validatebox.defaults.rules.length.message = 'Angiv en værdi mellem {0} og {1}.'; 18 | } 19 | if ($.fn.numberbox){ 20 | $.fn.numberbox.defaults.missingMessage = 'Dette felt er påkrævet.'; 21 | } 22 | if ($.fn.combobox){ 23 | $.fn.combobox.defaults.missingMessage = 'Dette felt er påkrævet.'; 24 | } 25 | if ($.fn.combotree){ 26 | $.fn.combotree.defaults.missingMessage = 'Dette felt er påkrævet.'; 27 | } 28 | if ($.fn.calendar){ 29 | $.fn.calendar.defaults.weeks = ['S','M','T','W','T','F','S']; 30 | $.fn.calendar.defaults.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; 31 | } 32 | if ($.fn.datebox){ 33 | $.fn.datebox.defaults.currentText = 'I dag'; 34 | $.fn.datebox.defaults.closeText = 'Luk'; 35 | $.fn.datebox.defaults.okText = 'Ok'; 36 | $.fn.datebox.defaults.missingMessage = 'Dette felt er påkrævet.'; 37 | } 38 | if ($.fn.datetimebox && $.fn.datebox){ 39 | $.extend($.fn.datetimebox.defaults,{ 40 | currentText: $.fn.datebox.defaults.currentText, 41 | closeText: $.fn.datebox.defaults.closeText, 42 | okText: $.fn.datebox.defaults.okText, 43 | missingMessage: $.fn.datebox.defaults.missingMessage 44 | }); 45 | } 46 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/locale/easyui-lang-nl.js: -------------------------------------------------------------------------------- 1 | if ($.fn.pagination){ 2 | $.fn.pagination.defaults.beforePageText = 'Pagina'; 3 | $.fn.pagination.defaults.afterPageText = 'van {pages}'; 4 | $.fn.pagination.defaults.displayMsg = 'Tonen van {from} tot {to} van de {totale} items'; 5 | } 6 | if ($.fn.datagrid){ 7 | $.fn.datagrid.defaults.loadMsg = 'Verwerking, even geduld ...'; 8 | } 9 | if ($.messager){ 10 | $.messager.defaults.ok = 'Okee'; 11 | $.messager.defaults.cancel = 'Annuleren'; 12 | } 13 | if ($.fn.validatebox){ 14 | $.fn.validatebox.defaults.missingMessage = 'Dit veld is verplicht.'; 15 | $.fn.validatebox.defaults.rules.email.message = 'Geef een geldig e-mailadres.'; 16 | $.fn.validatebox.defaults.rules.url.message = 'Vul een geldige URL.'; 17 | $.fn.validatebox.defaults.rules.length.message = 'Voer een waarde tussen {0} en {1}.'; 18 | } 19 | if ($.fn.numberbox){ 20 | $.fn.numberbox.defaults.missingMessage = 'Dit veld is verplicht.'; 21 | } 22 | if ($.fn.combobox){ 23 | $.fn.combobox.defaults.missingMessage = 'Dit veld is verplicht.'; 24 | } 25 | if ($.fn.combotree){ 26 | $.fn.combotree.defaults.missingMessage = 'Dit veld is verplicht.'; 27 | } 28 | if ($.fn.calendar){ 29 | $.fn.calendar.defaults.weeks = ['S','M','T','W','T','F','S']; 30 | $.fn.calendar.defaults.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; 31 | } 32 | if ($.fn.datebox){ 33 | $.fn.datebox.defaults.currentText = 'Vandaag'; 34 | $.fn.datebox.defaults.closeText = 'Dicht'; 35 | $.fn.datebox.defaults.okText = 'Okee'; 36 | $.fn.datebox.defaults.missingMessage = 'Dit veld is verplicht.'; 37 | } 38 | if ($.fn.datetimebox && $.fn.datebox){ 39 | $.extend($.fn.datetimebox.defaults,{ 40 | currentText: $.fn.datebox.defaults.currentText, 41 | closeText: $.fn.datebox.defaults.closeText, 42 | okText: $.fn.datebox.defaults.okText, 43 | missingMessage: $.fn.datebox.defaults.missingMessage 44 | }); 45 | } 46 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/locale/easyui-lang-en.js: -------------------------------------------------------------------------------- 1 | if ($.fn.pagination){ 2 | $.fn.pagination.defaults.beforePageText = 'Page'; 3 | $.fn.pagination.defaults.afterPageText = 'of {pages}'; 4 | $.fn.pagination.defaults.displayMsg = 'Displaying {from} to {to} of {total} items'; 5 | } 6 | if ($.fn.datagrid){ 7 | $.fn.datagrid.defaults.loadMsg = 'Processing, please wait ...'; 8 | } 9 | if ($.messager){ 10 | $.messager.defaults.ok = 'Ok'; 11 | $.messager.defaults.cancel = 'Cancel'; 12 | } 13 | if ($.fn.validatebox){ 14 | $.fn.validatebox.defaults.missingMessage = 'This field is required.'; 15 | $.fn.validatebox.defaults.rules.email.message = 'Please enter a valid email address.'; 16 | $.fn.validatebox.defaults.rules.url.message = 'Please enter a valid URL.'; 17 | $.fn.validatebox.defaults.rules.length.message = 'Please enter a value between {0} and {1}.'; 18 | } 19 | if ($.fn.numberbox){ 20 | $.fn.numberbox.defaults.missingMessage = 'This field is required.'; 21 | } 22 | if ($.fn.combobox){ 23 | $.fn.combobox.defaults.missingMessage = 'This field is required.'; 24 | } 25 | if ($.fn.combotree){ 26 | $.fn.combotree.defaults.missingMessage = 'This field is required.'; 27 | } 28 | if ($.fn.calendar){ 29 | $.fn.calendar.defaults.weeks = ['S','M','T','W','T','F','S']; 30 | $.fn.calendar.defaults.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; 31 | } 32 | if ($.fn.datebox){ 33 | $.fn.datebox.defaults.currentText = 'Today'; 34 | $.fn.datebox.defaults.closeText = 'Close'; 35 | $.fn.datebox.defaults.okText = 'Ok'; 36 | $.fn.datebox.defaults.missingMessage = 'This field is required.'; 37 | } 38 | if ($.fn.datetimebox && $.fn.datebox){ 39 | $.extend($.fn.datetimebox.defaults,{ 40 | currentText: $.fn.datebox.defaults.currentText, 41 | closeText: $.fn.datebox.defaults.closeText, 42 | okText: $.fn.datebox.defaults.okText, 43 | missingMessage: $.fn.datebox.defaults.missingMessage 44 | }); 45 | } 46 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/panel.css: -------------------------------------------------------------------------------- 1 | .panel{ 2 | overflow:hidden; 3 | font-size:12px; 4 | } 5 | .panel-header{ 6 | padding:5px; 7 | line-height:15px; 8 | color:#15428b; 9 | font-weight:bold; 10 | font-size:12px; 11 | background:url('images/panel_title.png') repeat-x; 12 | position:relative; 13 | border:1px solid #99BBE8; 14 | } 15 | .panel-header-noborder{ 16 | border-width:0px; 17 | border-bottom:1px solid #99BBE8; 18 | } 19 | .panel-body{ 20 | overflow:auto; 21 | border:1px solid #99BBE8; 22 | border-top-width:0px; 23 | } 24 | .panel-body-noheader{ 25 | border-top-width:1px; 26 | } 27 | .panel-body-noborder{ 28 | border-width:0px; 29 | } 30 | .panel-with-icon{ 31 | padding-left:18px; 32 | } 33 | .panel-icon{ 34 | position:absolute; 35 | left:5px; 36 | top:4px; 37 | width:16px; 38 | height:16px; 39 | } 40 | 41 | .panel-tool{ 42 | position:absolute; 43 | right:5px; 44 | top:4px; 45 | } 46 | .panel-tool div{ 47 | display:block; 48 | float:right; 49 | width:16px; 50 | height:16px; 51 | margin-left:2px; 52 | cursor:pointer; 53 | opacity:0.6; 54 | filter:alpha(opacity=60); 55 | } 56 | .panel-tool div.panel-tool-over{ 57 | opacity:1; 58 | filter:alpha(opacity=100); 59 | } 60 | .panel-tool-close{ 61 | background:url('images/panel_tools.gif') no-repeat -16px 0px; 62 | } 63 | .panel-tool-min{ 64 | background:url('images/panel_tools.gif') no-repeat 0px 0px; 65 | } 66 | .panel-tool-max{ 67 | background:url('images/panel_tools.gif') no-repeat 0px -16px; 68 | } 69 | .panel-tool-restore{ 70 | background:url('images/panel_tools.gif') no-repeat -16px -16px; 71 | } 72 | .panel-tool-collapse{ 73 | background:url('images/panel_tool_collapse.gif') no-repeat; 74 | } 75 | .panel-tool-expand{ 76 | background:url('images/panel_tool_expand.gif') no-repeat; 77 | } 78 | .panel-loading{ 79 | padding:11px 0px 10px 30px; 80 | background:url('images/panel_loading.gif') no-repeat 10px 10px; 81 | } 82 | 83 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/panel.css: -------------------------------------------------------------------------------- 1 | .panel{ 2 | overflow:hidden; 3 | font-size:12px; 4 | } 5 | .panel-header{ 6 | padding:5px; 7 | line-height:15px; 8 | color:#3F3F3F; 9 | font-weight:bold; 10 | font-size:12px; 11 | background:url('images/panel_title.gif') repeat-x; 12 | position:relative; 13 | border:1px solid #D3D3D3; 14 | } 15 | .panel-header-noborder{ 16 | border-width:0px; 17 | border-bottom:1px solid #D3D3D3; 18 | } 19 | .panel-body{ 20 | overflow:auto; 21 | border:1px solid #D3D3D3; 22 | border-top-width:0px; 23 | } 24 | .panel-body-noheader{ 25 | border-top-width:1px; 26 | } 27 | .panel-body-noborder{ 28 | border-width:0px; 29 | } 30 | .panel-with-icon{ 31 | padding-left:18px; 32 | } 33 | .panel-icon{ 34 | position:absolute; 35 | left:5px; 36 | top:4px; 37 | width:16px; 38 | height:16px; 39 | } 40 | 41 | .panel-tool{ 42 | position:absolute; 43 | right:5px; 44 | top:4px; 45 | } 46 | .panel-tool div{ 47 | display:block; 48 | float:right; 49 | width:16px; 50 | height:16px; 51 | margin-left:2px; 52 | cursor:pointer; 53 | opacity:0.6; 54 | filter:alpha(opacity=60); 55 | } 56 | .panel-tool div.panel-tool-over{ 57 | opacity:1; 58 | filter:alpha(opacity=100); 59 | } 60 | .panel-tool-close{ 61 | background:url('images/panel_tools.gif') no-repeat -16px 0px; 62 | } 63 | .panel-tool-min{ 64 | background:url('images/panel_tools.gif') no-repeat 0px 0px; 65 | } 66 | .panel-tool-max{ 67 | background:url('images/panel_tools.gif') no-repeat 0px -16px; 68 | } 69 | .panel-tool-restore{ 70 | background:url('images/panel_tools.gif') no-repeat -16px -16px; 71 | } 72 | .panel-tool-collapse{ 73 | background:url('images/panel_tool_collapse.gif') no-repeat; 74 | } 75 | .panel-tool-expand{ 76 | background:url('images/panel_tool_expand.gif') no-repeat; 77 | } 78 | .panel-loading{ 79 | padding:11px 0px 10px 30px; 80 | background:url('images/panel_loading.gif') no-repeat 10px 10px; 81 | } 82 | 83 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/locale/easyui-lang-bg.js: -------------------------------------------------------------------------------- 1 | if ($.fn.pagination){ 2 | $.fn.pagination.defaults.beforePageText = 'Страница'; 3 | $.fn.pagination.defaults.afterPageText = 'от {pages}'; 4 | $.fn.pagination.defaults.displayMsg = 'Показани {from} за {to} от {total} продукти'; 5 | } 6 | if ($.fn.datagrid){ 7 | $.fn.datagrid.defaults.loadMsg = 'Обработка, моля изчакайте ...'; 8 | } 9 | if ($.messager){ 10 | $.messager.defaults.ok = 'Добре'; 11 | $.messager.defaults.cancel = 'Задрасквам'; 12 | } 13 | if ($.fn.validatebox){ 14 | $.fn.validatebox.defaults.missingMessage = 'Това поле е задължително.'; 15 | $.fn.validatebox.defaults.rules.email.message = 'Моля, въведете валиден имейл адрес.'; 16 | $.fn.validatebox.defaults.rules.url.message = 'Моля въведете валиден URL.'; 17 | $.fn.validatebox.defaults.rules.length.message = 'Моля, въведете стойност между {0} и {1}.'; 18 | } 19 | if ($.fn.numberbox){ 20 | $.fn.numberbox.defaults.missingMessage = 'Това поле е задължително.'; 21 | } 22 | if ($.fn.combobox){ 23 | $.fn.combobox.defaults.missingMessage = 'Това поле е задължително.'; 24 | } 25 | if ($.fn.combotree){ 26 | $.fn.combotree.defaults.missingMessage = 'Това поле е задължително.'; 27 | } 28 | if ($.fn.calendar){ 29 | $.fn.calendar.defaults.weeks = ['S','M','T','W','T','F','S']; 30 | $.fn.calendar.defaults.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; 31 | } 32 | if ($.fn.datebox){ 33 | $.fn.datebox.defaults.currentText = 'Днес'; 34 | $.fn.datebox.defaults.closeText = 'Близо'; 35 | $.fn.datebox.defaults.okText = 'Добре'; 36 | $.fn.datebox.defaults.missingMessage = 'Това поле е задължително.'; 37 | } 38 | if ($.fn.datetimebox && $.fn.datebox){ 39 | $.extend($.fn.datetimebox.defaults,{ 40 | currentText: $.fn.datebox.defaults.currentText, 41 | closeText: $.fn.datebox.defaults.closeText, 42 | okText: $.fn.datebox.defaults.okText, 43 | missingMessage: $.fn.datebox.defaults.missingMessage 44 | }); 45 | } 46 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/locale/easyui-lang-cs.js: -------------------------------------------------------------------------------- 1 | if ($.fn.pagination){ 2 | $.fn.pagination.defaults.beforePageText = 'Strana'; 3 | $.fn.pagination.defaults.afterPageText = 'z {pages}'; 4 | $.fn.pagination.defaults.displayMsg = 'Zobrazuji {from} do {to} z {celkové} položky'; 5 | } 6 | if ($.fn.datagrid){ 7 | $.fn.datagrid.defaults.loadMsg = 'Zpracování, čekejte prosím ...'; 8 | } 9 | if ($.messager){ 10 | $.messager.defaults.ok = 'Ok'; 11 | $.messager.defaults.cancel = 'Zrušit'; 12 | } 13 | if ($.fn.validatebox){ 14 | $.fn.validatebox.defaults.missingMessage = 'Toto pole je vyžadováno.'; 15 | $.fn.validatebox.defaults.rules.email.message = 'Zadejte prosím platnou e-mailovou adresu.'; 16 | $.fn.validatebox.defaults.rules.url.message = 'Zadejte prosím platnou adresu URL.'; 17 | $.fn.validatebox.defaults.rules.length.message = 'Prosím, zadejte hodnotu mezi {0} a {1}.'; 18 | } 19 | if ($.fn.numberbox){ 20 | $.fn.numberbox.defaults.missingMessage = 'Toto pole je vyžadováno.'; 21 | } 22 | if ($.fn.combobox){ 23 | $.fn.combobox.defaults.missingMessage = 'Toto pole je vyžadováno.'; 24 | } 25 | if ($.fn.combotree){ 26 | $.fn.combotree.defaults.missingMessage = 'Toto pole je vyžadováno.'; 27 | } 28 | if ($.fn.calendar){ 29 | $.fn.calendar.defaults.weeks = ['S','M','T','W','T','F','S']; 30 | $.fn.calendar.defaults.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; 31 | } 32 | if ($.fn.datebox){ 33 | $.fn.datebox.defaults.currentText = 'Dnes'; 34 | $.fn.datebox.defaults.closeText = 'Zavřít'; 35 | $.fn.datebox.defaults.okText = 'Ok'; 36 | $.fn.datebox.defaults.missingMessage = 'Toto pole je vyžadováno.'; 37 | } 38 | if ($.fn.datetimebox && $.fn.datebox){ 39 | $.extend($.fn.datetimebox.defaults,{ 40 | currentText: $.fn.datebox.defaults.currentText, 41 | closeText: $.fn.datebox.defaults.closeText, 42 | okText: $.fn.datebox.defaults.okText, 43 | missingMessage: $.fn.datebox.defaults.missingMessage 44 | }); 45 | } 46 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/locale/easyui-lang-ca.js: -------------------------------------------------------------------------------- 1 | if ($.fn.pagination){ 2 | $.fn.pagination.defaults.beforePageText = 'Pàgina'; 3 | $.fn.pagination.defaults.afterPageText = 'de {pages}'; 4 | $.fn.pagination.defaults.displayMsg = "Veient {from} a {to} de {total} d'articles"; 5 | } 6 | if ($.fn.datagrid){ 7 | $.fn.datagrid.defaults.loadMsg = 'Elaboració, si us plau esperi ...'; 8 | } 9 | if ($.messager){ 10 | $.messager.defaults.ok = 'Ok'; 11 | $.messager.defaults.cancel = 'Cancel'; 12 | } 13 | if ($.fn.validatebox){ 14 | $.fn.validatebox.defaults.missingMessage = 'Aquest camp és obligatori.'; 15 | $.fn.validatebox.defaults.rules.email.message = 'Introduïu una adreça de correu electrònic vàlida.'; 16 | $.fn.validatebox.defaults.rules.url.message = 'Si us plau, introduïu un URL vàlida.'; 17 | $.fn.validatebox.defaults.rules.length.message = 'Si us plau, introduïu un valor entre {0} i {1}.'; 18 | } 19 | if ($.fn.numberbox){ 20 | $.fn.numberbox.defaults.missingMessage = 'Aquest camp és obligatori.'; 21 | } 22 | if ($.fn.combobox){ 23 | $.fn.combobox.defaults.missingMessage = 'Aquest camp és obligatori.'; 24 | } 25 | if ($.fn.combotree){ 26 | $.fn.combotree.defaults.missingMessage = 'Aquest camp és obligatori.'; 27 | } 28 | if ($.fn.calendar){ 29 | $.fn.calendar.defaults.weeks = ['S','M','T','W','T','F','S']; 30 | $.fn.calendar.defaults.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; 31 | } 32 | if ($.fn.datebox){ 33 | $.fn.datebox.defaults.currentText = 'Avui'; 34 | $.fn.datebox.defaults.closeText = 'Tancar'; 35 | $.fn.datebox.defaults.okText = 'Ok'; 36 | $.fn.datebox.defaults.missingMessage = 'Aquest camp és obligatori.'; 37 | } 38 | if ($.fn.datetimebox && $.fn.datebox){ 39 | $.extend($.fn.datetimebox.defaults,{ 40 | currentText: $.fn.datebox.defaults.currentText, 41 | closeText: $.fn.datebox.defaults.closeText, 42 | okText: $.fn.datebox.defaults.okText, 43 | missingMessage: $.fn.datebox.defaults.missingMessage 44 | }); 45 | } 46 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/locale/easyui-lang-de.js: -------------------------------------------------------------------------------- 1 | if ($.fn.pagination){ 2 | $.fn.pagination.defaults.beforePageText = 'Seite'; 3 | $.fn.pagination.defaults.afterPageText = 'von {pages}'; 4 | $.fn.pagination.defaults.displayMsg = 'Angezeigte {from} zu {to} von {total} Artikel'; 5 | } 6 | if ($.fn.datagrid){ 7 | $.fn.datagrid.defaults.loadMsg = 'Processing, bitte warten ...'; 8 | } 9 | if ($.messager){ 10 | $.messager.defaults.ok = 'OK'; 11 | $.messager.defaults.cancel = 'Stornieren'; 12 | } 13 | if ($.fn.validatebox){ 14 | $.fn.validatebox.defaults.missingMessage = 'Dieses Feld ist obligatorisch.'; 15 | $.fn.validatebox.defaults.rules.email.message = 'Bitte geben Sie eine gültige E-Mail-Adresse.'; 16 | $.fn.validatebox.defaults.rules.url.message = 'Bitte geben Sie eine gültige URL.'; 17 | $.fn.validatebox.defaults.rules.length.message = 'Bitte geben Sie einen Wert zwischen {0} und {1}.'; 18 | } 19 | if ($.fn.numberbox){ 20 | $.fn.numberbox.defaults.missingMessage = 'Dieses Feld ist obligatorisch.'; 21 | } 22 | if ($.fn.combobox){ 23 | $.fn.combobox.defaults.missingMessage = 'Dieses Feld ist obligatorisch.'; 24 | } 25 | if ($.fn.combotree){ 26 | $.fn.combotree.defaults.missingMessage = 'Dieses Feld ist obligatorisch.'; 27 | } 28 | if ($.fn.calendar){ 29 | $.fn.calendar.defaults.weeks = ['S','M','T','W','T','F','S']; 30 | $.fn.calendar.defaults.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; 31 | } 32 | if ($.fn.datebox){ 33 | $.fn.datebox.defaults.currentText = 'Heute'; 34 | $.fn.datebox.defaults.closeText = 'Schließen'; 35 | $.fn.datebox.defaults.okText = 'OK'; 36 | $.fn.datebox.defaults.missingMessage = 'Dieses Feld ist obligatorisch.'; 37 | } 38 | if ($.fn.datetimebox && $.fn.datebox){ 39 | $.extend($.fn.datetimebox.defaults,{ 40 | currentText: $.fn.datebox.defaults.currentText, 41 | closeText: $.fn.datebox.defaults.closeText, 42 | okText: $.fn.datebox.defaults.okText, 43 | missingMessage: $.fn.datebox.defaults.missingMessage 44 | }); 45 | } 46 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/locale/easyui-lang-fr.js: -------------------------------------------------------------------------------- 1 | if ($.fn.pagination){ 2 | $.fn.pagination.defaults.beforePageText = 'Page'; 3 | $.fn.pagination.defaults.afterPageText = 'de {pages}'; 4 | $.fn.pagination.defaults.displayMsg = 'Affichage de {from} et {to} au {total} des articles'; 5 | } 6 | if ($.fn.datagrid){ 7 | $.fn.datagrid.defaults.loadMsg = "Traitement, s'il vous plaît patienter ..."; 8 | } 9 | if ($.messager){ 10 | $.messager.defaults.ok = 'Ok'; 11 | $.messager.defaults.cancel = 'Annuler'; 12 | } 13 | if ($.fn.validatebox){ 14 | $.fn.validatebox.defaults.missingMessage = 'Ce champ est obligatoire.'; 15 | $.fn.validatebox.defaults.rules.email.message = "S'il vous plaît entrer une adresse email valide."; 16 | $.fn.validatebox.defaults.rules.url.message = "S'il vous plaît entrer une URL valide."; 17 | $.fn.validatebox.defaults.rules.length.message = "S'il vous plaît entrez une valeur comprise entre {0} et {1}."; 18 | } 19 | if ($.fn.numberbox){ 20 | $.fn.numberbox.defaults.missingMessage = 'Ce champ est obligatoire.'; 21 | } 22 | if ($.fn.combobox){ 23 | $.fn.combobox.defaults.missingMessage = 'Ce champ est obligatoire.'; 24 | } 25 | if ($.fn.combotree){ 26 | $.fn.combotree.defaults.missingMessage = 'Ce champ est obligatoire.'; 27 | } 28 | if ($.fn.calendar){ 29 | $.fn.calendar.defaults.weeks = ['S','M','T','W','T','F','S']; 30 | $.fn.calendar.defaults.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; 31 | } 32 | if ($.fn.datebox){ 33 | $.fn.datebox.defaults.currentText = "Aujourd'hui"; 34 | $.fn.datebox.defaults.closeText = 'Fermer'; 35 | $.fn.datebox.defaults.okText = 'Ok'; 36 | $.fn.datebox.defaults.missingMessage = 'Ce champ est obligatoire.'; 37 | } 38 | if ($.fn.datetimebox && $.fn.datebox){ 39 | $.extend($.fn.datetimebox.defaults,{ 40 | currentText: $.fn.datebox.defaults.currentText, 41 | closeText: $.fn.datebox.defaults.closeText, 42 | okText: $.fn.datebox.defaults.okText, 43 | missingMessage: $.fn.datebox.defaults.missingMessage 44 | }); 45 | } 46 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/pagejs/common.js: -------------------------------------------------------------------------------- 1 | $.ajaxSetup({ 2 | contentType: "application/x-www-form-urlencoded;charset=utf-8", 3 | complete: function (xmlHttpRequest, textStatus) { 4 | if (xmlHttpRequest.status == 403) { 5 | window.top.location.replace("/login.html"); 6 | } 7 | } 8 | }); 9 | 10 | function dateFormatter(value, split) { 11 | split = split || '/'; 12 | var date = new Date(value); 13 | var year = date.getFullYear().toString(); 14 | var month = (date.getMonth() + 1); 15 | var day = date.getDate().toString(); 16 | var hour = date.getHours().toString(); 17 | var minutes = date.getMinutes().toString(); 18 | var seconds = date.getSeconds().toString(); 19 | if (month < 10) { 20 | month = "0" + month; 21 | } 22 | if (day < 10) { 23 | day = "0" + day; 24 | } 25 | if (hour < 10) { 26 | hour = "0" + hour; 27 | } 28 | if (minutes < 10) { 29 | minutes = "0" + minutes; 30 | } 31 | if (seconds < 10) { 32 | seconds = "0" + seconds; 33 | } 34 | return year + split + month + split + day + " " + hour + ":" + minutes + ":" + seconds; 35 | } 36 | 37 | function dateFormatYMD(date) { 38 | var year = date.getFullYear().toString(); 39 | var month = (date.getMonth() + 1); 40 | var day = date.getDate().toString(); 41 | if (month < 10) { 42 | month = "0" + month; 43 | } 44 | if (day < 10) { 45 | day = "0" + day; 46 | } 47 | return year + "-" + month + "-" + day; 48 | } 49 | 50 | String.prototype.startWith = function (startStr) { 51 | var d = this.length - startStr.length; 52 | return (d >= 0 && this.indexOf(startStr) == 0) 53 | } 54 | 55 | String.prototype.endWith = function (endStr) { 56 | var d = this.length - endStr.length; 57 | return (d >= 0 && this.lastIndexOf(endStr) == d) 58 | } 59 | 60 | function getGridHeight() { 61 | var height = document.body.clientHeight - 100; 62 | return height <= 0 ? 480 : height; 63 | } 64 | 65 | $(function () { 66 | $(".layout-button-left").hide(); 67 | }); 68 | -------------------------------------------------------------------------------- /api-gateway-common/src/main/java/com/zhiyong/gateway/common/enums/ErrorCode.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.common.enums; 2 | 3 | /** 4 | * @ClassName ErrorCode 5 | * @Description: 网关统一错误码 6 | * @Author 毛军锐 7 | * @Date 2020/11/24 下午9:07 8 | **/ 9 | public enum ErrorCode { 10 | ISP_SYSTEM_ERROR(500, "isp.error:system-error", "系统开小差了"), 11 | ISP_CONFIG_ERROR(500, "isp.error:config-error", "系统配置错误"), 12 | ISP_API_PROVIDER_NOT_FOUND(500, "isp.error:api-provider-not-found", "找不到API服务提供方"), 13 | ISP_API_STATE_INVALID(5001, "isp.error:api-state-invalid", "api状态异常"), 14 | ISP_API_SIGN_FAIL(5001, "isp.error:api-sign-fail", "计算签名失败"), 15 | ISV_ILLEGAL_ARGUMENT(4001, "isv.error:illegal-argument", "非法请求参数"), 16 | ISV_ARGUMENT_TYPE_ERROR(4001, "isv.error:argument-type-error", "请求参数类型错误"), 17 | ISV_NOT_SUPPORT_REQ_TYPE(4001, "isv.error:not-support-request-type", "不支持的请求类型"), 18 | ISV_LOGIN_FAIL(5002, "isv.error:login-fail", "登录失败"), 19 | ISV_SIGN_NO_PASS(5006, "isv.error:sign-no-pass", "签名不正确"), 20 | ISV_NO_AUTH(401, "isv.error:no-auth", "无权访问,未登录或登录已过期"), 21 | ISV_NO_PERMISSION(1110, "isv.error:no-auth", "无权访问该资源信息"), 22 | ISV_TOKEN_TENANT_EMPTY(1100, "isv.error:no-session", "用户还没有绑定任何租户"), 23 | ; 24 | 25 | private int state; 26 | private String code; 27 | private String desc; 28 | 29 | ErrorCode(int state, String code, String desc) { 30 | this.state = state; 31 | this.code = code; 32 | this.desc = desc; 33 | } 34 | 35 | public int getState() { 36 | return state; 37 | } 38 | 39 | public String getCode() { 40 | return code; 41 | } 42 | 43 | public String getDesc() { 44 | return desc; 45 | } 46 | 47 | 48 | public static ErrorCode getErrorByCode(String code) { 49 | if (code == null) { 50 | return null; 51 | } 52 | ErrorCode[] values = ErrorCode.values(); 53 | for (ErrorCode item : values) { 54 | if (item.code.equals(code)) { 55 | return item; 56 | } 57 | } 58 | return null; 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/default/layout.css: -------------------------------------------------------------------------------- 1 | .layout{ 2 | position:relative; 3 | overflow:hidden; 4 | margin:0; 5 | padding:0; 6 | } 7 | .layout-panel{ 8 | position:absolute; 9 | overflow:hidden; 10 | } 11 | .layout-panel-east,.layout-panel-west{ 12 | z-index:2; 13 | background1:#fff; 14 | } 15 | .layout-panel-north,.layout-panel-south{ 16 | z-index:3; 17 | background1:#fff; 18 | } 19 | .layout-button-up{ 20 | background:url('images/layout_button_up.gif') no-repeat; 21 | } 22 | .layout-button-down{ 23 | background:url('images/layout_button_down.gif') no-repeat; 24 | } 25 | .layout-button-left{ 26 | background:url('images/layout_button_left.gif') no-repeat; 27 | } 28 | .layout-button-right{ 29 | background:url('images/layout_button_right.gif') no-repeat; 30 | } 31 | .layout-expand{ 32 | position:absolute; 33 | padding:0px 5px; 34 | padding:0px; 35 | background:#D2E0F2; 36 | font-size:1px; 37 | cursor:pointer; 38 | z-index:1; 39 | } 40 | .layout-expand .panel-header{ 41 | background:transparent; 42 | border-bottom-width:0px; 43 | } 44 | .layout-expand .panel-header .panel-tool{ 45 | top: 5px; 46 | } 47 | .layout-expand .panel-body{ 48 | overflow:hidden; 49 | } 50 | .layout-expand-over{ 51 | background:#E1F0F2; 52 | } 53 | .layout-body{ 54 | overflow:auto; 55 | background:#fff; 56 | } 57 | .layout-split-proxy-h{ 58 | position:absolute; 59 | width:5px; 60 | background:#ccc; 61 | font-size:1px; 62 | cursor:e-resize; 63 | display:none; 64 | z-index:5; 65 | } 66 | .layout-split-proxy-v{ 67 | position:absolute; 68 | height:5px; 69 | background:#ccc; 70 | font-size:1px; 71 | cursor:n-resize; 72 | display:none; 73 | z-index:5; 74 | } 75 | .layout-split-north{ 76 | border-bottom:5px solid #D2E0F2; 77 | } 78 | .layout-split-south{ 79 | border-top:5px solid #D2E0F2; 80 | } 81 | .layout-split-east{ 82 | border-left:5px solid #D2E0F2; 83 | } 84 | .layout-split-west{ 85 | border-right:5px solid #D2E0F2; 86 | } 87 | .layout-mask{ 88 | position:absolute; 89 | background:#fafafa; 90 | filter:alpha(opacity=10); 91 | opacity:0.10; 92 | z-index:4; 93 | } 94 | 95 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/themes/gray/layout.css: -------------------------------------------------------------------------------- 1 | .layout{ 2 | position:relative; 3 | overflow:hidden; 4 | margin:0; 5 | padding:0; 6 | } 7 | .layout-panel{ 8 | position:absolute; 9 | overflow:hidden; 10 | } 11 | .layout-panel-east,.layout-panel-west{ 12 | z-index:2; 13 | background1:#fff; 14 | } 15 | .layout-panel-north,.layout-panel-south{ 16 | z-index:3; 17 | background1:#fff; 18 | } 19 | .layout-button-up{ 20 | background:url('images/layout_button_up.gif') no-repeat; 21 | } 22 | .layout-button-down{ 23 | background:url('images/layout_button_down.gif') no-repeat; 24 | } 25 | .layout-button-left{ 26 | background:url('images/layout_button_left.gif') no-repeat; 27 | } 28 | .layout-button-right{ 29 | background:url('images/layout_button_right.gif') no-repeat; 30 | } 31 | .layout-expand{ 32 | position:absolute; 33 | padding:0px 5px; 34 | padding:0px; 35 | background:#efefef; 36 | font-size:1px; 37 | cursor:pointer; 38 | z-index:1; 39 | } 40 | .layout-expand .panel-header{ 41 | background:transparent; 42 | border-bottom-width:0px; 43 | } 44 | .layout-expand .panel-header .panel-tool{ 45 | top: 5px; 46 | } 47 | .layout-expand .panel-body{ 48 | overflow:hidden; 49 | } 50 | .layout-expand-over{ 51 | background:#fafafa; 52 | } 53 | .layout-body{ 54 | overflow:auto; 55 | background:#fff; 56 | } 57 | .layout-split-proxy-h{ 58 | position:absolute; 59 | width:5px; 60 | background:#ccc; 61 | font-size:1px; 62 | cursor:e-resize; 63 | display:none; 64 | z-index:5; 65 | } 66 | .layout-split-proxy-v{ 67 | position:absolute; 68 | height:5px; 69 | background:#ccc; 70 | font-size:1px; 71 | cursor:n-resize; 72 | display:none; 73 | z-index:5; 74 | } 75 | .layout-split-north{ 76 | border-bottom:5px solid #efefef; 77 | } 78 | .layout-split-south{ 79 | border-top:5px solid #efefef; 80 | } 81 | .layout-split-east{ 82 | border-left:5px solid #efefef; 83 | } 84 | .layout-split-west{ 85 | border-right:5px solid #efefef; 86 | } 87 | .layout-mask{ 88 | position:absolute; 89 | background:#fafafa; 90 | filter:alpha(opacity=10); 91 | opacity:0.10; 92 | z-index:4; 93 | } 94 | 95 | -------------------------------------------------------------------------------- /api-gateway-biz/src/main/java/com/zhiyong/gateway/biz/service/impl/OptLogServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.biz.service.impl; 2 | 3 | import com.github.pagehelper.PageHelper; 4 | import com.github.pagehelper.PageInfo; 5 | import com.zhiyong.gateway.biz.service.OptLogService; 6 | import com.zhiyong.gateway.common.model.PageRequest; 7 | import com.zhiyong.gateway.dal.dao.OptLogMapper; 8 | import com.zhiyong.gateway.dal.domain.OptLog; 9 | import com.zhiyong.gateway.dal.domain.OptLogExample; 10 | import java.util.Date; 11 | import java.util.List; 12 | import javax.annotation.Resource; 13 | import org.apache.commons.lang3.StringUtils; 14 | import org.springframework.stereotype.Service; 15 | 16 | /** 17 | * @ClassName OptLogServiceImpl 18 | * @Description: 操作日志服务 19 | * @Author 毛军锐 20 | * @Date 2020/12/22 上午11:28 21 | **/ 22 | @Service 23 | public class OptLogServiceImpl implements OptLogService { 24 | 25 | @Resource 26 | private OptLogMapper optLogMapper; 27 | 28 | @Override 29 | public void saveOptLog(OptLog optLog) { 30 | optLog.setCreateTime(new Date()); 31 | optLogMapper.insertSelective(optLog); 32 | } 33 | 34 | @Override 35 | public PageInfo pagerOptLog(String content, PageRequest pageRequest) { 36 | try { 37 | PageHelper.startPage(pageRequest.getPage(), pageRequest.getRows()); 38 | OptLogExample example = new OptLogExample(); 39 | OptLogExample.Criteria criteria = example.createCriteria(); 40 | if (StringUtils.isNotBlank(content)) { 41 | criteria.andContentLike("%" + content + "%"); 42 | } 43 | example.setOrderByClause(" id desc "); 44 | if (StringUtils.isBlank(pageRequest.getSortColumn())) { 45 | example.setOrderByClause(" id desc "); 46 | } else { 47 | example.setOrderByClause(" " + pageRequest.getSortColumn() + " " + pageRequest.getOrder()); 48 | } 49 | List optLogs = optLogMapper.selectByExample(example); 50 | PageInfo pageInfo = new PageInfo<>(optLogs); 51 | return pageInfo; 52 | } finally { 53 | PageHelper.clearPage(); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /api-gateway-biz/src/main/java/com/zhiyong/gateway/biz/job/CountApiInvokeDataJob.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.biz.job; 2 | 3 | import com.dangdang.ddframe.job.api.ShardingContext; 4 | import com.dangdang.ddframe.job.api.simple.SimpleJob; 5 | import com.zhiyong.gateway.biz.service.ApiConfigService; 6 | import com.zhiyong.gateway.biz.service.ApiCountService; 7 | import com.zhiyong.gateway.biz.service.MonitorService; 8 | import com.zhiyong.gateway.common.enums.ApiState; 9 | import com.zhiyong.gateway.dal.domain.ApiCfg; 10 | import com.zhiyong.gateway.dal.domain.ApiCount; 11 | import java.util.Date; 12 | import java.util.List; 13 | import javax.annotation.Resource; 14 | import org.slf4j.Logger; 15 | import org.slf4j.LoggerFactory; 16 | import org.springframework.stereotype.Component; 17 | 18 | /** 19 | * @ClassName CountApiInvokeDataJob 20 | * @Description: TODO 21 | * @Author 毛军锐 22 | * @Date 2020/12/9 下午2:14 23 | **/ 24 | @Component 25 | public class CountApiInvokeDataJob implements SimpleJob { 26 | 27 | private static final Logger LOGGER = LoggerFactory.getLogger(CountApiInvokeDataJob.class); 28 | 29 | @Resource 30 | private ApiConfigService apiConfigService; 31 | @Resource 32 | private MonitorService monitorService; 33 | @Resource 34 | private ApiCountService apiCountService; 35 | 36 | @Override 37 | public void execute(ShardingContext shardingContext) { 38 | boolean res = false; 39 | 40 | try { 41 | Thread.sleep(30000); 42 | List apiCfgList = apiConfigService.listApi(); 43 | for (ApiCfg apiCfg : apiCfgList) { 44 | if (apiCfg.getState() != ApiState.UP_LINE.getCode()) { 45 | continue; 46 | } 47 | ApiCount apiCount = monitorService.getCallApiCount(apiCfg.getApiName(), 48 | apiCfg.getApiVersion(), new Date()); 49 | if (apiCount != null) { 50 | apiCountService.saveApiCount(apiCount); 51 | } 52 | } 53 | res = true; 54 | } catch (Exception e) { 55 | LOGGER.error("API调用数据定时统计出错:", e); 56 | } finally { 57 | LOGGER.info("=====统计API调用数据结束, 执行结果:{}======", res ? "成功" : "失败"); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /api-gateway-biz/src/main/java/com/zhiyong/gateway/biz/cache/ApiConfigCache.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.biz.cache; 2 | 3 | import com.zhiyong.gateway.biz.model.ApiCache; 4 | import com.zhiyong.gateway.common.constant.CommonConstant; 5 | import com.zhiyong.gateway.dal.domain.AppCfg; 6 | import com.zhiyong.gateway.dal.domain.PojoTypeJson; 7 | import javax.annotation.Resource; 8 | import org.springframework.stereotype.Component; 9 | 10 | /** 11 | * @ClassName ApiConfigCache 12 | * @Description: API配置缓存 13 | * @Author 毛军锐 14 | * @Date 2020/12/21 下午3:42 15 | **/ 16 | @Component 17 | public class ApiConfigCache { 18 | 19 | @Resource 20 | private ApiConfigLocalCache localCache; 21 | @Resource 22 | private ApiConfigRedisCache remoteCache; 23 | 24 | /** 25 | * 根据APPKEY查询APP配置 26 | * 27 | * @param appKey 28 | * @return 29 | */ 30 | public AppCfg getAppCfg(String appKey) { 31 | String key = CommonConstant.APP_CFG_KEY_PRE + appKey; 32 | AppCfg appCfg = (AppCfg) localCache.getValue(key); 33 | if (appCfg == null) { 34 | appCfg = remoteCache.getAppCfg(appKey); 35 | } 36 | localCache.setValue(key, appCfg); 37 | return appCfg; 38 | } 39 | 40 | /** 41 | * 查询API信息 42 | * 43 | * @param apiName 44 | * @param version 45 | * @return 46 | */ 47 | public ApiCache getApi(String apiName, String version) { 48 | String key = CommonConstant.API_CFG_KEY_PRE + apiName + ":" + version; 49 | ApiCache apiCache = (ApiCache) localCache.getValue(key); 50 | if (apiCache == null) { 51 | apiCache = remoteCache.getApi(apiName, version); 52 | } 53 | localCache.setValue(key, apiCache); 54 | return apiCache; 55 | } 56 | 57 | /** 58 | * 获取数据结构JSON 59 | * 60 | * @param id 配置ID 61 | * @return 62 | */ 63 | public PojoTypeJson getPojoTypeJson(Integer id) { 64 | String key = CommonConstant.DATA_STRUCT_JSON_PRE + id; 65 | PojoTypeJson typeJson = (PojoTypeJson) localCache.getValue(key); 66 | if (typeJson == null) { 67 | typeJson = remoteCache.getPojoTypeJson(id); 68 | } 69 | localCache.setValue(key, typeJson); 70 | return typeJson; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/js/locale/easyui-lang-zh_CN.js: -------------------------------------------------------------------------------- 1 | if ($.fn.pagination){ 2 | $.fn.pagination.defaults.beforePageText = '第'; 3 | $.fn.pagination.defaults.afterPageText = '共{pages}页'; 4 | $.fn.pagination.defaults.displayMsg = '显示{from}到{to},共{total}记录'; 5 | } 6 | if ($.fn.datagrid){ 7 | $.fn.datagrid.defaults.loadMsg = '正在处理,请稍待。。。'; 8 | } 9 | if ($.messager){ 10 | $.messager.defaults.ok = '确定'; 11 | $.messager.defaults.cancel = '取消'; 12 | } 13 | if ($.fn.validatebox){ 14 | $.fn.validatebox.defaults.missingMessage = '该输入项为必输项'; 15 | $.fn.validatebox.defaults.rules.email.message = '请输入有效的电子邮件地址'; 16 | $.fn.validatebox.defaults.rules.url.message = '请输入有效的URL地址'; 17 | $.fn.validatebox.defaults.rules.length.message = '输入内容长度必须介于{0}和{1}之间'; 18 | } 19 | if ($.fn.numberbox){ 20 | $.fn.numberbox.defaults.missingMessage = '该输入项为必输项'; 21 | } 22 | if ($.fn.combobox){ 23 | $.fn.combobox.defaults.missingMessage = '该输入项为必输项'; 24 | } 25 | if ($.fn.combotree){ 26 | $.fn.combotree.defaults.missingMessage = '该输入项为必输项'; 27 | } 28 | if ($.fn.calendar){ 29 | $.fn.calendar.defaults.weeks = ['日','一','二','三','四','五','六']; 30 | $.fn.calendar.defaults.months = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月']; 31 | } 32 | if ($.fn.datebox){ 33 | $.fn.datebox.defaults.currentText = '今天'; 34 | $.fn.datebox.defaults.closeText = '关闭'; 35 | $.fn.datebox.defaults.okText = '确定'; 36 | $.fn.datebox.defaults.missingMessage = '该输入项为必输项'; 37 | $.fn.datebox.defaults.formatter = function(date){ 38 | var y = date.getFullYear(); 39 | var m = date.getMonth()+1; 40 | var d = date.getDate(); 41 | return y+'-'+(m<10?('0'+m):m)+'-'+(d<10?('0'+d):d); 42 | }; 43 | $.fn.datebox.defaults.parser = function(s){ 44 | var ss = s.split('-'); 45 | var y = parseInt(ss[0],10); 46 | var m = parseInt(ss[1],10); 47 | var d = parseInt(ss[2],10); 48 | if (!isNaN(y) && !isNaN(m) && !isNaN(d)){ 49 | return new Date(y,m-1,d); 50 | } else { 51 | return new Date(); 52 | } 53 | }; 54 | } 55 | if ($.fn.datetimebox && $.fn.datebox){ 56 | $.extend($.fn.datetimebox.defaults,{ 57 | currentText: $.fn.datebox.defaults.currentText, 58 | closeText: $.fn.datebox.defaults.closeText, 59 | okText: $.fn.datebox.defaults.okText, 60 | missingMessage: $.fn.datebox.defaults.missingMessage 61 | }); 62 | } 63 | -------------------------------------------------------------------------------- /api-gateway-facade/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | com.zhiyong.gateway 5 | api-gateway-parent 6 | 1.0.0-SNAPSHOT 7 | ../pom.xml 8 | 9 | 4.0.0 10 | com.zhiyong.gateway 11 | api-gateway-facade 12 | ${api-gateway.version} 13 | 14 | api-gateway-facade 15 | 16 | 17 | 18 | org.projectlombok 19 | lombok 20 | 21 | 22 | com.zhiyong.gateway 23 | api-gateway-common 24 | 25 | 26 | com.alibaba 27 | fastjson 28 | provided 29 | 30 | 31 | com.google.code.gson 32 | gson 33 | provided 34 | 35 | 36 | junit 37 | junit 38 | provided 39 | 40 | 41 | io.swagger 42 | swagger-annotations 43 | provided 44 | 45 | 46 | 47 | 48 | 49 | 50 | org.apache.maven.plugins 51 | maven-source-plugin 52 | 53 | 54 | attach-sources 55 | 56 | jar-no-fork 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/templates/api/api-list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 致用网关平台-API列表 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 |
22 |
    23 |
    24 |
    25 |
    26 |
    28 |
    29 | 30 | 32 | 34 | 查询 36 |
    37 |
    38 |
    39 |
    40 |
    41 | 42 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/java/com/zhiyong/gateway/server/processor/impl/callback/CallbackConfigLoadProcessor.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.server.processor.impl.callback; 2 | 3 | import com.zhiyong.gateway.biz.cache.ApiConfigCache; 4 | import com.zhiyong.gateway.biz.model.ApiCache; 5 | import com.zhiyong.gateway.biz.model.ApiRequest; 6 | import com.zhiyong.gateway.common.enums.ApiState; 7 | import com.zhiyong.gateway.common.enums.ErrorCode; 8 | import com.zhiyong.gateway.common.exception.GatewayException; 9 | import com.zhiyong.gateway.common.util.AssertUtil; 10 | import com.zhiyong.gateway.dal.domain.AppCfg; 11 | import com.zhiyong.gateway.server.constant.RequestHeaderConstant; 12 | import com.zhiyong.gateway.server.context.ApiContext; 13 | import com.zhiyong.gateway.server.processor.ApiProcessor; 14 | import javax.annotation.Resource; 15 | import org.springframework.stereotype.Component; 16 | 17 | /** 18 | * @ClassName ApiConfigLoadProcessor 19 | * @Description: API配置加载处理器 20 | * @Author 毛军锐 21 | * @Date 2020/11/25 下午4:23 22 | **/ 23 | @Component 24 | public class CallbackConfigLoadProcessor implements ApiProcessor { 25 | 26 | @Resource 27 | private ApiConfigCache apiConfigCache; 28 | 29 | @Override 30 | public String getName() { 31 | return CallbackConfigLoadProcessor.class.getName(); 32 | } 33 | 34 | @Override 35 | public void run(ApiContext context) throws GatewayException { 36 | ApiRequest apiRequest = context.getApiRequest(); 37 | ApiCache apiCache = apiConfigCache.getApi(apiRequest.getMethod(), apiRequest.getVersion()); 38 | AssertUtil.notNull("The method or version not exist!", apiCache); 39 | String apiName = apiRequest.getMethod() + ":" + apiRequest.getVersion(); 40 | AssertUtil.notNull(RequestHeaderConstant.METHOD + ":" + apiName, apiCache.getApiCfg()); 41 | if (context.getApiType().getCode() != apiCache.getApiCfg().getApiType()) { 42 | throw new GatewayException(ErrorCode.ISV_NO_PERMISSION, "请求地址与API类型不匹配"); 43 | } 44 | // API状态检查 45 | if (apiCache.getApiCfg().getState() != ApiState.UP_LINE.getCode()) { 46 | throw new GatewayException(ErrorCode.ISP_API_STATE_INVALID, "该API处于非发布状态,不能被调用"); 47 | } 48 | // 回写参数 49 | context.setApiCfg(apiCache.getApiCfg()); 50 | context.setApiParamCfgList(apiCache.getParamCfgs()); 51 | context.setApiResultCfgList(apiCache.getResultCfgs()); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /api-gateway-biz/src/main/java/com/zhiyong/gateway/biz/listener/ConfigChangeMessageListener.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.biz.listener; 2 | 3 | import com.zhiyong.gateway.biz.cache.ApiConfigLocalCache; 4 | import com.zhiyong.gateway.biz.cache.FlowControlRuleCache; 5 | import com.zhiyong.gateway.biz.model.ApiCache; 6 | import com.zhiyong.gateway.dal.resdis.RedisMapper; 7 | import javax.annotation.Resource; 8 | import org.apache.commons.lang3.StringUtils; 9 | import org.slf4j.Logger; 10 | import org.slf4j.LoggerFactory; 11 | import org.springframework.data.redis.connection.Message; 12 | import org.springframework.data.redis.connection.MessageListener; 13 | import org.springframework.data.redis.core.RedisTemplate; 14 | import org.springframework.stereotype.Component; 15 | 16 | /** 17 | * @ClassName ConfigChangeMessageListener 18 | * @Description: 配置变更redis消息通知 19 | * @Author 毛军锐 20 | * @Date 2020/12/21 下午3:50 21 | **/ 22 | @Component 23 | public class ConfigChangeMessageListener implements MessageListener { 24 | 25 | private static final Logger LOGGER = LoggerFactory.getLogger(ConfigChangeMessageListener.class); 26 | 27 | @Resource 28 | private RedisMapper redisMapper; 29 | @Resource 30 | private RedisTemplate redisTemplate; 31 | @Resource 32 | private ApiConfigLocalCache localCache; 33 | @Resource 34 | private FlowControlRuleCache flowControlRuleCache; 35 | 36 | /** 37 | * 接收消息 38 | * 39 | * @param message 40 | * @param pattern 41 | */ 42 | @Override 43 | public void onMessage(Message message, byte[] pattern) { 44 | try { 45 | String content = (String) redisTemplate.getValueSerializer() 46 | .deserialize(message.getBody()); 47 | if (StringUtils.isEmpty(content)) { 48 | return; 49 | } 50 | localCache.delete(content); 51 | updateFlowControlRule(content); 52 | LOGGER.info("====刷新配置[{}]的本地缓存", content); 53 | } catch (Exception e) { 54 | LOGGER.error("清除本地缓存配置redis消息异常:", e); 55 | } 56 | } 57 | 58 | /** 59 | * 更新API流控规则 60 | * @param content 61 | */ 62 | private void updateFlowControlRule(String content) { 63 | ApiCache apiCache = (ApiCache) redisMapper.getValue(content); 64 | if (apiCache == null || apiCache.getApiCfg() == null) { 65 | return; 66 | } 67 | flowControlRuleCache.updateRule(apiCache.getApiCfg()); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /api-gateway-biz/src/main/java/com/zhiyong/gateway/biz/model/ApiRequest.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.biz.model; 2 | 3 | import lombok.Data; 4 | import org.apache.commons.lang3.StringUtils; 5 | 6 | /** 7 | * @ClassName ApiRequest 8 | * @Description: api请求对象 9 | * @Author 毛军锐 10 | * @Date 2020/11/24 下午8:26 11 | **/ 12 | @Data 13 | public class ApiRequest extends BaseRequest { 14 | /** 15 | * 请求方标识 16 | */ 17 | private String appKey; 18 | /** 19 | * 参数签名 20 | */ 21 | private String sign; 22 | /** 23 | * 请求API名称 24 | */ 25 | private String method; 26 | /** 27 | * 登录token 28 | */ 29 | private String session; 30 | /** 31 | * 时间戳 32 | */ 33 | private String timestamp; 34 | /** 35 | * 版本号 36 | */ 37 | private String version; 38 | 39 | /** 40 | * 租户ID 41 | */ 42 | private String tenantId; 43 | 44 | @Override 45 | public String toString() { 46 | StringBuilder sb = new StringBuilder(); 47 | if (StringUtils.isNotBlank(super.getClientIp())) { 48 | sb.append("[ip=").append(super.getClientIp()).append("]"); 49 | } 50 | if (StringUtils.isNotBlank(super.getDeviceId())) { 51 | sb.append("[deviceId=").append(super.getDeviceId()).append("]"); 52 | } 53 | if (StringUtils.isNotBlank(super.getOs())) { 54 | sb.append("[os=").append(super.getOs()).append("]"); 55 | } 56 | if (StringUtils.isNotBlank(super.getOsVersion())) { 57 | sb.append("[osVersion=").append(super.getOsVersion()).append("]"); 58 | } 59 | if (StringUtils.isNotBlank(super.getUserAgent())) { 60 | sb.append("[userAgent=").append(super.getUserAgent()).append("]"); 61 | } 62 | if (StringUtils.isNotBlank(super.getReferer())) { 63 | sb.append("[referer=").append(super.getReferer()).append("]"); 64 | } 65 | if (StringUtils.isNotBlank(appKey)) { 66 | sb.append("[appKey=").append(appKey).append("]"); 67 | } 68 | if (StringUtils.isNotBlank(sign)) { 69 | sb.append("[sign=").append(sign).append("]"); 70 | } 71 | if (StringUtils.isNotBlank(session)) { 72 | sb.append("[session=").append(session).append("]"); 73 | } 74 | if (StringUtils.isNotBlank(version)) { 75 | sb.append("[version=").append(version).append("]"); 76 | } 77 | return sb.toString(); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/java/com/zhiyong/gateway/admin/controller/MonitorController.java: -------------------------------------------------------------------------------- 1 | package com.zhiyong.gateway.admin.controller; 2 | 3 | import com.github.pagehelper.PageInfo; 4 | import com.zhiyong.gateway.biz.service.ApiCountService; 5 | import com.zhiyong.gateway.biz.service.OptLogService; 6 | import com.zhiyong.gateway.common.model.PageRequest; 7 | import com.zhiyong.gateway.common.model.PageResult; 8 | import com.zhiyong.gateway.dal.domain.ApiCount; 9 | import com.zhiyong.gateway.dal.domain.OptLog; 10 | import javax.annotation.Resource; 11 | import org.apache.commons.lang3.StringUtils; 12 | import org.springframework.web.bind.annotation.RequestMapping; 13 | import org.springframework.web.bind.annotation.RestController; 14 | 15 | /** 16 | * @ClassName MonitorController 17 | * @Description: TODO 18 | * @Author 毛军锐 19 | * @Date 2020/12/9 下午3:23 20 | **/ 21 | @RestController 22 | @RequestMapping("/admin") 23 | public class MonitorController { 24 | 25 | @Resource 26 | private ApiCountService apiCountService; 27 | 28 | @Resource 29 | private OptLogService optLogService; 30 | 31 | /** 32 | * 获取API列表 33 | * 34 | * @return 35 | */ 36 | @RequestMapping("/getApiCountList.do") 37 | public PageResult getApiCountList(PageRequest pageRequest, String apiName, String startTime, String endTime) { 38 | if (StringUtils.isNotBlank(startTime)) { 39 | startTime = startTime.replaceAll("-", ""); 40 | } 41 | if (StringUtils.isNotBlank(endTime)) { 42 | endTime = endTime.replaceAll("-", ""); 43 | } 44 | PageInfo pageInfo = apiCountService.pagerListApiCount(apiName, startTime, endTime, pageRequest); 45 | return PageResult.builder().total(pageInfo.getTotal()) 46 | .rows(pageInfo.getList()) 47 | .pageNum(pageInfo.getPageNum()) 48 | .pageSize(pageInfo.getPageSize()) 49 | .build(); 50 | } 51 | 52 | /** 53 | * 获取操作日志列表 54 | * 55 | * @return 56 | */ 57 | @RequestMapping("/getOptLogList.do") 58 | public PageResult getOptLogList(PageRequest pageRequest, String content) { 59 | PageInfo pageInfo = optLogService.pagerOptLog(content, pageRequest); 60 | return PageResult.builder().total(pageInfo.getTotal()) 61 | .rows(pageInfo.getList()) 62 | .pageNum(pageInfo.getPageNum()) 63 | .pageSize(pageInfo.getPageSize()) 64 | .build(); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/templates/struct/struct-list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 致用网关平台-数据结构 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
    17 |
    19 |
    20 | 21 | 22 | 23 | 24 | 查询 25 |
    26 |
    27 | 29 |
    30 |
    31 | 32 | 33 |
    36 |
    37 |
    38 | 39 |
    40 |
    41 |
    42 | 43 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/css/default.css: -------------------------------------------------------------------------------- 1 | *{font-size:12px; font-family:Tahoma,Verdana,微软雅黑,新宋体} 2 | body{background:#D2E0F2; } 3 | a{ color:Black; text-decoration:none;} 4 | a:hover{ color:Red; text-decoration:underline;} 5 | .textbox03 {border: #878787 1px solid;padding: 4px 3px;font:Verdana, Geneva, sans-serif,宋体;line-height: 14px; background-color: #fff; height: auto; font-size: 14px; font-weight: bold; width: 190px; } 6 | 7 | .txt01{font:Verdana, Geneva, sans-serif,宋体;padding:3px 2px 2px 2px; border-width:1px; border-color:#ddd; color:#000;} 8 | .txt {border: #878787 1px solid;padding: 4px 3px;font:Verdana, Geneva, sans-serif,宋体;line-height: 14px; background-color: #fff; height: auto; font-size: 14px;} 9 | .footer{text-align:center;color:#15428B; margin:0px; padding:0px;line-height:23px; font-weight:bold;} 10 | 11 | .head a{color:White;text-decoration:underline;} 12 | 13 | .easyui-accordion ul{list-style-type:none;margin:0px; padding:10px;} 14 | .easyui-accordion ul li{ padding:0px;} 15 | .easyui-accordion ul li a{line-height:24px;} 16 | .easyui-accordion ul li div{margin:2px 0px;padding-left:10px;padding-top:2px;} 17 | .easyui-accordion ul li div.hover{border:1px dashed #99BBE8; background:#E0ECFF;cursor:pointer;} 18 | .easyui-accordion ul li div.hover a{color:#416AA3;} 19 | .easyui-accordion ul li div.selected{border:1px solid #99BBE8; background:#E0ECFF;cursor:default;} 20 | .easyui-accordion ul li div.selected a{color:#416AA3; font-weight:bold;} 21 | 22 | 23 | 24 | .icon{ background:url(../images/tabicons.png) no-repeat;width:18px; line-height:18px; display:inline-block;} 25 | .icon-sys{ background-position:0px -200px;} 26 | .icon-set{ background-position:-380px -200px;} 27 | .icon-add{background-position: -20px 0px;} 28 | .icon-add1{background:url('icon/edit_add.png') no-repeat;} 29 | .icon-nav{background-position: -100px -20px; } 30 | .icon-users{background-position: -100px -480px;} 31 | .icon-role{background-position: -360px -200px;} 32 | .icon-set{background-position: -380px -200px;} 33 | .icon-log{background-position: -380px -80px;} 34 | .icon-delete16{background:url('icon/delete.gif') no-repeat;width:18px; line-height:18px; display:inline-block;} 35 | .icon-delete{ background-position:-140px -120px;} 36 | .icon-edit{ background-position:-380px -320px;} 37 | .icon-magic{ background-position:0px -500px;} 38 | .icon-database{ background-position:-20px -140px;} 39 | .icon-expand{ background:url('/images/coll2.gif') no-repeat;} 40 | .icon-collapse{ background:url('/images/coll3.gif') no-repeat;} 41 | -------------------------------------------------------------------------------- /api-gateway-server/src/main/resources/static/css/default.css.bak: -------------------------------------------------------------------------------- 1 | *{font-size:12px; font-family:Tahoma,Verdana,微软雅黑,新宋体} 2 | body{background:#D2E0F2; } 3 | a{ color:Black; text-decoration:none;} 4 | a:hover{ color:Red; text-decoration:underline;} 5 | .textbox03 {border: #878787 1px solid;padding: 4px 3px;font:Verdana, Geneva, sans-serif,宋体;line-height: 14px; background-color: #fff; height: auto; font-size: 14px; font-weight: bold; width: 190px; } 6 | 7 | .txt01{font:Verdana, Geneva, sans-serif,宋体;padding:3px 2px 2px 2px; border-width:1px; border-color:#ddd; color:#000;} 8 | .txt {border: #878787 1px solid;padding: 4px 3px;font:Verdana, Geneva, sans-serif,宋体;line-height: 14px; background-color: #fff; height: auto; font-size: 14px;} 9 | .footer{text-align:center;color:#15428B; margin:0px; padding:0px;line-height:23px; font-weight:bold;} 10 | 11 | .head a{color:White;text-decoration:underline;} 12 | 13 | .easyui-accordion ul{list-style-type:none;margin:0px; padding:10px;} 14 | .easyui-accordion ul li{ padding:0px;} 15 | .easyui-accordion ul li a{line-height:24px;} 16 | .easyui-accordion ul li div{margin:2px 0px;padding-left:10px;padding-top:2px;} 17 | .easyui-accordion ul li div.hover{border:1px dashed #99BBE8; background:#E0ECFF;cursor:pointer;} 18 | .easyui-accordion ul li div.hover a{color:#416AA3;} 19 | .easyui-accordion ul li div.selected{border:1px solid #99BBE8; background:#E0ECFF;cursor:default;} 20 | .easyui-accordion ul li div.selected a{color:#416AA3; font-weight:bold;} 21 | 22 | .nav{padding-left:18px;} 23 | 24 | .icon{ background:url(../images/tabicons.png) no-repeat;width:18px; line-height:18px; display:inline-block;} 25 | .icon-sys{ background-position:0px -200px;} 26 | .icon-set{ background-position:-380px -200px;} 27 | .icon-add{background-position: -20px 0px;} 28 | .icon-add1{background:url('icon/edit_add.png') no-repeat;} 29 | .icon-nav{background-position: -100px -20px; } 30 | .icon-users{background-position: -100px -480px;} 31 | .icon-role{background-position: -360px -200px;} 32 | .icon-set{background-position: -380px -200px;} 33 | .icon-log{background-position: -380px -80px;} 34 | .icon-delete16{background:url('icon/delete.gif') no-repeat;width:18px; line-height:18px; display:inline-block;} 35 | .icon-delete{ background-position:-140px -120px;} 36 | .icon-edit{ background-position:-380px -320px;} 37 | .icon-magic{ background-position:0px -500px;} 38 | .icon-database{ background-position:-20px -140px;} 39 | .icon-expand{ background:url('/images/coll2.gif') no-repeat;} 40 | .icon-collapse{ background:url('/images/coll3.gif') no-repeat;} 41 | --------------------------------------------------------------------------------