├── .gitattributes
├── discovery-platform-server
├── discovery-platform-starter-server-ui
│ ├── src
│ │ └── main
│ │ │ └── resources
│ │ │ ├── static
│ │ │ ├── js
│ │ │ │ ├── js.js
│ │ │ │ ├── zkperformance.js
│ │ │ │ ├── autorefresh.js
│ │ │ │ └── kafkaperformance.js
│ │ │ ├── layuiadmin
│ │ │ │ ├── lib
│ │ │ │ │ ├── extend
│ │ │ │ │ │ └── layim
│ │ │ │ │ │ │ └── layim-assets
│ │ │ │ │ │ │ ├── lib
│ │ │ │ │ │ │ └── layim-mobile-open.js
│ │ │ │ │ │ │ ├── skin
│ │ │ │ │ │ │ ├── 1.jpg
│ │ │ │ │ │ │ ├── 2.jpg
│ │ │ │ │ │ │ ├── 3.jpg
│ │ │ │ │ │ │ ├── 4.jpg
│ │ │ │ │ │ │ └── 5.jpg
│ │ │ │ │ │ │ ├── error
│ │ │ │ │ │ │ ├── run.gif
│ │ │ │ │ │ │ ├── computer.gif
│ │ │ │ │ │ │ ├── operate.gif
│ │ │ │ │ │ │ └── developing.jpg
│ │ │ │ │ │ │ ├── images
│ │ │ │ │ │ │ ├── default.png
│ │ │ │ │ │ │ └── face
│ │ │ │ │ │ │ │ ├── 0.gif
│ │ │ │ │ │ │ │ ├── 1.gif
│ │ │ │ │ │ │ │ ├── 10.gif
│ │ │ │ │ │ │ │ ├── 11.gif
│ │ │ │ │ │ │ │ ├── 12.gif
│ │ │ │ │ │ │ │ ├── 13.gif
│ │ │ │ │ │ │ │ ├── 14.gif
│ │ │ │ │ │ │ │ ├── 15.gif
│ │ │ │ │ │ │ │ ├── 16.gif
│ │ │ │ │ │ │ │ ├── 17.gif
│ │ │ │ │ │ │ │ ├── 18.gif
│ │ │ │ │ │ │ │ ├── 19.gif
│ │ │ │ │ │ │ │ ├── 2.gif
│ │ │ │ │ │ │ │ ├── 20.gif
│ │ │ │ │ │ │ │ ├── 21.gif
│ │ │ │ │ │ │ │ ├── 22.gif
│ │ │ │ │ │ │ │ ├── 23.gif
│ │ │ │ │ │ │ │ ├── 24.gif
│ │ │ │ │ │ │ │ ├── 25.gif
│ │ │ │ │ │ │ │ ├── 26.gif
│ │ │ │ │ │ │ │ ├── 27.gif
│ │ │ │ │ │ │ │ ├── 28.gif
│ │ │ │ │ │ │ │ ├── 29.gif
│ │ │ │ │ │ │ │ ├── 3.gif
│ │ │ │ │ │ │ │ ├── 30.gif
│ │ │ │ │ │ │ │ ├── 31.gif
│ │ │ │ │ │ │ │ ├── 32.gif
│ │ │ │ │ │ │ │ ├── 33.gif
│ │ │ │ │ │ │ │ ├── 34.gif
│ │ │ │ │ │ │ │ ├── 35.gif
│ │ │ │ │ │ │ │ ├── 36.gif
│ │ │ │ │ │ │ │ ├── 37.gif
│ │ │ │ │ │ │ │ ├── 38.gif
│ │ │ │ │ │ │ │ ├── 39.gif
│ │ │ │ │ │ │ │ ├── 4.gif
│ │ │ │ │ │ │ │ ├── 40.gif
│ │ │ │ │ │ │ │ ├── 41.gif
│ │ │ │ │ │ │ │ ├── 42.gif
│ │ │ │ │ │ │ │ ├── 43.gif
│ │ │ │ │ │ │ │ ├── 44.gif
│ │ │ │ │ │ │ │ ├── 45.gif
│ │ │ │ │ │ │ │ ├── 46.gif
│ │ │ │ │ │ │ │ ├── 47.gif
│ │ │ │ │ │ │ │ ├── 48.gif
│ │ │ │ │ │ │ │ ├── 49.gif
│ │ │ │ │ │ │ │ ├── 5.gif
│ │ │ │ │ │ │ │ ├── 50.gif
│ │ │ │ │ │ │ │ ├── 51.gif
│ │ │ │ │ │ │ │ ├── 52.gif
│ │ │ │ │ │ │ │ ├── 53.gif
│ │ │ │ │ │ │ │ ├── 54.gif
│ │ │ │ │ │ │ │ ├── 55.gif
│ │ │ │ │ │ │ │ ├── 56.gif
│ │ │ │ │ │ │ │ ├── 57.gif
│ │ │ │ │ │ │ │ ├── 58.gif
│ │ │ │ │ │ │ │ ├── 59.gif
│ │ │ │ │ │ │ │ ├── 6.gif
│ │ │ │ │ │ │ │ ├── 60.gif
│ │ │ │ │ │ │ │ ├── 61.gif
│ │ │ │ │ │ │ │ ├── 62.gif
│ │ │ │ │ │ │ │ ├── 63.gif
│ │ │ │ │ │ │ │ ├── 64.gif
│ │ │ │ │ │ │ │ ├── 65.gif
│ │ │ │ │ │ │ │ ├── 66.gif
│ │ │ │ │ │ │ │ ├── 67.gif
│ │ │ │ │ │ │ │ ├── 68.gif
│ │ │ │ │ │ │ │ ├── 69.gif
│ │ │ │ │ │ │ │ ├── 7.gif
│ │ │ │ │ │ │ │ ├── 70.gif
│ │ │ │ │ │ │ │ ├── 71.gif
│ │ │ │ │ │ │ │ ├── 8.gif
│ │ │ │ │ │ │ │ └── 9.gif
│ │ │ │ │ │ │ ├── voice
│ │ │ │ │ │ │ └── default.mp3
│ │ │ │ │ │ │ └── html
│ │ │ │ │ │ │ └── find.html
│ │ │ │ │ └── index.js
│ │ │ │ ├── style
│ │ │ │ │ └── res
│ │ │ │ │ │ ├── logo.png
│ │ │ │ │ │ ├── bg-none.jpg
│ │ │ │ │ │ ├── layui-logo.jpg
│ │ │ │ │ │ ├── logo-black.png
│ │ │ │ │ │ └── template
│ │ │ │ │ │ ├── huge.jpg
│ │ │ │ │ │ ├── portrait.png
│ │ │ │ │ │ └── character.jpg
│ │ │ │ ├── layui
│ │ │ │ │ ├── font
│ │ │ │ │ │ ├── iconfont.eot
│ │ │ │ │ │ ├── iconfont.ttf
│ │ │ │ │ │ ├── iconfont.woff
│ │ │ │ │ │ └── iconfont.woff2
│ │ │ │ │ └── css
│ │ │ │ │ │ └── modules
│ │ │ │ │ │ ├── layer
│ │ │ │ │ │ └── default
│ │ │ │ │ │ │ ├── icon.png
│ │ │ │ │ │ │ ├── icon-ext.png
│ │ │ │ │ │ │ ├── loading-0.gif
│ │ │ │ │ │ │ ├── loading-1.gif
│ │ │ │ │ │ │ └── loading-2.gif
│ │ │ │ │ │ └── code.css
│ │ │ │ ├── tpl
│ │ │ │ │ ├── system
│ │ │ │ │ │ ├── more.html
│ │ │ │ │ │ ├── about.html
│ │ │ │ │ │ └── theme.html
│ │ │ │ │ └── layim
│ │ │ │ │ │ └── demo.html
│ │ │ │ └── modules
│ │ │ │ │ ├── user.js
│ │ │ │ │ ├── set.js
│ │ │ │ │ └── workorder.js
│ │ │ ├── favicon.ico
│ │ │ ├── images
│ │ │ │ ├── Logo.png
│ │ │ │ ├── email.png
│ │ │ │ ├── gitee.png
│ │ │ │ ├── github.png
│ │ │ │ ├── maven.png
│ │ │ │ ├── wechat.png
│ │ │ │ ├── dingding.png
│ │ │ │ ├── head_bg.png
│ │ │ │ ├── loading.gif
│ │ │ │ ├── Discovery32.png
│ │ │ │ ├── Discovery48.png
│ │ │ │ ├── Discovery64.png
│ │ │ │ ├── Polaris32.png
│ │ │ │ ├── Polaris48.png
│ │ │ │ ├── Polaris64.png
│ │ │ │ ├── gongzhonghao.png
│ │ │ │ └── graph
│ │ │ │ │ ├── gateway_blue_64.png
│ │ │ │ │ ├── gateway_gray_64.png
│ │ │ │ │ ├── service_blue_64.png
│ │ │ │ │ ├── service_gray_64.png
│ │ │ │ │ ├── gateway_black_64.png
│ │ │ │ │ ├── gateway_green_64.png
│ │ │ │ │ ├── gateway_group_64.png
│ │ │ │ │ ├── gateway_orange_64.png
│ │ │ │ │ ├── gateway_yellow_64.png
│ │ │ │ │ ├── service_black_64.png
│ │ │ │ │ ├── service_green_64.png
│ │ │ │ │ ├── service_group_64.png
│ │ │ │ │ ├── service_orange_64.png
│ │ │ │ │ ├── service_yellow_64.png
│ │ │ │ │ ├── gateway_blue_green_64.png
│ │ │ │ │ ├── gateway_green_blue_64.png
│ │ │ │ │ ├── service_blue_green_64.png
│ │ │ │ │ └── service_green_blue_64.png
│ │ │ └── css
│ │ │ │ ├── layui-table-select.css
│ │ │ │ └── show-hint.css
│ │ │ └── templates
│ │ │ ├── strategy
│ │ │ ├── add.ftl
│ │ │ └── edit.ftl
│ │ │ ├── route-arrange
│ │ │ ├── add.ftl
│ │ │ └── edit.ftl
│ │ │ ├── dashboard
│ │ │ └── list.ftl
│ │ │ ├── common
│ │ │ └── layui.ftl
│ │ │ ├── error
│ │ │ ├── 404.ftl
│ │ │ └── 500.ftl
│ │ │ ├── module
│ │ │ └── rate.ftl
│ │ │ └── ignoreurl
│ │ │ ├── add.ftl
│ │ │ └── edit.ftl
│ └── pom.xml
├── discovery-platform-starter-server-h2
│ ├── src
│ │ └── main
│ │ │ ├── resources
│ │ │ └── META-INF
│ │ │ │ └── spring.factories
│ │ │ └── java
│ │ │ └── com
│ │ │ └── nepxion
│ │ │ └── discovery
│ │ │ └── platform
│ │ │ └── server
│ │ │ └── h2
│ │ │ ├── constant
│ │ │ └── PlatformH2Constant.java
│ │ │ ├── adapter
│ │ │ └── PlatformH2LoginAdapter.java
│ │ │ └── configuration
│ │ │ └── PlatformH2AutoConfiguration.java
│ └── pom.xml
├── discovery-platform-starter-server-mysql
│ ├── src
│ │ └── main
│ │ │ ├── resources
│ │ │ └── META-INF
│ │ │ │ └── spring.factories
│ │ │ └── java
│ │ │ └── com
│ │ │ └── nepxion
│ │ │ └── discovery
│ │ │ └── platform
│ │ │ └── server
│ │ │ └── mysql
│ │ │ ├── constant
│ │ │ └── PlatformMySqlConstant.java
│ │ │ └── adapter
│ │ │ └── PlatformMySqlLoginAdapter.java
│ └── pom.xml
├── discovery-platform-starter-server
│ └── src
│ │ └── main
│ │ ├── resources
│ │ ├── mapper
│ │ │ ├── DicMapper.xml
│ │ │ ├── RoleMapper.xml
│ │ │ ├── BlacklistMapper.xml
│ │ │ ├── RouteZuulMapper.xml
│ │ │ ├── RouteGatewayMapper.xml
│ │ │ ├── RouteStrategyMapper.xml
│ │ │ ├── RouteArrangeMapper.xml
│ │ │ ├── RouteMapper.xml
│ │ │ ├── StrategyMapper.xml
│ │ │ ├── AdminMapper.xml
│ │ │ └── PermissionMapper.xml
│ │ └── META-INF
│ │ │ └── spring.factories
│ │ └── java
│ │ └── com
│ │ └── nepxion
│ │ └── discovery
│ │ └── platform
│ │ └── server
│ │ ├── service
│ │ ├── DicService.java
│ │ ├── ConsoleService.java
│ │ ├── RouteService.java
│ │ ├── base
│ │ │ └── BasePublishService.java
│ │ ├── RouteStrategyService.java
│ │ ├── BlacklistService.java
│ │ ├── DicServiceImpl.java
│ │ ├── RoleService.java
│ │ ├── RouteZuulService.java
│ │ ├── RouteGatewayService.java
│ │ ├── PermissionService.java
│ │ ├── ConsoleServiceImpl.java
│ │ ├── StrategyService.java
│ │ ├── RouteArrangeService.java
│ │ ├── MenuService.java
│ │ └── RouteServiceImpl.java
│ │ ├── adapter
│ │ └── PlatformLoginAdapter.java
│ │ ├── mapper
│ │ ├── DicMapper.java
│ │ ├── RoleMapper.java
│ │ ├── BlacklistMapper.java
│ │ ├── RouteZuulMapper.java
│ │ ├── RouteGatewayMapper.java
│ │ ├── RouteMapper.java
│ │ ├── RouteStrategyMapper.java
│ │ ├── RouteArrangeMapper.java
│ │ ├── StrategyMapper.java
│ │ ├── AdminMapper.java
│ │ ├── MenuMapper.java
│ │ └── PermissionMapper.java
│ │ ├── converter
│ │ └── PlatformDateConverter.java
│ │ ├── controller
│ │ ├── DashboardController.java
│ │ ├── DashboardPageController.java
│ │ ├── ErrorPageController.java
│ │ ├── RolePageController.java
│ │ ├── BlacklistPageController.java
│ │ ├── ConsoleController.java
│ │ ├── PermissionPageController.java
│ │ └── MenuPageController.java
│ │ ├── tool
│ │ ├── MybatisPlusTool.java
│ │ └── ExceptionTool.java
│ │ ├── annotation
│ │ ├── TransactionReader.java
│ │ ├── TransactionWriter.java
│ │ └── EnablePlatformServer.java
│ │ ├── exception
│ │ └── PlatformException.java
│ │ ├── event
│ │ ├── PlatformPublisher.java
│ │ ├── PlatformSubscriber.java
│ │ └── PlatformAlarmEvent.java
│ │ ├── template
│ │ ├── DeleteDirective.java
│ │ ├── InsertDirective.java
│ │ ├── SelectDirective.java
│ │ ├── UpdateDirective.java
│ │ ├── NoDeleteDirective.java
│ │ ├── NoInsertDirective.java
│ │ ├── NoSelectDirective.java
│ │ ├── NoUpdateDirective.java
│ │ ├── OnlySelectDirective.java
│ │ └── NotOnlySelectDirective.java
│ │ ├── advice
│ │ └── ModelAdvice.java
│ │ ├── properties
│ │ ├── PlatformServerProperties.java
│ │ └── PlatformDataSourceProperties.java
│ │ ├── entity
│ │ ├── enums
│ │ │ ├── LoginMode.java
│ │ │ └── Operation.java
│ │ └── po
│ │ │ ├── ListSearchNamePo.java
│ │ │ ├── ListSearchGatewayPo.java
│ │ │ └── ListSearchPo.java
│ │ ├── resolver
│ │ └── LoginArgumentResolver.java
│ │ ├── shiro
│ │ ├── CredentialsMatcher.java
│ │ └── JwtCredentialsMatcher.java
│ │ └── interceptor
│ │ └── LoginInterceptor.java
├── discovery-platform-starter-server-ldap
│ ├── src
│ │ └── main
│ │ │ ├── resources
│ │ │ └── META-INF
│ │ │ │ └── spring.factories
│ │ │ └── java
│ │ │ └── com
│ │ │ └── nepxion
│ │ │ └── discovery
│ │ │ └── platform
│ │ │ └── server
│ │ │ └── ldap
│ │ │ ├── constant
│ │ │ └── PlatformLdapConstant.java
│ │ │ └── adapter
│ │ │ └── PlatformLdapLoginAdapter.java
│ └── pom.xml
└── pom.xml
├── discovery-platform-client
├── discovery-platform-starter-client
│ ├── src
│ │ └── main
│ │ │ ├── resources
│ │ │ └── META-INF
│ │ │ │ └── spring.factories
│ │ │ └── java
│ │ │ └── com
│ │ │ └── nepxion
│ │ │ └── discovery
│ │ │ └── platform
│ │ │ └── client
│ │ │ ├── constant
│ │ │ └── PlatformConstant.java
│ │ │ └── event
│ │ │ ├── AlarmEventSubscriber.java
│ │ │ └── RuleEventSubscriber.java
│ └── pom.xml
└── pom.xml
├── .gitignore
├── .github
└── workflows
│ └── maven.yml
├── version.bat
├── discovery-platform-application
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── nepxion
│ │ └── discovery
│ │ └── platform
│ │ └── application
│ │ ├── PlatformH2Application.java
│ │ └── PlatformMySqlApplication.java
│ └── resources
│ ├── application.properties
│ ├── application-h2.properties
│ └── application-mysql.properties
├── discovery-platform-common
├── discovery-platform-starter-common-mail
│ └── pom.xml
├── discovery-platform-starter-common-dingding
│ └── pom.xml
└── pom.xml
└── deploy.bat
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Declare files that will always have UNIX line endings on checkout.
2 | *.sh text eol=lf
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/js/js.js:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/lib/extend/layim/layim-assets/lib/layim-mobile-open.js:
--------------------------------------------------------------------------------
1 | /** WebIMUI-v3.9.8 */
2 | ;layui.define(function(i){i("layim-mobile",layui.v)});
--------------------------------------------------------------------------------
/discovery-platform-client/discovery-platform-starter-client/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2 | com.nepxion.discovery.platform.client.configuration.PlatformAutoConfiguration
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-h2/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2 | com.nepxion.discovery.platform.server.h2.configuration.PlatformH2AutoConfiguration
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/favicon.ico
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-mysql/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2 | com.nepxion.discovery.platform.server.mysql.configuration.PlatformMySqlAutoConfiguration
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/Logo.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/email.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/gitee.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/gitee.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/github.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/maven.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/maven.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/wechat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/wechat.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/dingding.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/dingding.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/head_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/head_bg.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/loading.gif
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/Discovery32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/Discovery32.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/Discovery48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/Discovery48.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/Discovery64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/Discovery64.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/Polaris32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/Polaris32.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/Polaris48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/Polaris48.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/Polaris64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/Polaris64.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/gongzhonghao.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/gongzhonghao.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/style/res/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/style/res/logo.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/gateway_blue_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/gateway_blue_64.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/gateway_gray_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/gateway_gray_64.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/service_blue_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/service_blue_64.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/service_gray_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/service_gray_64.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/style/res/bg-none.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/style/res/bg-none.jpg
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/gateway_black_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/gateway_black_64.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/gateway_green_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/gateway_green_64.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/gateway_group_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/gateway_group_64.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/gateway_orange_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/gateway_orange_64.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/gateway_yellow_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/gateway_yellow_64.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/service_black_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/service_black_64.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/service_green_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/service_green_64.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/service_group_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/service_group_64.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/service_orange_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/service_orange_64.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/service_yellow_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/service_yellow_64.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/layui/font/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/layui/font/iconfont.eot
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/layui/font/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/layui/font/iconfont.ttf
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/layui/font/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/layui/font/iconfont.woff
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/layui/font/iconfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/layui/font/iconfont.woff2
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/style/res/layui-logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/style/res/layui-logo.jpg
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/style/res/logo-black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/style/res/logo-black.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/gateway_blue_green_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/gateway_blue_green_64.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/gateway_green_blue_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/gateway_green_blue_64.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/service_blue_green_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/service_blue_green_64.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/service_green_blue_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/images/graph/service_green_blue_64.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/style/res/template/huge.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/style/res/template/huge.jpg
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/style/res/template/portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/style/res/template/portrait.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/style/res/template/character.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/style/res/template/character.jpg
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/layui/css/modules/layer/default/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/layui/css/modules/layer/default/icon.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/lib/extend/layim/layim-assets/skin/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/lib/extend/layim/layim-assets/skin/1.jpg
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/lib/extend/layim/layim-assets/skin/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/lib/extend/layim/layim-assets/skin/2.jpg
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/lib/extend/layim/layim-assets/skin/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/lib/extend/layim/layim-assets/skin/3.jpg
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/lib/extend/layim/layim-assets/skin/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/lib/extend/layim/layim-assets/skin/4.jpg
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/lib/extend/layim/layim-assets/skin/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/lib/extend/layim/layim-assets/skin/5.jpg
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/lib/extend/layim/layim-assets/error/run.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/lib/extend/layim/layim-assets/error/run.gif
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/layui/css/modules/layer/default/icon-ext.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/layui/css/modules/layer/default/icon-ext.png
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/layui/css/modules/layer/default/loading-0.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/layui/css/modules/layer/default/loading-0.gif
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/layui/css/modules/layer/default/loading-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/layui/css/modules/layer/default/loading-1.gif
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/layui/css/modules/layer/default/loading-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nepxion/DiscoveryPlatform/HEAD/discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/layui/css/modules/layer/default/loading-2.gif
--------------------------------------------------------------------------------
/discovery-platform-server/discovery-platform-starter-server/src/main/resources/mapper/DicMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Haojun Ren 10 | * @version 1.0 11 | */ 12 | 13 | public class PlatformConstant { 14 | 15 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | .classpath 4 | .springBeans 5 | .factorypath 6 | # Mobile Tools for Java (J2ME) 7 | .mtj.tmp/ 8 | 9 | *.class 10 | *.classpath 11 | *.project 12 | *.springBeans 13 | bin/ 14 | log/ 15 | test-output/ 16 | 17 | # Package Files # 18 | *.jar 19 | *.war 20 | *.ear 21 | *.zip 22 | *.tar.gz 23 | *.rar 24 | *.swp 25 | *.log 26 | *.ctxt 27 | # nodejs local modules 28 | .tags* 29 | .idea/ 30 | *.iml 31 | .gradle/ 32 | .settings/ 33 | target/ 34 | hs_err_pid* -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/service/DicService.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.service; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | public interface DicService { 14 | String getByName(String name); 15 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/resources/mapper/RouteArrangeMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | public class PlatformH2Constant { 14 | public static final String H2_TYPE = "H2"; 15 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/service/ConsoleService.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.service; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Hui Liu 10 | * @version 1.0 11 | */ 12 | 13 | public interface ConsoleService { 14 | String getDiscoveryType(); 15 | 16 | String getConfigType(); 17 | } 18 | -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-ldap/src/main/java/com/nepxion/discovery/platform/server/ldap/constant/PlatformLdapConstant.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.ldap.constant; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | public class PlatformLdapConstant { 14 | public static final String LDAP_TYPE = "Ldap"; 15 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-mysql/src/main/java/com/nepxion/discovery/platform/server/mysql/constant/PlatformMySqlConstant.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.mysql.constant; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | public class PlatformMySqlConstant { 14 | public static final String MYSQL_TYPE = "MySql"; 15 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/service/RouteService.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.service; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | public interface RouteService { 14 | Integer getNextMaxCreateTimesInDayOfGateway(); 15 | 16 | Integer getNextMaxCreateTimesInDayOfZuul(); 17 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/adapter/PlatformLoginAdapter.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.adapter; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Haojun Ren 10 | * @version 1.0 11 | */ 12 | 13 | import com.nepxion.discovery.platform.server.entity.enums.LoginMode; 14 | 15 | public interface PlatformLoginAdapter { 16 | LoginMode getLoginMode(); 17 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/css/layui-table-select.css: -------------------------------------------------------------------------------- 1 | 2 | .layui-table-cell { 3 | overflow: visible !important; 4 | } 5 | 6 | td .layui-form-select { 7 | margin-top: -10px; 8 | margin-left: -15px; 9 | margin-right: -15px; 10 | } 11 | 12 | .layui-form-select dl { 13 | z-index: 9999; 14 | } 15 | 16 | .layui-table-cell { 17 | overflow: visible; 18 | } 19 | 20 | .layui-table-box { 21 | overflow: visible; 22 | } 23 | 24 | .layui-table-body { 25 | overflow: visible; 26 | } 27 | 28 | .div-inline { 29 | display: inline 30 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/resources/mapper/RouteMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.apache.ibatis.annotations.Mapper; 14 | 15 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 16 | import com.nepxion.discovery.platform.server.entity.dto.SysDicDto; 17 | 18 | @Mapper 19 | public interface DicMapper extends BaseMapperTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.apache.ibatis.annotations.Mapper; 14 | 15 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 16 | import com.nepxion.discovery.platform.server.entity.dto.SysRoleDto; 17 | 18 | @Mapper 19 | public interface RoleMapper extends BaseMapperTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.apache.ibatis.annotations.Mapper; 14 | 15 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 16 | import com.nepxion.discovery.platform.server.entity.dto.BlacklistDto; 17 | 18 | @Mapper 19 | public interface BlacklistMapper extends BaseMapperTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.apache.ibatis.annotations.Mapper; 14 | 15 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 16 | import com.nepxion.discovery.platform.server.entity.dto.RouteZuulDto; 17 | 18 | @Mapper 19 | public interface RouteZuulMapper extends BaseMapperTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.apache.ibatis.annotations.Mapper; 14 | 15 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 16 | import com.nepxion.discovery.platform.server.entity.dto.RouteGatewayDto; 17 | 18 | @Mapper 19 | public interface RouteGatewayMapper extends BaseMapperTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.apache.ibatis.annotations.Mapper; 14 | import org.apache.ibatis.annotations.Param; 15 | 16 | @Mapper 17 | public interface RouteMapper { 18 | Integer getNextMaxCreateTimesInDay(@Param("tableName") String tableName, @Param("startTime") String startTime, @Param("endTime") String endTime); 19 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/mapper/RouteStrategyMapper.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.mapper; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.apache.ibatis.annotations.Mapper; 14 | 15 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 16 | import com.nepxion.discovery.platform.server.entity.dto.RouteStrategyDto; 17 | 18 | @Mapper 19 | public interface RouteStrategyMapper extends BaseMapperTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.apache.ibatis.annotations.Mapper; 14 | 15 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 16 | import com.nepxion.discovery.platform.server.entity.dto.RouteArrangeDto; 17 | 18 | @Mapper 19 | public interface RouteArrangeMapper extends BaseMapper
13 | Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Haojun Ren 10 | * @version 1.0 11 | */ 12 | 13 | import com.nepxion.discovery.platform.server.adapter.PlatformLoginAdapter; 14 | import com.nepxion.discovery.platform.server.entity.enums.LoginMode; 15 | 16 | public class PlatformH2LoginAdapter implements PlatformLoginAdapter { 17 | @Override 18 | public LoginMode getLoginMode() { 19 | return LoginMode.DATABASE; 20 | } 21 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-ldap/src/main/java/com/nepxion/discovery/platform/server/ldap/adapter/PlatformLdapLoginAdapter.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.ldap.adapter; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Haojun Ren 10 | * @version 1.0 11 | */ 12 | 13 | import com.nepxion.discovery.platform.server.adapter.PlatformLoginAdapter; 14 | import com.nepxion.discovery.platform.server.entity.enums.LoginMode; 15 | 16 | public class PlatformLdapLoginAdapter implements PlatformLoginAdapter { 17 | @Override 18 | public LoginMode getLoginMode() { 19 | return LoginMode.LDAP; 20 | } 21 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/tpl/system/about.html: -------------------------------------------------------------------------------- 1 | 2 |5 | 8 |9 |
14 | 一套用于开发各类管理系统的通用型纯静态网页界面模板,在原有的开源免费的 layui 的基础上,重点升级了 layout 布局方案,以及对内置的 UI 组件在各类实际业务场景下进行相对丰富的模拟示例。该界面模板受国家计算机软件著作权保护(登记号:2018SR410669),禁止公开及传播模板源文件、盗版及非法倒卖等,违者将自行承担相应的法律责任。 15 |16 |
Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Haojun Ren 10 | * @version 1.0 11 | */ 12 | 13 | import com.nepxion.discovery.platform.server.adapter.PlatformLoginAdapter; 14 | import com.nepxion.discovery.platform.server.entity.enums.LoginMode; 15 | 16 | public class PlatformMySqlLoginAdapter implements PlatformLoginAdapter { 17 | @Override 18 | public LoginMode getLoginMode() { 19 | return LoginMode.DATABASE; 20 | } 21 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/converter/PlatformDateConverter.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.converter; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.util.Date; 14 | 15 | import org.springframework.core.convert.converter.Converter; 16 | 17 | import com.nepxion.discovery.platform.server.tool.DateTool; 18 | 19 | public class PlatformDateConverter implements ConverterTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.io.Serializable; 14 | 15 | import com.nepxion.discovery.platform.server.entity.base.BaseStateEntity; 16 | 17 | public interface BasePublishServiceTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.util.List; 14 | 15 | import org.apache.ibatis.annotations.Mapper; 16 | 17 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 18 | import com.nepxion.discovery.platform.server.entity.dto.StrategyDto; 19 | 20 | @Mapper 21 | public interface StrategyMapper extends BaseMapperTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.springframework.web.bind.annotation.RequestMapping; 14 | import org.springframework.web.bind.annotation.RestController; 15 | 16 | import io.swagger.annotations.Api; 17 | 18 | @Api("首页Dashboard看板相关接口") 19 | @RestController 20 | @RequestMapping(DashboardController.PREFIX) 21 | public class DashboardController { 22 | public static final String PREFIX = "dashboard"; 23 | 24 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/templates/common/layui.ftl: -------------------------------------------------------------------------------- 1 | <#assign ctx=request.contextPath> 2 | 3 |Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.apache.commons.lang3.StringUtils; 14 | 15 | import com.baomidou.mybatisplus.annotation.TableName; 16 | 17 | public class MybatisPlusTool { 18 | public static String getTableName(Class> tClass) { 19 | TableName tableName = tClass.getAnnotation(TableName.class); 20 | if (tableName == null) { 21 | return StringUtils.EMPTY; 22 | } 23 | return tableName.value(); 24 | } 25 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/css/show-hint.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-hints { 2 | position: absolute; 3 | z-index: 10; 4 | overflow: hidden; 5 | list-style: none; 6 | 7 | margin: 0; 8 | padding: 2px; 9 | 10 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 11 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 12 | box-shadow: 2px 3px 5px rgba(0,0,0,.2); 13 | border-radius: 3px; 14 | border: 1px solid silver; 15 | 16 | background: white; 17 | font-size: 90%; 18 | font-family: monospace; 19 | 20 | max-height: 20em; 21 | overflow-y: auto; 22 | } 23 | 24 | .CodeMirror-hint { 25 | margin: 0; 26 | padding: 0 4px; 27 | border-radius: 2px; 28 | white-space: pre; 29 | color: black; 30 | cursor: pointer; 31 | } 32 | 33 | li.CodeMirror-hint-active { 34 | background: #08f; 35 | color: white; 36 | } 37 | -------------------------------------------------------------------------------- /version.bat: -------------------------------------------------------------------------------- 1 | @echo on 2 | @echo ============================================================= 3 | @echo $ $ 4 | @echo $ Nepxion Discovery $ 5 | @echo $ $ 6 | @echo $ $ 7 | @echo $ $ 8 | @echo $ Nepxion Studio All Right Reserved $ 9 | @echo $ Copyright (C) 2017-2050 $ 10 | @echo $ $ 11 | @echo ============================================================= 12 | @echo. 13 | @echo off 14 | 15 | @title Nepxion Discovery 16 | @color 0a 17 | 18 | call mvn versions:set -DgenerateBackupPoms=false -DnewVersion=1.0.0-SNAPSHOT 19 | pause -------------------------------------------------------------------------------- /discovery-platform-client/discovery-platform-starter-client/src/main/java/com/nepxion/discovery/platform/client/event/AlarmEventSubscriber.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.client.event; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Haojun Ren 10 | * @version 1.0 11 | */ 12 | 13 | import com.google.common.eventbus.Subscribe; 14 | import com.nepxion.discovery.plugin.strategy.event.StrategyAlarmEvent; 15 | import com.nepxion.eventbus.annotation.EventBus; 16 | 17 | @EventBus 18 | public class AlarmEventSubscriber { 19 | @Subscribe 20 | public void onAlarm(StrategyAlarmEvent strategyAlarmEvent) { 21 | System.out.println("::::: 推送告警信息给钉钉,告警类型=" + strategyAlarmEvent.getAlarmType() + ",告警内容=" + strategyAlarmEvent.getAlarmMap()); 22 | } 23 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/annotation/TransactionReader.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.annotation; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.lang.annotation.ElementType; 14 | import java.lang.annotation.Inherited; 15 | import java.lang.annotation.Retention; 16 | import java.lang.annotation.RetentionPolicy; 17 | import java.lang.annotation.Target; 18 | 19 | import org.springframework.transaction.annotation.Transactional; 20 | 21 | @Target({ ElementType.METHOD }) 22 | @Retention(RetentionPolicy.RUNTIME) 23 | @Inherited 24 | @Transactional(readOnly = true, timeout = 30) 25 | public @interface TransactionReader { 26 | 27 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/exception/PlatformException.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.exception; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.io.Serializable; 14 | 15 | import com.nepxion.discovery.platform.server.tool.ExceptionTool; 16 | 17 | public class PlatformException extends RuntimeException implements Serializable { 18 | private static final long serialVersionUID = -1046678240722236088L; 19 | 20 | public PlatformException(Throwable e) { 21 | super(ExceptionTool.getRootCauseMessage(e), e); 22 | } 23 | 24 | public PlatformException(String errMsg) { 25 | super(errMsg); 26 | } 27 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/service/RouteStrategyService.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.service; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.util.List; 14 | 15 | import com.nepxion.discovery.platform.server.entity.dto.RouteStrategyDto; 16 | 17 | public interface RouteStrategyService { 18 | boolean save(String portalName, Integer portalType, ListTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @author Haojun Ren 11 | * @version 1.0 12 | */ 13 | 14 | import de.codecentric.boot.admin.server.config.EnableAdminServer; 15 | 16 | import org.springframework.boot.SpringApplication; 17 | 18 | import com.nepxion.discovery.platform.server.annotation.EnablePlatformServer; 19 | 20 | @EnablePlatformServer 21 | @EnableAdminServer 22 | public class PlatformH2Application { 23 | public static void main(String[] args) { 24 | System.setProperty("spring.profiles.active", "h2"); 25 | 26 | SpringApplication.run(PlatformH2Application.class, args); 27 | } 28 | } -------------------------------------------------------------------------------- /discovery-platform-application/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # Platform server config 2 | platform.server.title=Nepxion Platform 3 | platform.server.full-name=Nepxion Platform 4 | platform.server.short-name=Nepxion Platform 5 | 6 | # Platform server jwt token config 7 | platform.server.auth.token.secret=LvQg8gdN2HwDx9SWO3j9bbBtgiGJLG8A 8 | platform.server.auth.token.expire-time=1d 9 | platform.server.auth.token.max-live-time=1d 10 | platform.server.auth.token.renew-threshold=1 11 | 12 | # Platform ldap config 13 | platform.ldap.object-class-attr-name=user 14 | platform.ldap.login-id-attr-name=sAMAccountName 15 | platform.ldap.name-attr-name=description 16 | platform.ldap.mail-attr-name=mail 17 | platform.ldap.phone-number-attr-name=mobile 18 | platform.ldap.title-attr-name=title 19 | 20 | # Ldap config 21 | spring.ldap.base=DC=XXX,DC=com 22 | spring.ldap.username=XXX 23 | spring.ldap.password=XXX 24 | spring.ldap.urls=ldap://ldap.XXX.com:XXX -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/annotation/TransactionWriter.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.annotation; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.lang.annotation.ElementType; 14 | import java.lang.annotation.Inherited; 15 | import java.lang.annotation.Retention; 16 | import java.lang.annotation.RetentionPolicy; 17 | import java.lang.annotation.Target; 18 | 19 | import org.springframework.transaction.annotation.Transactional; 20 | 21 | @Target({ ElementType.METHOD }) 22 | @Retention(RetentionPolicy.RUNTIME) 23 | @Inherited 24 | @Transactional(rollbackFor = Exception.class, timeout = 30) 25 | public @interface TransactionWriter { 26 | 27 | } -------------------------------------------------------------------------------- /discovery-platform-application/src/main/java/com/nepxion/discovery/platform/application/PlatformMySqlApplication.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.application; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @author Haojun Ren 11 | * @version 1.0 12 | */ 13 | 14 | import de.codecentric.boot.admin.server.config.EnableAdminServer; 15 | 16 | import org.springframework.boot.SpringApplication; 17 | 18 | import com.nepxion.discovery.platform.server.annotation.EnablePlatformServer; 19 | 20 | @EnablePlatformServer 21 | @EnableAdminServer 22 | public class PlatformMySqlApplication { 23 | public static void main(String[] args) { 24 | System.setProperty("spring.profiles.active", "mysql"); 25 | 26 | SpringApplication.run(PlatformMySqlApplication.class, args); 27 | } 28 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-ui/pom.xml: -------------------------------------------------------------------------------- 1 | 2 |Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Haojun Ren 10 | * @version 1.0 11 | */ 12 | 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | 15 | import com.nepxion.eventbus.core.EventControllerFactory; 16 | 17 | public class PlatformPublisher { 18 | @Autowired 19 | private EventControllerFactory eventControllerFactory; 20 | 21 | public void asyncPublish(Object object) { 22 | eventControllerFactory.getAsyncController().post(object); 23 | } 24 | 25 | public void syncPublish(Object object) { 26 | eventControllerFactory.getSyncController().post(object); 27 | } 28 | } -------------------------------------------------------------------------------- /discovery-platform-common/discovery-platform-starter-common-mail/pom.xml: -------------------------------------------------------------------------------- 1 | 2 |Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.springframework.stereotype.Controller; 14 | import org.springframework.web.bind.annotation.GetMapping; 15 | import org.springframework.web.bind.annotation.RequestMapping; 16 | 17 | import io.swagger.annotations.Api; 18 | 19 | @Api("首页Dashboard看板相关接口") 20 | @Controller 21 | @RequestMapping(DashboardController.PREFIX) 22 | public class DashboardPageController { 23 | @GetMapping("list") 24 | public String list() { 25 | return String.format("%s/%s", DashboardController.PREFIX, "list"); 26 | } 27 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/mapper/AdminMapper.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.mapper; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.apache.ibatis.annotations.Mapper; 14 | import org.apache.ibatis.annotations.Param; 15 | 16 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 17 | import com.baomidou.mybatisplus.core.metadata.IPage; 18 | import com.nepxion.discovery.platform.server.entity.dto.SysAdminDto; 19 | import com.nepxion.discovery.platform.server.entity.vo.AdminVo; 20 | 21 | @Mapper 22 | public interface AdminMapper extends BaseMapperTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Haojun Ren 10 | * @version 1.0 11 | */ 12 | 13 | import org.apache.commons.lang3.StringUtils; 14 | 15 | import com.google.common.eventbus.Subscribe; 16 | import com.nepxion.eventbus.annotation.EventBus; 17 | 18 | @EventBus 19 | public class PlatformSubscriber { 20 | @Subscribe 21 | public void onAlarm(PlatformAlarmEvent platformAlarmEvent) { 22 | String alarmType = platformAlarmEvent.getAlarmType(); 23 | 24 | if (StringUtils.equals(alarmType, "RouteInconsistency")) { 25 | System.out.println("::::: 推送告警信息给钉钉,告警类型=" + platformAlarmEvent.getAlarmType() + ",告警内容=" + platformAlarmEvent.getAlarmMap()); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /discovery-platform-common/pom.xml: -------------------------------------------------------------------------------- 1 | 2 |Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Haojun Ren 10 | * @version 1.0 11 | */ 12 | 13 | import java.io.Serializable; 14 | import java.util.Map; 15 | 16 | public class PlatformAlarmEvent implements Serializable { 17 | private static final long serialVersionUID = 5966845230262521754L; 18 | 19 | private String alarmType; 20 | private MapTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.util.Collection; 14 | 15 | import com.baomidou.mybatisplus.core.metadata.IPage; 16 | import com.nepxion.discovery.platform.server.entity.dto.BlacklistDto; 17 | import com.nepxion.discovery.platform.server.service.base.BasePublishService; 18 | 19 | public interface BlacklistService extends BasePublishServiceTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; 14 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 15 | import com.nepxion.discovery.platform.server.entity.dto.SysDicDto; 16 | import com.nepxion.discovery.platform.server.mapper.DicMapper; 17 | 18 | public class DicServiceImpl extends ServiceImplTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.util.List; 14 | 15 | import org.apache.ibatis.annotations.Mapper; 16 | import org.apache.ibatis.annotations.Param; 17 | 18 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 19 | import com.baomidou.mybatisplus.core.metadata.IPage; 20 | import com.nepxion.discovery.platform.server.entity.dto.SysMenuDto; 21 | import com.nepxion.discovery.platform.server.entity.vo.MenuVo; 22 | 23 | @Mapper 24 | public interface MenuMapper extends BaseMapperTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.util.List; 14 | import java.util.Set; 15 | 16 | import com.baomidou.mybatisplus.core.metadata.IPage; 17 | import com.nepxion.discovery.platform.server.entity.dto.SysRoleDto; 18 | 19 | public interface RoleService { 20 | ListTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.util.Collection; 14 | 15 | import com.baomidou.mybatisplus.core.metadata.IPage; 16 | import com.nepxion.discovery.common.entity.GatewayType; 17 | import com.nepxion.discovery.platform.server.entity.dto.RouteZuulDto; 18 | import com.nepxion.discovery.platform.server.service.base.BasePublishService; 19 | 20 | public interface RouteZuulService extends BasePublishServiceTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.util.List; 14 | 15 | import org.apache.ibatis.annotations.Mapper; 16 | import org.apache.ibatis.annotations.Param; 17 | 18 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 19 | import com.baomidou.mybatisplus.core.metadata.IPage; 20 | import com.nepxion.discovery.platform.server.entity.dto.SysMenuDto; 21 | import com.nepxion.discovery.platform.server.entity.dto.SysPermissionDto; 22 | import com.nepxion.discovery.platform.server.entity.vo.PermissionVo; 23 | 24 | @Mapper 25 | public interface PermissionMapper extends BaseMapperTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.util.Collection; 14 | 15 | import com.baomidou.mybatisplus.core.metadata.IPage; 16 | import com.nepxion.discovery.common.entity.GatewayType; 17 | import com.nepxion.discovery.platform.server.entity.dto.RouteGatewayDto; 18 | import com.nepxion.discovery.platform.server.service.base.BasePublishService; 19 | 20 | public interface RouteGatewayService extends BasePublishServiceTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.util.List; 14 | import java.util.Set; 15 | 16 | import com.baomidou.mybatisplus.core.metadata.IPage; 17 | import com.nepxion.discovery.platform.server.entity.dto.SysMenuDto; 18 | import com.nepxion.discovery.platform.server.entity.dto.SysPermissionDto; 19 | import com.nepxion.discovery.platform.server.entity.vo.PermissionVo; 20 | 21 | public interface PermissionService { 22 | ListTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.io.IOException; 14 | import java.util.Map; 15 | 16 | import com.nepxion.discovery.platform.server.entity.enums.Operation; 17 | import freemarker.core.Environment; 18 | import freemarker.template.TemplateDirectiveBody; 19 | import freemarker.template.TemplateDirectiveModel; 20 | import freemarker.template.TemplateException; 21 | import freemarker.template.TemplateModel; 22 | 23 | public class DeleteDirective extends AuthDirective implements TemplateDirectiveModel { 24 | @SuppressWarnings("rawtypes") 25 | @Override 26 | public void execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body) throws TemplateException, IOException { 27 | if (body != null && checkPermission(Operation.DELETE)) { 28 | body.render(env.getOut()); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/template/InsertDirective.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.template; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.io.IOException; 14 | import java.util.Map; 15 | 16 | import com.nepxion.discovery.platform.server.entity.enums.Operation; 17 | import freemarker.core.Environment; 18 | import freemarker.template.TemplateDirectiveBody; 19 | import freemarker.template.TemplateDirectiveModel; 20 | import freemarker.template.TemplateException; 21 | import freemarker.template.TemplateModel; 22 | 23 | public class InsertDirective extends AuthDirective implements TemplateDirectiveModel { 24 | @SuppressWarnings("rawtypes") 25 | @Override 26 | public void execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body) throws TemplateException, IOException { 27 | if (body != null && checkPermission(Operation.INSERT)) { 28 | body.render(env.getOut()); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/template/SelectDirective.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.template; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.io.IOException; 14 | import java.util.Map; 15 | 16 | import com.nepxion.discovery.platform.server.entity.enums.Operation; 17 | import freemarker.core.Environment; 18 | import freemarker.template.TemplateDirectiveBody; 19 | import freemarker.template.TemplateDirectiveModel; 20 | import freemarker.template.TemplateException; 21 | import freemarker.template.TemplateModel; 22 | 23 | public class SelectDirective extends AuthDirective implements TemplateDirectiveModel { 24 | @SuppressWarnings("rawtypes") 25 | @Override 26 | public void execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body) throws TemplateException, IOException { 27 | if (body != null && checkPermission(Operation.SELECT)) { 28 | body.render(env.getOut()); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/template/UpdateDirective.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.template; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.io.IOException; 14 | import java.util.Map; 15 | 16 | import com.nepxion.discovery.platform.server.entity.enums.Operation; 17 | import freemarker.core.Environment; 18 | import freemarker.template.TemplateDirectiveBody; 19 | import freemarker.template.TemplateDirectiveModel; 20 | import freemarker.template.TemplateException; 21 | import freemarker.template.TemplateModel; 22 | 23 | public class UpdateDirective extends AuthDirective implements TemplateDirectiveModel { 24 | @SuppressWarnings("rawtypes") 25 | @Override 26 | public void execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body) throws TemplateException, IOException { 27 | if (body != null && checkPermission(Operation.UPDATE)) { 28 | body.render(env.getOut()); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/template/NoDeleteDirective.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.template; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.io.IOException; 14 | import java.util.Map; 15 | 16 | import com.nepxion.discovery.platform.server.entity.enums.Operation; 17 | import freemarker.core.Environment; 18 | import freemarker.template.TemplateDirectiveBody; 19 | import freemarker.template.TemplateDirectiveModel; 20 | import freemarker.template.TemplateException; 21 | import freemarker.template.TemplateModel; 22 | 23 | public class NoDeleteDirective extends AuthDirective implements TemplateDirectiveModel { 24 | @SuppressWarnings("rawtypes") 25 | @Override 26 | public void execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body) throws TemplateException, IOException { 27 | if (body != null && !checkPermission(Operation.DELETE)) { 28 | body.render(env.getOut()); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/template/NoInsertDirective.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.template; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.io.IOException; 14 | import java.util.Map; 15 | 16 | import com.nepxion.discovery.platform.server.entity.enums.Operation; 17 | import freemarker.core.Environment; 18 | import freemarker.template.TemplateDirectiveBody; 19 | import freemarker.template.TemplateDirectiveModel; 20 | import freemarker.template.TemplateException; 21 | import freemarker.template.TemplateModel; 22 | 23 | public class NoInsertDirective extends AuthDirective implements TemplateDirectiveModel { 24 | @SuppressWarnings("rawtypes") 25 | @Override 26 | public void execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body) throws TemplateException, IOException { 27 | if (body != null && !checkPermission(Operation.INSERT)) { 28 | body.render(env.getOut()); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/template/NoSelectDirective.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.template; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.io.IOException; 14 | import java.util.Map; 15 | 16 | import com.nepxion.discovery.platform.server.entity.enums.Operation; 17 | import freemarker.core.Environment; 18 | import freemarker.template.TemplateDirectiveBody; 19 | import freemarker.template.TemplateDirectiveModel; 20 | import freemarker.template.TemplateException; 21 | import freemarker.template.TemplateModel; 22 | 23 | public class NoSelectDirective extends AuthDirective implements TemplateDirectiveModel { 24 | @SuppressWarnings("rawtypes") 25 | @Override 26 | public void execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body) throws TemplateException, IOException { 27 | if (body != null && !checkPermission(Operation.SELECT)) { 28 | body.render(env.getOut()); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/template/NoUpdateDirective.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.template; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.io.IOException; 14 | import java.util.Map; 15 | 16 | import com.nepxion.discovery.platform.server.entity.enums.Operation; 17 | import freemarker.core.Environment; 18 | import freemarker.template.TemplateDirectiveBody; 19 | import freemarker.template.TemplateDirectiveModel; 20 | import freemarker.template.TemplateException; 21 | import freemarker.template.TemplateModel; 22 | 23 | public class NoUpdateDirective extends AuthDirective implements TemplateDirectiveModel { 24 | @SuppressWarnings("rawtypes") 25 | @Override 26 | public void execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body) throws TemplateException, IOException { 27 | if (body != null && !checkPermission(Operation.UPDATE)) { 28 | body.render(env.getOut()); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/lib/extend/layim/layim-assets/html/find.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |此为自定义的【查找】页面,因需求不一,所以官方暂不提供该模版结构与样式,实际使用时,可移至该文件到你的项目中,对页面自行把控。 19 |20 |
文件所在目录(相对于layui.js):/layim-assets/html/find.html
Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @author Haojun Ren 11 | * @version 1.0 12 | */ 13 | 14 | import java.lang.annotation.Documented; 15 | import java.lang.annotation.ElementType; 16 | import java.lang.annotation.Inherited; 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.RetentionPolicy; 19 | import java.lang.annotation.Target; 20 | 21 | import org.springframework.boot.autoconfigure.SpringBootApplication; 22 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 23 | import org.springframework.context.annotation.Import; 24 | 25 | import com.nepxion.discovery.platform.server.configuration.WebAutoConfiguration; 26 | 27 | @Target(ElementType.TYPE) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | @Inherited 30 | @Documented 31 | @SpringBootApplication 32 | @EnableDiscoveryClient 33 | @Import(WebAutoConfiguration.class) 34 | public @interface EnablePlatformServer { 35 | 36 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/controller/ErrorPageController.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.controller; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author rotten 10 | * @version 1.0 11 | */ 12 | 13 | import io.swagger.annotations.Api; 14 | 15 | import org.springframework.ui.Model; 16 | import org.springframework.web.bind.annotation.GetMapping; 17 | import org.springframework.web.bind.annotation.RequestMapping; 18 | import org.springframework.web.bind.annotation.RestController; 19 | import org.springframework.web.servlet.ModelAndView; 20 | 21 | @Api("错误页相关接口") 22 | @RestController 23 | @RequestMapping(value = ErrorPageController.PREFIX) 24 | public class ErrorPageController { 25 | public static final String PREFIX = "error"; 26 | 27 | @GetMapping(value = "/404.do") 28 | public ModelAndView notFund(Model model) { 29 | ModelAndView modelAndView = new ModelAndView(); 30 | modelAndView.addObject("msg", "功能模块正在开发中,敬请期待..."); 31 | modelAndView.setViewName("/error/404"); 32 | return modelAndView; 33 | } 34 | } -------------------------------------------------------------------------------- /discovery-platform-application/src/main/resources/application-mysql.properties: -------------------------------------------------------------------------------- 1 | # Platform datasource config 2 | platform.datasource.type=MySql 3 | platform.datasource.init-script-path=META-INF/schema-mysql.sql 4 | platform.datasource.init-script-enabled=true 5 | platform.datasource.init-script-logger=true 6 | 7 | # MySql config 8 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 9 | spring.datasource.url=jdbc:mysql://127.0.0.1:3306/platform?allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&characterEncoding=UTF-8&useUnicode=true&autoReconnect=true&allowMultiQueries=true&useSSL=false&rewriteBatchedStatements=true&zeroDateTimeBehavior=CONVERT_TO_NULL 10 | spring.datasource.username=root 11 | spring.datasource.password=root 12 | 13 | # HikariCP config 14 | spring.datasource.type=com.zaxxer.hikari.HikariDataSource 15 | spring.datasource.hikari.minimum-idle=5 16 | spring.datasource.hikari.maximum-pool-size=10 17 | spring.datasource.hikari.idle-timeout=600000 18 | spring.datasource.hikari.auto-commit=true 19 | spring.datasource.hikari.pool-name=PlatformHikariCP 20 | spring.datasource.hikari.max-lifetime=1800000 21 | spring.datasource.hikari.connection-timeout=30000 22 | spring.datasource.hikari.connection-test-query=SELECT 1 23 | spring.datasource.hikari.connection-init-sql=SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/tpl/layim/demo.html: -------------------------------------------------------------------------------- 1 |Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.ui.Model; 15 | import org.springframework.web.bind.annotation.ControllerAdvice; 16 | import org.springframework.web.bind.annotation.ModelAttribute; 17 | 18 | import com.nepxion.discovery.platform.server.constant.PlatformConstant; 19 | import com.nepxion.discovery.platform.server.properties.PlatformServerProperties; 20 | 21 | @ControllerAdvice 22 | public class ModelAdvice { 23 | @Autowired 24 | private PlatformServerProperties platformProperties; 25 | 26 | @ModelAttribute 27 | public void addAttributes(Model model) { 28 | model.addAttribute(PlatformConstant.TITLE, platformProperties.getTitle()); 29 | model.addAttribute(PlatformConstant.FULL_NAME, platformProperties.getFullName()); 30 | model.addAttribute(PlatformConstant.SHORT_NAME, platformProperties.getShortName()); 31 | } 32 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/properties/PlatformServerProperties.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.properties; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.springframework.boot.context.properties.ConfigurationProperties; 14 | 15 | @ConfigurationProperties("platform.server") 16 | public class PlatformServerProperties { 17 | private String title = "Nepxion Platform"; 18 | private String fullName = "Nepxion Platform"; 19 | private String shortName = "Nepxion Platform"; 20 | 21 | public String getTitle() { 22 | return title; 23 | } 24 | 25 | public void setTitle(String title) { 26 | this.title = title; 27 | } 28 | 29 | public String getFullName() { 30 | return fullName; 31 | } 32 | 33 | public void setFullName(String fullName) { 34 | this.fullName = fullName; 35 | } 36 | 37 | public String getShortName() { 38 | return shortName; 39 | } 40 | 41 | public void setShortName(String shortName) { 42 | this.shortName = shortName; 43 | } 44 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-h2/pom.xml: -------------------------------------------------------------------------------- 1 | 2 |Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Hui Liu 10 | * @version 1.0 11 | */ 12 | 13 | import com.nepxion.discovery.common.entity.ConfigType; 14 | import com.nepxion.discovery.common.entity.DiscoveryType; 15 | import com.nepxion.discovery.console.resource.ConfigResource; 16 | import com.nepxion.discovery.console.resource.ServiceResource; 17 | import org.springframework.beans.factory.annotation.Autowired; 18 | 19 | public class ConsoleServiceImpl implements ConsoleService { 20 | @Autowired 21 | private ServiceResource serviceResource; 22 | 23 | @Autowired 24 | private ConfigResource configResource; 25 | 26 | @Override 27 | public String getDiscoveryType() { 28 | DiscoveryType discoveryType = serviceResource.getDiscoveryType(); 29 | return discoveryType.getValue(); 30 | } 31 | 32 | @Override 33 | public String getConfigType() { 34 | ConfigType configType = configResource.getConfigType(); 35 | return configType.getValue(); 36 | } 37 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/tool/ExceptionTool.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.tool; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.io.PrintStream; 14 | 15 | import org.springframework.util.FastByteArrayOutputStream; 16 | 17 | public class ExceptionTool { 18 | public static String getRootCauseMessage(Throwable throwable) { 19 | if (throwable.getCause() != null) { 20 | return getRootCauseMessage(throwable.getCause()); 21 | } 22 | return throwable.getMessage() == null ? throwable.toString() : throwable.getMessage(); 23 | } 24 | 25 | public static String getStackTrace(Throwable throwable) { 26 | FastByteArrayOutputStream result = new FastByteArrayOutputStream(); 27 | throwable.printStackTrace(new PrintStream(result)); 28 | return result.toString().trim(); 29 | } 30 | 31 | public static String getStackTraceInHtml(Throwable throwable) { 32 | return getStackTrace(throwable).replaceAll("\\r\\n\\t", "Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.util.Collection; 14 | import java.util.List; 15 | 16 | import com.baomidou.mybatisplus.core.metadata.IPage; 17 | import com.nepxion.discovery.platform.server.entity.dto.StrategyDto; 18 | import com.nepxion.discovery.platform.server.entity.po.StrategyPo; 19 | import com.nepxion.discovery.platform.server.service.base.BasePublishService; 20 | 21 | public interface StrategyService extends BasePublishServiceTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.util.Collection; 14 | import java.util.List; 15 | 16 | import com.baomidou.mybatisplus.core.metadata.IPage; 17 | import com.nepxion.discovery.platform.server.entity.dto.RouteArrangeDto; 18 | import com.nepxion.discovery.platform.server.service.base.BasePublishService; 19 | 20 | public interface RouteArrangeService extends BasePublishServiceTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | public enum LoginMode { 14 | DATABASE(1, "database"), 15 | LDAP(2, "ldap"); 16 | 17 | private int code; 18 | private String name; 19 | 20 | LoginMode(int code, String name) { 21 | this.code = code; 22 | this.name = name; 23 | } 24 | 25 | public int getCode() { 26 | return code; 27 | } 28 | 29 | public String getName() { 30 | return name; 31 | } 32 | 33 | public static LoginMode get(int code) { 34 | for (LoginMode item : LoginMode.values()) { 35 | if (item.getCode() == code) { 36 | return item; 37 | } 38 | } 39 | return null; 40 | } 41 | 42 | public static LoginMode get(String name) { 43 | for (LoginMode item : LoginMode.values()) { 44 | if (item.getName().equalsIgnoreCase(name)) { 45 | return item; 46 | } 47 | } 48 | return null; 49 | } 50 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/template/OnlySelectDirective.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.template; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.io.IOException; 14 | import java.util.Map; 15 | 16 | import com.nepxion.discovery.platform.server.entity.enums.Operation; 17 | import freemarker.core.Environment; 18 | import freemarker.template.TemplateDirectiveBody; 19 | import freemarker.template.TemplateDirectiveModel; 20 | import freemarker.template.TemplateException; 21 | import freemarker.template.TemplateModel; 22 | 23 | public class OnlySelectDirective extends AuthDirective implements TemplateDirectiveModel { 24 | @SuppressWarnings("rawtypes") 25 | @Override 26 | public void execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body) throws TemplateException, IOException { 27 | if (body != null 28 | && checkPermission(Operation.SELECT) 29 | && !checkPermission(Operation.DELETE) 30 | && !checkPermission(Operation.UPDATE)) { 31 | body.render(env.getOut()); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #eee;border-left-width:6px;background-color:#FAFAFA;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:40px;line-height:40px;border-bottom:1px solid #eee}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 10px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view .layui-code-ol li:first-child{padding-top:10px}.layui-code-view .layui-code-ol li:last-child{padding-bottom:10px}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}.layui-code-demo .layui-code{visibility:visible!important;margin:-15px;border-top:none;border-right:none;border-bottom:none}.layui-code-demo .layui-tab-content{padding:15px;border-top:none} -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/templates/error/404.ftl: -------------------------------------------------------------------------------- 1 | <#assign ctx=request.contextPath> 2 | <@compress single_line=true> 3 | 4 | 5 | 6 | 7 |
20 | Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import javax.servlet.http.HttpServletRequest; 14 | 15 | import org.springframework.core.MethodParameter; 16 | import org.springframework.web.bind.support.WebArgumentResolver; 17 | import org.springframework.web.context.request.NativeWebRequest; 18 | 19 | import com.nepxion.discovery.platform.server.constant.PlatformConstant; 20 | import com.nepxion.discovery.platform.server.entity.vo.AdminVo; 21 | 22 | public class LoginArgumentResolver implements WebArgumentResolver { 23 | @Override 24 | public Object resolveArgument(MethodParameter methodParameter, NativeWebRequest nativeWebRequest) { 25 | Class> parameterType = methodParameter.getParameterType(); 26 | HttpServletRequest request = nativeWebRequest.getNativeRequest(HttpServletRequest.class); 27 | if (request != null && parameterType.equals(AdminVo.class)) { 28 | return request.getAttribute(PlatformConstant.CURRENT_ADMIN_LOGIN); 29 | } 30 | return UNRESOLVED; 31 | } 32 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/template/NotOnlySelectDirective.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.template; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.io.IOException; 14 | import java.util.Map; 15 | 16 | import com.nepxion.discovery.platform.server.entity.enums.Operation; 17 | import freemarker.core.Environment; 18 | import freemarker.template.TemplateDirectiveBody; 19 | import freemarker.template.TemplateDirectiveModel; 20 | import freemarker.template.TemplateException; 21 | import freemarker.template.TemplateModel; 22 | 23 | public class NotOnlySelectDirective extends AuthDirective implements TemplateDirectiveModel { 24 | @SuppressWarnings("rawtypes") 25 | @Override 26 | public void execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body) throws TemplateException, IOException { 27 | if (body != null && 28 | (!checkPermission(Operation.SELECT) 29 | || checkPermission(Operation.DELETE) 30 | || checkPermission(Operation.UPDATE))) { 31 | body.render(env.getOut()); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /discovery-platform-client/discovery-platform-starter-client/src/main/java/com/nepxion/discovery/platform/client/event/RuleEventSubscriber.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.client.event; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Haojun Ren 10 | * @version 1.0 11 | */ 12 | 13 | import com.google.common.eventbus.Subscribe; 14 | import com.nepxion.discovery.plugin.framework.event.RuleClearedEvent; 15 | import com.nepxion.discovery.plugin.framework.event.RuleFailureEvent; 16 | import com.nepxion.discovery.plugin.framework.event.RuleUpdatedEvent; 17 | import com.nepxion.eventbus.annotation.EventBus; 18 | 19 | @EventBus 20 | public class RuleEventSubscriber { 21 | @Subscribe 22 | public void onRuleUpdated(RuleUpdatedEvent ruleUpdatedEvent) { 23 | System.out.println("::::: 推送规则变更信息给钉钉,规则执行更新, rule=" + ruleUpdatedEvent.getRule()); 24 | } 25 | 26 | @Subscribe 27 | public void onRuleCleared(RuleClearedEvent ruleClearedEvent) { 28 | System.out.println("::::: 推送规则变更信息给钉钉,规则执行清空"); 29 | } 30 | 31 | @Subscribe 32 | public void onRuleRuleFailure(RuleFailureEvent ruleFailureEvent) { 33 | System.out.println("::::: 推送规则变更信息给钉钉,规则更新失败, rule=" + ruleFailureEvent.getRule() + ", exception=" + ruleFailureEvent.getException()); 34 | } 35 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/layuiadmin/modules/set.js: -------------------------------------------------------------------------------- 1 | layui.define(["form","upload"],function(t){var i=layui.$,e=layui.layer,a=(layui.laytpl,layui.setter,layui.view,layui.admin),n=layui.form,s=layui.upload;i("body");n.verify({nickname:function(t,i){return new RegExp("^[a-zA-Z0-9_\u4e00-\u9fa5\\s\xb7]+$").test(t)?/(^\_)|(\__)|(\_+$)/.test(t)?"\u7528\u6237\u540d\u9996\u5c3e\u4e0d\u80fd\u51fa\u73b0\u4e0b\u5212\u7ebf'_'":/^\d+\d+\d$/.test(t)?"\u7528\u6237\u540d\u4e0d\u80fd\u5168\u4e3a\u6570\u5b57":void 0:"\u7528\u6237\u540d\u4e0d\u80fd\u6709\u7279\u6b8a\u5b57\u7b26"},pass:[/^[\S]{6,12}$/,"\u5bc6\u7801\u5fc5\u987b6\u523012\u4f4d\uff0c\u4e14\u4e0d\u80fd\u51fa\u73b0\u7a7a\u683c"],repass:function(t){if(t!==i("#LAY_password").val())return"\u4e24\u6b21\u5bc6\u7801\u8f93\u5165\u4e0d\u4e00\u81f4"}}),n.on("submit(set_website)",function(t){return e.msg(JSON.stringify(t.field)),!1}),n.on("submit(set_system_email)",function(t){return e.msg(JSON.stringify(t.field)),!1}),n.on("submit(setmyinfo)",function(t){return e.msg(JSON.stringify(t.field)),!1});var r=i("#LAY_avatarSrc");s.render({url:"/api/upload/",elem:"#LAY_avatarUpload",done:function(t){0==t.status?r.val(t.url):e.msg(t.msg,{icon:5})}}),a.events.avartatPreview=function(t){var i=r.val();e.photos({photos:{title:"\u67e5\u770b\u5934\u50cf",data:[{src:i}]},shade:.01,closeBtn:1,anim:5})},n.on("submit(setmypass)",function(t){return e.msg(JSON.stringify(t.field)),!1}),t("set",{})}); -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/entity/enums/Operation.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.entity.enums; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | public enum Operation { 14 | INSERT(1, "INSERT"), 15 | UPDATE(2, "UPDATE"), 16 | DELETE(3, "DELETE"), 17 | SELECT(4, "SELECT"); 18 | 19 | private int code; 20 | private String name; 21 | 22 | Operation(int code, String name) { 23 | this.code = code; 24 | this.name = name; 25 | } 26 | 27 | public int getCode() { 28 | return code; 29 | } 30 | 31 | public String getName() { 32 | return name; 33 | } 34 | 35 | public static Operation get(int code) { 36 | for (Operation item : Operation.values()) { 37 | if (item.getCode() == code) { 38 | return item; 39 | } 40 | } 41 | return null; 42 | } 43 | 44 | public static Operation get(String name) { 45 | for (Operation item : Operation.values()) { 46 | if (item.getName().equalsIgnoreCase(name)) { 47 | return item; 48 | } 49 | } 50 | return null; 51 | } 52 | } -------------------------------------------------------------------------------- /discovery-platform-client/discovery-platform-starter-client/pom.xml: -------------------------------------------------------------------------------- 1 | 2 |Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.util.List; 14 | import java.util.Set; 15 | 16 | import org.springframework.lang.Nullable; 17 | 18 | import com.baomidou.mybatisplus.core.metadata.IPage; 19 | import com.nepxion.discovery.platform.server.entity.dto.SysMenuDto; 20 | import com.nepxion.discovery.platform.server.entity.po.MenuPo; 21 | import com.nepxion.discovery.platform.server.entity.vo.AdminVo; 22 | import com.nepxion.discovery.platform.server.entity.vo.MenuVo; 23 | 24 | public interface MenuService { 25 | void fillPages(AdminVo adminVo) throws Exception; 26 | 27 | ListTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.stereotype.Controller; 15 | import org.springframework.ui.Model; 16 | import org.springframework.web.bind.annotation.GetMapping; 17 | import org.springframework.web.bind.annotation.RequestMapping; 18 | import org.springframework.web.bind.annotation.RequestParam; 19 | 20 | import com.nepxion.discovery.platform.server.service.RoleService; 21 | 22 | @Controller 23 | @RequestMapping(RoleController.PREFIX) 24 | public class RolePageController { 25 | @Autowired 26 | private RoleService roleService; 27 | 28 | @GetMapping("list") 29 | public String list() { 30 | return String.format("%s/%s", RoleController.PREFIX, "list"); 31 | } 32 | 33 | @GetMapping("add") 34 | public String add() { 35 | return String.format("%s/%s", RoleController.PREFIX, "add"); 36 | } 37 | 38 | @GetMapping("edit") 39 | public String edit(Model model, @RequestParam(name = "id") Long id) { 40 | model.addAttribute("role", roleService.getById(id)); 41 | return String.format("%s/%s", RoleController.PREFIX, "edit"); 42 | } 43 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/controller/BlacklistPageController.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.controller; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.stereotype.Controller; 15 | import org.springframework.ui.Model; 16 | import org.springframework.web.bind.annotation.GetMapping; 17 | import org.springframework.web.bind.annotation.RequestMapping; 18 | 19 | import com.nepxion.discovery.platform.server.adapter.PlatformDiscoveryAdapter; 20 | 21 | @Controller 22 | @RequestMapping(BlacklistController.PREFIX) 23 | public class BlacklistPageController { 24 | @Autowired 25 | private PlatformDiscoveryAdapter platformDiscoveryAdapter; 26 | 27 | @GetMapping("list") 28 | public String list() { 29 | return String.format("%s/%s", BlacklistController.PREFIX, "list"); 30 | } 31 | 32 | @GetMapping("add") 33 | public String add(Model model) { 34 | return String.format("%s/%s", BlacklistController.PREFIX, "add"); 35 | } 36 | 37 | @GetMapping("working") 38 | public String working(Model model) { 39 | model.addAttribute("gatewayNames", platformDiscoveryAdapter.getGatewayNames()); 40 | return String.format("%s/%s", BlacklistController.PREFIX, "working"); 41 | } 42 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/resources/mapper/PermissionMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.apache.commons.lang3.builder.EqualsBuilder; 14 | import org.apache.commons.lang3.builder.HashCodeBuilder; 15 | import org.apache.commons.lang3.builder.ToStringBuilder; 16 | import org.apache.commons.lang3.builder.ToStringStyle; 17 | 18 | import io.swagger.annotations.ApiModel; 19 | import io.swagger.annotations.ApiModelProperty; 20 | 21 | @ApiModel(description = "列表名称查询") 22 | public class ListSearchNamePo extends ListSearchPo { 23 | private static final long serialVersionUID = 7174491897001035456L; 24 | 25 | @ApiModelProperty("名称查询值") 26 | private String name; 27 | 28 | public String getName() { 29 | return name; 30 | } 31 | 32 | public void setName(String name) { 33 | this.name = name; 34 | } 35 | 36 | @Override 37 | public int hashCode() { 38 | return HashCodeBuilder.reflectionHashCode(this); 39 | } 40 | 41 | @Override 42 | public boolean equals(Object object) { 43 | return EqualsBuilder.reflectionEquals(this, object); 44 | } 45 | 46 | @Override 47 | public String toString() { 48 | return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); 49 | } 50 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/controller/ConsoleController.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.controller; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Hui Liu 10 | * @version 1.0 11 | */ 12 | 13 | import com.nepxion.discovery.platform.server.entity.response.Result; 14 | import com.nepxion.discovery.platform.server.service.ConsoleService; 15 | import io.swagger.annotations.Api; 16 | import io.swagger.annotations.ApiOperation; 17 | import org.springframework.beans.factory.annotation.Autowired; 18 | import org.springframework.web.bind.annotation.GetMapping; 19 | import org.springframework.web.bind.annotation.RequestMapping; 20 | import org.springframework.web.bind.annotation.RestController; 21 | 22 | @Api(value = "Nepxion Console相关接口") 23 | @RestController 24 | @RequestMapping("/console") 25 | public class ConsoleController { 26 | @Autowired 27 | private ConsoleService consoleService; 28 | 29 | @ApiOperation("获取注册中心类型") 30 | @GetMapping("/discovery-type") 31 | public ResultTitle: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.apache.shiro.authc.AuthenticationInfo; 14 | import org.apache.shiro.authc.AuthenticationToken; 15 | import org.apache.shiro.authc.credential.SimpleCredentialsMatcher; 16 | import org.slf4j.Logger; 17 | import org.slf4j.LoggerFactory; 18 | import org.springframework.beans.factory.annotation.Autowired; 19 | 20 | import com.nepxion.discovery.platform.server.entity.vo.AdminVo; 21 | import com.nepxion.discovery.platform.server.service.MenuService; 22 | import com.nepxion.discovery.platform.server.tool.ExceptionTool; 23 | 24 | public class CredentialsMatcher extends SimpleCredentialsMatcher { 25 | private static final Logger LOG = LoggerFactory.getLogger(CredentialsMatcher.class); 26 | @Autowired 27 | private MenuService menuService; 28 | 29 | @Override 30 | public boolean doCredentialsMatch(AuthenticationToken token, AuthenticationInfo info) { 31 | AdminVo adminVo = (AdminVo) info.getPrincipals().getPrimaryPrincipal(); 32 | try { 33 | menuService.fillPages(adminVo); 34 | } catch (Exception e) { 35 | LOG.error(ExceptionTool.getRootCauseMessage(e), e); 36 | return false; 37 | } 38 | return true; 39 | } 40 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/service/RouteServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.service; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import com.nepxion.discovery.platform.server.tool.DateTool; 14 | import org.springframework.beans.factory.annotation.Autowired; 15 | 16 | import com.nepxion.discovery.platform.server.entity.dto.RouteGatewayDto; 17 | import com.nepxion.discovery.platform.server.entity.dto.RouteZuulDto; 18 | import com.nepxion.discovery.platform.server.mapper.RouteMapper; 19 | import com.nepxion.discovery.platform.server.tool.MybatisPlusTool; 20 | 21 | public class RouteServiceImpl implements RouteService { 22 | @Autowired 23 | private RouteMapper routeMapper; 24 | 25 | @Override 26 | public Integer getNextMaxCreateTimesInDayOfGateway() { 27 | String startTime = DateTool.beginOfDay(); 28 | String endTime = DateTool.getEndOfDay(); 29 | return routeMapper.getNextMaxCreateTimesInDay(MybatisPlusTool.getTableName(RouteGatewayDto.class), startTime, endTime); 30 | } 31 | 32 | @Override 33 | public Integer getNextMaxCreateTimesInDayOfZuul() { 34 | String startTime = DateTool.beginOfDay(); 35 | String endTime = DateTool.getEndOfDay(); 36 | return routeMapper.getNextMaxCreateTimesInDay(MybatisPlusTool.getTableName(RouteZuulDto.class), startTime, endTime); 37 | } 38 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/shiro/JwtCredentialsMatcher.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.shiro; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Hui Liu 10 | * @version 1.0 11 | */ 12 | 13 | import org.apache.shiro.authc.AuthenticationInfo; 14 | import org.apache.shiro.authc.AuthenticationToken; 15 | import org.apache.shiro.authc.credential.SimpleCredentialsMatcher; 16 | import org.slf4j.Logger; 17 | import org.slf4j.LoggerFactory; 18 | import org.springframework.beans.factory.annotation.Autowired; 19 | 20 | import com.nepxion.discovery.platform.server.entity.vo.AdminVo; 21 | import com.nepxion.discovery.platform.server.service.MenuService; 22 | import com.nepxion.discovery.platform.server.tool.ExceptionTool; 23 | 24 | public class JwtCredentialsMatcher extends SimpleCredentialsMatcher { 25 | private static final Logger LOG = LoggerFactory.getLogger(JwtCredentialsMatcher.class); 26 | 27 | @Autowired 28 | private MenuService menuService; 29 | 30 | @Override 31 | public boolean doCredentialsMatch(AuthenticationToken token, AuthenticationInfo info) { 32 | AdminVo adminVo = (AdminVo) info.getPrincipals().getPrimaryPrincipal(); 33 | try { 34 | menuService.fillPages(adminVo); 35 | } catch (Exception e) { 36 | LOG.error(ExceptionTool.getRootCauseMessage(e), e); 37 | return false; 38 | } 39 | return true; 40 | } 41 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/entity/po/ListSearchGatewayPo.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.entity.po; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.apache.commons.lang3.builder.EqualsBuilder; 14 | import org.apache.commons.lang3.builder.HashCodeBuilder; 15 | import org.apache.commons.lang3.builder.ToStringBuilder; 16 | import org.apache.commons.lang3.builder.ToStringStyle; 17 | 18 | import io.swagger.annotations.ApiModel; 19 | import io.swagger.annotations.ApiModelProperty; 20 | 21 | @ApiModel(description = "列表网关查询") 22 | public class ListSearchGatewayPo extends ListSearchPo { 23 | private static final long serialVersionUID = 7174491897001035456L; 24 | 25 | @ApiModelProperty("网关描述信息") 26 | private String description; 27 | 28 | public String getDescription() { 29 | return description; 30 | } 31 | 32 | public void setDescription(String description) { 33 | this.description = description; 34 | } 35 | 36 | @Override 37 | public int hashCode() { 38 | return HashCodeBuilder.reflectionHashCode(this); 39 | } 40 | 41 | @Override 42 | public boolean equals(Object object) { 43 | return EqualsBuilder.reflectionEquals(this, object); 44 | } 45 | 46 | @Override 47 | public String toString() { 48 | return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); 49 | } 50 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/js/zkperformance.js: -------------------------------------------------------------------------------- 1 | function zkChart(title, data) { 2 | return { 3 | title: { 4 | text: title 5 | }, 6 | grid: { 7 | left: '4%', 8 | right: '9%', 9 | bottom: 40, 10 | containLabel: true 11 | }, 12 | toolbox: { 13 | feature: { 14 | dataZoom: { 15 | yAxisIndex: 'none' 16 | }, 17 | restore: {}, 18 | saveAsImage: {} 19 | } 20 | }, 21 | tooltip: { 22 | trigger: 'axis', 23 | axisPointer: { 24 | type: 'cross', 25 | animation: false, 26 | label: { 27 | backgroundColor: '#505765' 28 | } 29 | } 30 | }, 31 | dataZoom: [ 32 | { 33 | show: true, 34 | realtime: true, 35 | start: 0, 36 | end: 100 37 | }, 38 | { 39 | type: 'inside', 40 | realtime: true, 41 | start: 0, 42 | end: 100 43 | } 44 | ], 45 | yAxis: { 46 | type: 'value' 47 | }, 48 | xAxis: { 49 | type: 'category', 50 | boundaryGap: false, 51 | axisLine: {onZero: false}, 52 | data: data.times.map(function (str) { 53 | return str.replace(' ', '\n') 54 | }) 55 | }, 56 | series: data.series 57 | }; 58 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/templates/module/rate.ftl: -------------------------------------------------------------------------------- 1 | <#macro rate gridId="grid"> 2 | 流量配比 3 |Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.springframework.boot.context.properties.ConfigurationProperties; 14 | 15 | @ConfigurationProperties("platform.datasource") 16 | public class PlatformDataSourceProperties { 17 | private String type; 18 | private String initScriptPath = "META-INF/schema.sql"; 19 | private boolean initScriptEnabled = false; 20 | private boolean initScriptLogger = false; 21 | 22 | public String getType() { 23 | return type; 24 | } 25 | 26 | public void setType(String type) { 27 | this.type = type; 28 | } 29 | 30 | public String getInitScriptPath() { 31 | return initScriptPath; 32 | } 33 | 34 | public void setInitScriptPath(String initScriptPath) { 35 | this.initScriptPath = initScriptPath; 36 | } 37 | 38 | public boolean isInitScriptEnabled() { 39 | return initScriptEnabled; 40 | } 41 | 42 | public void setInitScriptEnabled(boolean initScriptEnabled) { 43 | this.initScriptEnabled = initScriptEnabled; 44 | } 45 | 46 | public boolean isInitScriptLogger() { 47 | return initScriptLogger; 48 | } 49 | 50 | public void setInitScriptLogger(boolean initScriptLogger) { 51 | this.initScriptLogger = initScriptLogger; 52 | } 53 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/templates/ignoreurl/add.ftl: -------------------------------------------------------------------------------- 1 | <@compress single_line=true> 2 | 3 | 4 | 5 | <#include "../common/layui.ftl"> 6 | 7 | 8 | 9 |Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.stereotype.Controller; 15 | import org.springframework.ui.Model; 16 | import org.springframework.web.bind.annotation.GetMapping; 17 | import org.springframework.web.bind.annotation.RequestMapping; 18 | 19 | import com.nepxion.discovery.platform.server.service.MenuService; 20 | import com.nepxion.discovery.platform.server.service.RoleService; 21 | 22 | @Controller 23 | @RequestMapping(PermissionController.PREFIX) 24 | public class PermissionPageController { 25 | @Autowired 26 | private RoleService roleService; 27 | 28 | @Autowired 29 | private MenuService menuService; 30 | 31 | @GetMapping("list") 32 | public String list(Model model) throws Exception { 33 | model.addAttribute("roles", roleService.getNotSuperAdmin()); 34 | model.addAttribute("menus", menuService.listNotEmptyUrlMenus()); 35 | return String.format("%s/%s", PermissionController.PREFIX, "list"); 36 | } 37 | 38 | @GetMapping("add") 39 | public String add(Model model) throws Exception { 40 | model.addAttribute("roles", roleService.getNotSuperAdmin()); 41 | return String.format("%s/%s", PermissionController.PREFIX, "add"); 42 | } 43 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/templates/ignoreurl/edit.ftl: -------------------------------------------------------------------------------- 1 | <@compress single_line=true> 2 | 3 | 4 | 5 | <#include "../common/layui.ftl"> 6 | 7 | 8 | 9 |Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.stereotype.Controller; 15 | import org.springframework.ui.Model; 16 | import org.springframework.web.bind.annotation.GetMapping; 17 | import org.springframework.web.bind.annotation.RequestMapping; 18 | import org.springframework.web.bind.annotation.RequestParam; 19 | 20 | import com.nepxion.discovery.platform.server.service.MenuService; 21 | 22 | @Controller 23 | @RequestMapping(MenuController.PREFIX) 24 | public class MenuPageController { 25 | @Autowired 26 | private MenuService menuService; 27 | 28 | @GetMapping("list") 29 | public String list() { 30 | return String.format("%s/%s", MenuController.PREFIX, "list"); 31 | } 32 | 33 | @RequestMapping("add") 34 | public String add(Model model) throws Exception { 35 | model.addAttribute("menus", menuService.listEmptyUrlMenus()); 36 | return String.format("%s/%s", MenuController.PREFIX, "add"); 37 | } 38 | 39 | @RequestMapping("edit") 40 | public String edit(Model model, @RequestParam(value = "id") Long id) throws Exception { 41 | model.addAttribute("menu", menuService.getById(id)); 42 | model.addAttribute("menus", menuService.listEmptyUrlMenus()); 43 | return String.format("%s/%s", MenuController.PREFIX, "edit"); 44 | } 45 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/interceptor/LoginInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.interceptor; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import javax.servlet.http.HttpServletRequest; 14 | import javax.servlet.http.HttpServletResponse; 15 | 16 | import org.apache.shiro.SecurityUtils; 17 | import org.slf4j.Logger; 18 | import org.slf4j.LoggerFactory; 19 | import org.springframework.web.method.HandlerMethod; 20 | import org.springframework.web.servlet.AsyncHandlerInterceptor; 21 | 22 | import com.nepxion.discovery.platform.server.constant.PlatformConstant; 23 | import com.nepxion.discovery.platform.server.entity.vo.AdminVo; 24 | import com.nepxion.discovery.platform.server.tool.ExceptionTool; 25 | 26 | public class LoginInterceptor implements AsyncHandlerInterceptor { 27 | private static final Logger LOG = LoggerFactory.getLogger(LoginInterceptor.class); 28 | 29 | @Override 30 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { 31 | if (handler.getClass().isAssignableFrom(HandlerMethod.class)) { 32 | try { 33 | AdminVo adminVo = (AdminVo) SecurityUtils.getSubject().getPrincipal(); 34 | if (adminVo != null) { 35 | request.setAttribute(PlatformConstant.CURRENT_ADMIN_LOGIN, adminVo); 36 | } 37 | } catch (Exception e) { 38 | LOG.error(ExceptionTool.getRootCauseMessage(e), e); 39 | } 40 | } 41 | return true; 42 | } 43 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/entity/po/ListSearchPo.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.entity.po; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import java.io.Serializable; 14 | 15 | import org.apache.commons.lang3.builder.EqualsBuilder; 16 | import org.apache.commons.lang3.builder.HashCodeBuilder; 17 | import org.apache.commons.lang3.builder.ToStringBuilder; 18 | import org.apache.commons.lang3.builder.ToStringStyle; 19 | 20 | import io.swagger.annotations.ApiModelProperty; 21 | 22 | public class ListSearchPo implements Serializable { 23 | private static final long serialVersionUID = 7174491897001035456L; 24 | 25 | @ApiModelProperty("页码") 26 | private Integer page; 27 | 28 | @ApiModelProperty("每页显示记录数") 29 | private Integer limit; 30 | 31 | public Integer getPage() { 32 | return page; 33 | } 34 | 35 | public void setPage(Integer page) { 36 | this.page = page; 37 | } 38 | 39 | public Integer getLimit() { 40 | return limit; 41 | } 42 | 43 | public void setLimit(Integer limit) { 44 | this.limit = limit; 45 | } 46 | 47 | @Override 48 | public int hashCode() { 49 | return HashCodeBuilder.reflectionHashCode(this); 50 | } 51 | 52 | @Override 53 | public boolean equals(Object object) { 54 | return EqualsBuilder.reflectionEquals(this, object); 55 | } 56 | 57 | @Override 58 | public String toString() { 59 | return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); 60 | } 61 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/js/autorefresh.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: https://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")) 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod) 9 | else // Plain browser env 10 | mod(CodeMirror) 11 | })(function(CodeMirror) { 12 | "use strict" 13 | 14 | CodeMirror.defineOption("autoRefresh", false, function(cm, val) { 15 | if (cm.state.autoRefresh) { 16 | stopListening(cm, cm.state.autoRefresh) 17 | cm.state.autoRefresh = null 18 | } 19 | if (val && cm.display.wrapper.offsetHeight == 0) 20 | startListening(cm, cm.state.autoRefresh = {delay: val.delay || 250}) 21 | }) 22 | 23 | function startListening(cm, state) { 24 | function check() { 25 | if (cm.display.wrapper.offsetHeight) { 26 | stopListening(cm, state) 27 | if (cm.display.lastWrapHeight != cm.display.wrapper.clientHeight) 28 | cm.refresh() 29 | } else { 30 | state.timeout = setTimeout(check, state.delay) 31 | } 32 | } 33 | state.timeout = setTimeout(check, state.delay) 34 | state.hurry = function() { 35 | clearTimeout(state.timeout) 36 | state.timeout = setTimeout(check, 50) 37 | } 38 | CodeMirror.on(window, "mouseup", state.hurry) 39 | CodeMirror.on(window, "keyup", state.hurry) 40 | } 41 | 42 | function stopListening(_cm, state) { 43 | clearTimeout(state.timeout) 44 | CodeMirror.off(window, "mouseup", state.hurry) 45 | CodeMirror.off(window, "keyup", state.hurry) 46 | } 47 | }); 48 | -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-h2/src/main/java/com/nepxion/discovery/platform/server/h2/configuration/PlatformH2AutoConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.platform.server.h2.configuration; 2 | 3 | /** 4 | *Title: Nepxion Discovery
5 | *Description: Nepxion Discovery
6 | *Copyright: Copyright (c) 2017-2050
7 | *Company: Nepxion
8 | * 9 | * @author Ning Zhang 10 | * @version 1.0 11 | */ 12 | 13 | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; 14 | import org.springframework.context.annotation.Bean; 15 | import org.springframework.context.annotation.Configuration; 16 | 17 | import com.nepxion.banner.BannerConstant; 18 | import com.nepxion.banner.Description; 19 | import com.nepxion.banner.LogoBanner; 20 | import com.nepxion.banner.NepxionBanner; 21 | import com.nepxion.discovery.platform.server.adapter.PlatformLoginAdapter; 22 | import com.nepxion.discovery.platform.server.h2.adapter.PlatformH2LoginAdapter; 23 | import com.nepxion.discovery.platform.server.h2.constant.PlatformH2Constant; 24 | import com.taobao.text.Color; 25 | 26 | @Configuration 27 | @ConditionalOnProperty(name = "platform.datasource.type", havingValue = PlatformH2Constant.H2_TYPE) 28 | public class PlatformH2AutoConfiguration { 29 | static { 30 | LogoBanner logoBanner = new LogoBanner(PlatformH2AutoConfiguration.class, "/com/nepxion/h2/resource/logo.txt", "Welcome to Nepxion", 2, 5, new Color[] { Color.red, Color.green }, true); 31 | NepxionBanner.show(logoBanner, new Description("Plugin:", PlatformH2Constant.H2_TYPE, 0, 1), new Description(BannerConstant.GITHUB + ":", BannerConstant.NEPXION_GITHUB + "/Discovery", 0, 1)); 32 | } 33 | 34 | @Bean 35 | public PlatformLoginAdapter platformLoginAdapter() { 36 | return new PlatformH2LoginAdapter(); 37 | } 38 | } -------------------------------------------------------------------------------- /discovery-platform-server/discovery-platform-starter-server-ui/src/main/resources/static/js/kafkaperformance.js: -------------------------------------------------------------------------------- 1 | function kafkaChart(text, data, isPercent) { 2 | return { 3 | title: { 4 | text: text 5 | }, 6 | grid: { 7 | left: '4%', 8 | right: '9%', 9 | bottom: 40, 10 | containLabel: true 11 | }, 12 | toolbox: { 13 | feature: { 14 | dataZoom: { 15 | yAxisIndex: 'none' 16 | }, 17 | restore: {}, 18 | saveAsImage: {} 19 | } 20 | }, 21 | tooltip: { 22 | trigger: 'axis', 23 | axisPointer: { 24 | type: 'cross', 25 | animation: false, 26 | label: { 27 | backgroundColor: '#505765' 28 | } 29 | } 30 | }, 31 | dataZoom: [ 32 | { 33 | show: true, 34 | realtime: true, 35 | start: 0, 36 | end: 100 37 | }, 38 | { 39 | type: 'inside', 40 | realtime: true, 41 | start: 0, 42 | end: 100 43 | } 44 | ], 45 | yAxis: [{ 46 | type: 'value', 47 | axisLabel: { 48 | show: true, 49 | interval: 'auto', 50 | formatter: '{value}' + (isPercent ? ' %' : '') 51 | }, 52 | show: true 53 | }], 54 | xAxis: { 55 | type: 'category', 56 | boundaryGap: false, 57 | axisLine: {onZero: false}, 58 | data: data.times.map(function (str) { 59 | return str.replace(' ', '\n') 60 | }) 61 | }, 62 | series: data.series 63 | }; 64 | } --------------------------------------------------------------------------------