├── .gitattributes
├── .gitignore
├── .project-resouce
├── MI-PRO-O.png
├── MILOGO-120x120.png
├── README.md
├── thanks.png
└── 项目效果图
│ ├── SBA-v1.0.gif
│ ├── SBA监控项目环境.png
│ ├── blog
│ ├── background.jpg
│ ├── detail.jpg
│ ├── index.jpg
│ └── markdown.jpg
│ ├── eureka.png
│ ├── sbad.png
│ └── swagger2.gif
├── LICENSE
├── README.md
├── mi-admin
├── README.md
├── mi-platform-center-web
│ ├── .babelrc
│ ├── .editorconfig
│ ├── .gitignore
│ ├── .postcssrc.js
│ ├── README.md
│ ├── build
│ │ ├── build.js
│ │ ├── check-versions.js
│ │ ├── dev-client.js
│ │ ├── dev-server.js
│ │ ├── utils.js
│ │ ├── vue-loader.conf.js
│ │ ├── webpack.base.conf.js
│ │ ├── webpack.dev.conf.js
│ │ └── webpack.prod.conf.js
│ ├── config
│ │ ├── dev.env.js
│ │ ├── index.js
│ │ └── prod.env.js
│ ├── index.html
│ ├── package.json
│ ├── src
│ │ ├── App.vue
│ │ ├── assets
│ │ │ └── logo.png
│ │ ├── components
│ │ │ └── Hello.vue
│ │ ├── main.js
│ │ └── router
│ │ │ └── index.js
│ └── static
│ │ └── .gitkeep
├── mi-platform-center
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── mi
│ │ │ ├── MiPlatformCenterApplication.java
│ │ │ ├── SwaggerConfig.java
│ │ │ ├── config
│ │ │ ├── aspect
│ │ │ │ └── WebRequestLogAspect.java
│ │ │ ├── database
│ │ │ │ ├── DataBaseConfiguration.java
│ │ │ │ ├── DataSourceAop.java
│ │ │ │ ├── DataSourceContextHolder.java
│ │ │ │ ├── DataSourceTransactionManager.java
│ │ │ │ ├── DataSourceType.java
│ │ │ │ ├── MyAbstractRoutingDataSource.java
│ │ │ │ └── MybatisPlusConfig.java
│ │ │ ├── druid
│ │ │ │ ├── DruidStatFilter.java
│ │ │ │ └── DruidStatViewServlet.java
│ │ │ └── redis
│ │ │ │ ├── RedisConfig.java
│ │ │ │ └── RedisUtil.java
│ │ │ └── module
│ │ │ ├── common
│ │ │ └── controller
│ │ │ │ └── RedisController.java
│ │ │ └── system
│ │ │ ├── controller
│ │ │ └── MiSysLogController.java
│ │ │ ├── entity
│ │ │ └── MiSysLog.java
│ │ │ ├── mapper
│ │ │ ├── MiSysLogMapper.java
│ │ │ └── impl
│ │ │ │ └── MiSysLogMapper.xml
│ │ │ └── service
│ │ │ ├── IMiSysLogService.java
│ │ │ └── impl
│ │ │ └── MiSysLogServiceImpl.java
│ │ └── resources
│ │ ├── application.properties
│ │ └── logback.xml
└── pom.xml
├── mi-api
├── README.md
├── mi-eureka-client-api
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── mi
│ │ │ ├── MiEurekaClientApiApplication.java
│ │ │ └── controller
│ │ │ └── ApiController.java
│ │ └── resources
│ │ └── application.yml
├── mi-eureka-client
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── mi
│ │ │ ├── MiEurekaClientApplication.java
│ │ │ ├── common
│ │ │ ├── CORSConfiguration.java
│ │ │ ├── CorsFilter.java
│ │ │ └── ServiceMoitor.java
│ │ │ └── controller
│ │ │ ├── ClientController.java
│ │ │ ├── SwaggerController.java
│ │ │ └── TestController.java
│ │ └── resources
│ │ ├── application-dev.yml
│ │ ├── application.yml
│ │ └── logback.xml
├── mi-eureka-consumer
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── mi
│ │ │ ├── MiEurekaConsumerApplication.java
│ │ │ ├── common
│ │ │ └── CloudRestTemplateConfig.java
│ │ │ ├── feign
│ │ │ └── FeignController.java
│ │ │ ├── ribbon
│ │ │ └── RibbonController.java
│ │ │ └── service
│ │ │ ├── FeignService.java
│ │ │ └── impl
│ │ │ └── RibbonServiceImpl.java
│ │ └── resources
│ │ ├── application-dev.yml
│ │ ├── application.yml
│ │ └── logback.xml
├── mi-eureka-server-bak
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── mi
│ │ │ └── MiEurekaServerBakApplication.java
│ │ └── resources
│ │ └── application.yml
├── mi-eureka-server
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── mi
│ │ │ └── MiEurekaServerApplication.java
│ │ └── resources
│ │ ├── application-dev.yml
│ │ ├── application.yml
│ │ └── logback.xml
└── pom.xml
├── mi-blog
├── README.md
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── mi
│ │ ├── MiBlogApplication.java
│ │ ├── config
│ │ ├── aspect
│ │ │ └── WebRequestLogAspect.java
│ │ ├── auth
│ │ │ ├── CustomAuthenticationProvider.java
│ │ │ └── WebSecurityAdapter.java
│ │ ├── database
│ │ │ ├── DataBaseConfiguration.java
│ │ │ ├── DataSourceAop.java
│ │ │ ├── DataSourceContextHolder.java
│ │ │ ├── DataSourceTransactionManager.java
│ │ │ ├── DataSourceType.java
│ │ │ ├── MyAbstractRoutingDataSource.java
│ │ │ └── MybatisPlusConfig.java
│ │ └── druid
│ │ │ ├── DruidStatFilter.java
│ │ │ └── DruidStatViewServlet.java
│ │ ├── data
│ │ ├── dto
│ │ │ └── readme.txt
│ │ └── vo
│ │ │ ├── ArticleVo.java
│ │ │ ├── Pager.java
│ │ │ ├── TagCloudVo.java
│ │ │ ├── TypeVo.java
│ │ │ └── readme.txt
│ │ └── module
│ │ ├── admin
│ │ └── controller
│ │ │ ├── AdminArticleController.java
│ │ │ ├── AdminFlinkController.java
│ │ │ ├── AdminPageController.java
│ │ │ ├── AdminTagController.java
│ │ │ ├── AdminTypeController.java
│ │ │ └── AdminUserController.java
│ │ └── blog
│ │ ├── controller
│ │ ├── IndexPageController.java
│ │ └── MenuController.java
│ │ ├── entity
│ │ ├── Article.java
│ │ ├── ArticleTag.java
│ │ ├── ArticleType.java
│ │ ├── Friendlink.java
│ │ ├── Log.java
│ │ ├── Tag.java
│ │ ├── Type.java
│ │ ├── User.java
│ │ └── UserInfo.java
│ │ ├── mapper
│ │ ├── ArticleMapper.java
│ │ ├── ArticleTagMapper.java
│ │ ├── ArticleTypeMapper.java
│ │ ├── FriendlinkMapper.java
│ │ ├── LogMapper.java
│ │ ├── TagMapper.java
│ │ ├── TypeMapper.java
│ │ ├── UserInfoMapper.java
│ │ ├── UserMapper.java
│ │ └── impl
│ │ │ ├── ArticleMapper.xml
│ │ │ ├── ArticleTagMapper.xml
│ │ │ ├── ArticleTypeMapper.xml
│ │ │ ├── FriendlinkMapper.xml
│ │ │ ├── LogMapper.xml
│ │ │ ├── TagMapper.xml
│ │ │ ├── TypeMapper.xml
│ │ │ ├── UserInfoMapper.xml
│ │ │ └── UserMapper.xml
│ │ └── service
│ │ ├── IArticleService.java
│ │ ├── IArticleTagService.java
│ │ ├── IArticleTypeService.java
│ │ ├── IFriendlinkService.java
│ │ ├── ILogService.java
│ │ ├── ITagService.java
│ │ ├── ITypeService.java
│ │ ├── IUserInfoService.java
│ │ ├── IUserService.java
│ │ └── impl
│ │ ├── ArticleServiceImpl.java
│ │ ├── ArticleTagServiceImpl.java
│ │ ├── ArticleTypeServiceImpl.java
│ │ ├── FriendlinkServiceImpl.java
│ │ ├── LogServiceImpl.java
│ │ ├── TagServiceImpl.java
│ │ ├── TypeServiceImpl.java
│ │ ├── UserInfoServiceImpl.java
│ │ └── UserServiceImpl.java
│ └── resources
│ ├── application-dev.properties
│ ├── application.properties
│ ├── banner.txt
│ ├── logback.xml
│ ├── static
│ ├── admin
│ │ ├── css
│ │ │ ├── animate.css
│ │ │ ├── article-add.css
│ │ │ ├── base.css
│ │ │ ├── bootstrap-rtl.css
│ │ │ ├── bootstrap.min.css
│ │ │ ├── editormd.css
│ │ │ ├── font-awesome.min.css
│ │ │ ├── md.css
│ │ │ ├── owl.carousel.css
│ │ │ ├── patterns
│ │ │ │ ├── header-profile-skin-1.png
│ │ │ │ ├── header-profile-skin-2.png
│ │ │ │ ├── header-profile-skin-3.png
│ │ │ │ ├── header-profile.png
│ │ │ │ └── shattered.png
│ │ │ ├── plugins
│ │ │ │ ├── chosen
│ │ │ │ │ ├── chosen-sprite.png
│ │ │ │ │ └── chosen.css
│ │ │ │ ├── codemirror
│ │ │ │ │ ├── ambiance.css
│ │ │ │ │ └── codemirror.css
│ │ │ │ ├── colorpicker
│ │ │ │ │ └── css
│ │ │ │ │ │ └── bootstrap-colorpicker.min.css
│ │ │ │ ├── dataTables
│ │ │ │ │ └── dataTables.bootstrap.css
│ │ │ │ ├── datapicker
│ │ │ │ │ └── datepicker3.css
│ │ │ │ ├── markdown
│ │ │ │ │ └── bootstrap-markdown.min.css
│ │ │ │ ├── morris
│ │ │ │ │ └── morris-0.4.3.min.css
│ │ │ │ ├── nouslider
│ │ │ │ │ └── jquery.nouislider.css
│ │ │ │ ├── simditor
│ │ │ │ │ └── simditor.css
│ │ │ │ ├── steps
│ │ │ │ │ └── jquery.steps.css
│ │ │ │ ├── summernote
│ │ │ │ │ ├── summernote-bs3.css
│ │ │ │ │ └── summernote.css
│ │ │ │ ├── switchery
│ │ │ │ │ └── switchery.css
│ │ │ │ ├── toastr
│ │ │ │ │ └── toastr.min.css
│ │ │ │ ├── treeview
│ │ │ │ │ └── bootstrap-treeview.css
│ │ │ │ └── webuploader
│ │ │ │ │ └── webuploader.css
│ │ │ ├── public.css
│ │ │ ├── style.css
│ │ │ └── upload-image.css
│ │ ├── js
│ │ │ ├── article
│ │ │ │ ├── add_article.js
│ │ │ │ ├── article.js
│ │ │ │ └── edit_article.js
│ │ │ ├── bootstrap.js
│ │ │ ├── bootstrap.min.js
│ │ │ ├── cropper.min.js
│ │ │ ├── editormd.js
│ │ │ ├── flavr
│ │ │ │ ├── base.js
│ │ │ │ ├── css
│ │ │ │ │ ├── bootstrap.min.css
│ │ │ │ │ ├── highlight
│ │ │ │ │ │ └── default.css
│ │ │ │ │ └── style.css
│ │ │ │ ├── flavr
│ │ │ │ │ ├── css
│ │ │ │ │ │ ├── animate.css
│ │ │ │ │ │ ├── flavr.css
│ │ │ │ │ │ └── flavr.min.css
│ │ │ │ │ ├── images
│ │ │ │ │ │ └── icons
│ │ │ │ │ │ │ ├── calendar.png
│ │ │ │ │ │ │ ├── chat-bubble.png
│ │ │ │ │ │ │ ├── chrome.png
│ │ │ │ │ │ │ ├── document.png
│ │ │ │ │ │ │ ├── dribbble.png
│ │ │ │ │ │ │ ├── drive.png
│ │ │ │ │ │ │ ├── email.png
│ │ │ │ │ │ │ ├── evernote.png
│ │ │ │ │ │ │ ├── facebook.png
│ │ │ │ │ │ │ ├── forsquare.png
│ │ │ │ │ │ │ ├── github.png
│ │ │ │ │ │ │ ├── gmail.png
│ │ │ │ │ │ │ ├── google+.png
│ │ │ │ │ │ │ ├── linkedin.png
│ │ │ │ │ │ │ ├── location-pointer.png
│ │ │ │ │ │ │ ├── play.png
│ │ │ │ │ │ │ ├── search.png
│ │ │ │ │ │ │ ├── skype.png
│ │ │ │ │ │ │ ├── star.png
│ │ │ │ │ │ │ ├── task.png
│ │ │ │ │ │ │ ├── tumblr.png
│ │ │ │ │ │ │ ├── twitter.png
│ │ │ │ │ │ │ ├── upload.png
│ │ │ │ │ │ │ ├── vimeo.png
│ │ │ │ │ │ │ └── youtube.png
│ │ │ │ │ └── js
│ │ │ │ │ │ ├── flavr.js
│ │ │ │ │ │ └── flavr.min.js
│ │ │ │ ├── fonts
│ │ │ │ │ ├── fontawesome.css
│ │ │ │ │ ├── fontawesome
│ │ │ │ │ │ ├── FontAwesome.otf
│ │ │ │ │ │ ├── fontawesome-webfont.eot
│ │ │ │ │ │ ├── fontawesome-webfont.svg
│ │ │ │ │ │ ├── fontawesome-webfont.ttf
│ │ │ │ │ │ └── fontawesome-webfont.woff
│ │ │ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ │ │ ├── glyphicons-halflings-regular.svg
│ │ │ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ │ │ ├── lato.css
│ │ │ │ │ └── lato
│ │ │ │ │ │ ├── lato-bold-webfont.eot
│ │ │ │ │ │ ├── lato-bold-webfont.svg
│ │ │ │ │ │ ├── lato-bold-webfont.ttf
│ │ │ │ │ │ ├── lato-bold-webfont.woff
│ │ │ │ │ │ ├── lato-light-demo.html
│ │ │ │ │ │ ├── lato-light-webfont.eot
│ │ │ │ │ │ ├── lato-light-webfont.svg
│ │ │ │ │ │ ├── lato-light-webfont.ttf
│ │ │ │ │ │ ├── lato-light-webfont.woff
│ │ │ │ │ │ ├── lato-regular-demo.html
│ │ │ │ │ │ ├── lato-regular-webfont.eot
│ │ │ │ │ │ ├── lato-regular-webfont.svg
│ │ │ │ │ │ ├── lato-regular-webfont.ttf
│ │ │ │ │ │ └── lato-regular-webfont.woff
│ │ │ │ ├── js
│ │ │ │ │ ├── bootstrap.min.js
│ │ │ │ │ ├── highlight.pack.js
│ │ │ │ │ ├── jquery-1.10.2.min.map
│ │ │ │ │ ├── jquery.browser.js
│ │ │ │ │ ├── jquery.min.js
│ │ │ │ │ └── livedemo.js
│ │ │ │ └── less
│ │ │ │ │ ├── flavr.less
│ │ │ │ │ ├── mixins.less
│ │ │ │ │ └── style.less
│ │ │ ├── flink
│ │ │ │ └── flink.js
│ │ │ ├── hplus.js
│ │ │ ├── jquery.form.js
│ │ │ ├── plugins
│ │ │ │ ├── chosen
│ │ │ │ │ └── chosen.jquery.js
│ │ │ │ ├── colorpicker
│ │ │ │ │ └── bootstrap-colorpicker.min.js
│ │ │ │ ├── dataTables
│ │ │ │ │ ├── dataTables.bootstrap.js
│ │ │ │ │ └── jquery.dataTables.js
│ │ │ │ ├── datapicker
│ │ │ │ │ └── bootstrap-datepicker.js
│ │ │ │ ├── markdown
│ │ │ │ │ ├── bootstrap-markdown.js
│ │ │ │ │ ├── bootstrap-markdown.zh.js
│ │ │ │ │ ├── markdown.js
│ │ │ │ │ └── to-markdown.js
│ │ │ │ ├── metisMenu
│ │ │ │ │ └── jquery.metisMenu.js
│ │ │ │ └── slimscroll
│ │ │ │ │ └── jquery.slimscroll.min.js
│ │ │ ├── tag
│ │ │ │ └── tag.js
│ │ │ ├── type
│ │ │ │ └── type.js
│ │ │ ├── upload-image.js
│ │ │ ├── userinfo.js
│ │ │ └── validation.js
│ │ ├── lib
│ │ │ ├── codemirror
│ │ │ │ ├── AUTHORS
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── addon
│ │ │ │ │ ├── comment
│ │ │ │ │ │ ├── comment.js
│ │ │ │ │ │ └── continuecomment.js
│ │ │ │ │ ├── dialog
│ │ │ │ │ │ ├── dialog.css
│ │ │ │ │ │ └── dialog.js
│ │ │ │ │ ├── display
│ │ │ │ │ │ ├── fullscreen.css
│ │ │ │ │ │ ├── fullscreen.js
│ │ │ │ │ │ ├── panel.js
│ │ │ │ │ │ ├── placeholder.js
│ │ │ │ │ │ └── rulers.js
│ │ │ │ │ ├── edit
│ │ │ │ │ │ ├── closebrackets.js
│ │ │ │ │ │ ├── closetag.js
│ │ │ │ │ │ ├── continuelist.js
│ │ │ │ │ │ ├── matchbrackets.js
│ │ │ │ │ │ ├── matchtags.js
│ │ │ │ │ │ └── trailingspace.js
│ │ │ │ │ ├── fold
│ │ │ │ │ │ ├── brace-fold.js
│ │ │ │ │ │ ├── comment-fold.js
│ │ │ │ │ │ ├── foldcode.js
│ │ │ │ │ │ ├── foldgutter.css
│ │ │ │ │ │ ├── foldgutter.js
│ │ │ │ │ │ ├── indent-fold.js
│ │ │ │ │ │ ├── markdown-fold.js
│ │ │ │ │ │ └── xml-fold.js
│ │ │ │ │ ├── hint
│ │ │ │ │ │ ├── anyword-hint.js
│ │ │ │ │ │ ├── css-hint.js
│ │ │ │ │ │ ├── html-hint.js
│ │ │ │ │ │ ├── javascript-hint.js
│ │ │ │ │ │ ├── show-hint.css
│ │ │ │ │ │ ├── show-hint.js
│ │ │ │ │ │ ├── sql-hint.js
│ │ │ │ │ │ └── xml-hint.js
│ │ │ │ │ ├── lint
│ │ │ │ │ │ ├── coffeescript-lint.js
│ │ │ │ │ │ ├── css-lint.js
│ │ │ │ │ │ ├── javascript-lint.js
│ │ │ │ │ │ ├── json-lint.js
│ │ │ │ │ │ ├── lint.css
│ │ │ │ │ │ ├── lint.js
│ │ │ │ │ │ └── yaml-lint.js
│ │ │ │ │ ├── merge
│ │ │ │ │ │ ├── merge.css
│ │ │ │ │ │ └── merge.js
│ │ │ │ │ ├── mode
│ │ │ │ │ │ ├── loadmode.js
│ │ │ │ │ │ ├── multiplex.js
│ │ │ │ │ │ ├── multiplex_test.js
│ │ │ │ │ │ ├── overlay.js
│ │ │ │ │ │ └── simple.js
│ │ │ │ │ ├── runmode
│ │ │ │ │ │ ├── colorize.js
│ │ │ │ │ │ ├── runmode-standalone.js
│ │ │ │ │ │ ├── runmode.js
│ │ │ │ │ │ └── runmode.node.js
│ │ │ │ │ ├── scroll
│ │ │ │ │ │ ├── annotatescrollbar.js
│ │ │ │ │ │ ├── scrollpastend.js
│ │ │ │ │ │ ├── simplescrollbars.css
│ │ │ │ │ │ └── simplescrollbars.js
│ │ │ │ │ ├── search
│ │ │ │ │ │ ├── match-highlighter.js
│ │ │ │ │ │ ├── matchesonscrollbar.css
│ │ │ │ │ │ ├── matchesonscrollbar.js
│ │ │ │ │ │ ├── search.js
│ │ │ │ │ │ └── searchcursor.js
│ │ │ │ │ ├── selection
│ │ │ │ │ │ ├── active-line.js
│ │ │ │ │ │ ├── mark-selection.js
│ │ │ │ │ │ └── selection-pointer.js
│ │ │ │ │ ├── tern
│ │ │ │ │ │ ├── tern.css
│ │ │ │ │ │ ├── tern.js
│ │ │ │ │ │ └── worker.js
│ │ │ │ │ └── wrap
│ │ │ │ │ │ └── hardwrap.js
│ │ │ │ ├── addons.min.js
│ │ │ │ ├── bower.json
│ │ │ │ ├── codemirror.min.css
│ │ │ │ ├── codemirror.min.js
│ │ │ │ ├── lib
│ │ │ │ │ ├── codemirror.css
│ │ │ │ │ └── codemirror.js
│ │ │ │ ├── mode
│ │ │ │ │ ├── apl
│ │ │ │ │ │ ├── apl.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── asterisk
│ │ │ │ │ │ ├── asterisk.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── clike
│ │ │ │ │ │ ├── clike.js
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── scala.html
│ │ │ │ │ ├── clojure
│ │ │ │ │ │ ├── clojure.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── cobol
│ │ │ │ │ │ ├── cobol.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── coffeescript
│ │ │ │ │ │ ├── coffeescript.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── commonlisp
│ │ │ │ │ │ ├── commonlisp.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── css
│ │ │ │ │ │ ├── css.js
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── less.html
│ │ │ │ │ │ ├── less_test.js
│ │ │ │ │ │ ├── scss.html
│ │ │ │ │ │ ├── scss_test.js
│ │ │ │ │ │ └── test.js
│ │ │ │ │ ├── cypher
│ │ │ │ │ │ ├── cypher.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── d
│ │ │ │ │ │ ├── d.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── dart
│ │ │ │ │ │ ├── dart.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── diff
│ │ │ │ │ │ ├── diff.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── django
│ │ │ │ │ │ ├── django.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── dockerfile
│ │ │ │ │ │ ├── dockerfile.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── dtd
│ │ │ │ │ │ ├── dtd.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── dylan
│ │ │ │ │ │ ├── dylan.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── ebnf
│ │ │ │ │ │ ├── ebnf.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── ecl
│ │ │ │ │ │ ├── ecl.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── eiffel
│ │ │ │ │ │ ├── eiffel.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── erlang
│ │ │ │ │ │ ├── erlang.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── forth
│ │ │ │ │ │ ├── forth.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── fortran
│ │ │ │ │ │ ├── fortran.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── gas
│ │ │ │ │ │ ├── gas.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── gfm
│ │ │ │ │ │ ├── gfm.js
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── test.js
│ │ │ │ │ ├── gherkin
│ │ │ │ │ │ ├── gherkin.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── go
│ │ │ │ │ │ ├── go.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── groovy
│ │ │ │ │ │ ├── groovy.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── haml
│ │ │ │ │ │ ├── haml.js
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── test.js
│ │ │ │ │ ├── haskell
│ │ │ │ │ │ ├── haskell.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── haxe
│ │ │ │ │ │ ├── haxe.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── htmlembedded
│ │ │ │ │ │ ├── htmlembedded.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── htmlmixed
│ │ │ │ │ │ ├── htmlmixed.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── http
│ │ │ │ │ │ ├── http.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── idl
│ │ │ │ │ │ ├── idl.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── index.html
│ │ │ │ │ ├── jade
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── jade.js
│ │ │ │ │ ├── javascript
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── javascript.js
│ │ │ │ │ │ ├── json-ld.html
│ │ │ │ │ │ ├── test.js
│ │ │ │ │ │ └── typescript.html
│ │ │ │ │ ├── jinja2
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── jinja2.js
│ │ │ │ │ ├── julia
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── julia.js
│ │ │ │ │ ├── kotlin
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── kotlin.js
│ │ │ │ │ ├── livescript
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── livescript.js
│ │ │ │ │ ├── lua
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── lua.js
│ │ │ │ │ ├── markdown
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── markdown.js
│ │ │ │ │ │ └── test.js
│ │ │ │ │ ├── meta.js
│ │ │ │ │ ├── mirc
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── mirc.js
│ │ │ │ │ ├── mllike
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── mllike.js
│ │ │ │ │ ├── modelica
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── modelica.js
│ │ │ │ │ ├── nginx
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── nginx.js
│ │ │ │ │ ├── ntriples
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── ntriples.js
│ │ │ │ │ ├── octave
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── octave.js
│ │ │ │ │ ├── pascal
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── pascal.js
│ │ │ │ │ ├── pegjs
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── pegjs.js
│ │ │ │ │ ├── perl
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── perl.js
│ │ │ │ │ ├── php
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── php.js
│ │ │ │ │ │ └── test.js
│ │ │ │ │ ├── pig
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── pig.js
│ │ │ │ │ ├── properties
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── properties.js
│ │ │ │ │ ├── puppet
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── puppet.js
│ │ │ │ │ ├── python
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── python.js
│ │ │ │ │ ├── q
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── q.js
│ │ │ │ │ ├── r
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── r.js
│ │ │ │ │ ├── rpm
│ │ │ │ │ │ ├── changes
│ │ │ │ │ │ │ └── index.html
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── rpm.js
│ │ │ │ │ ├── rst
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── rst.js
│ │ │ │ │ ├── ruby
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── ruby.js
│ │ │ │ │ │ └── test.js
│ │ │ │ │ ├── rust
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── rust.js
│ │ │ │ │ ├── sass
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── sass.js
│ │ │ │ │ ├── scheme
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── scheme.js
│ │ │ │ │ ├── shell
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── shell.js
│ │ │ │ │ │ └── test.js
│ │ │ │ │ ├── sieve
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── sieve.js
│ │ │ │ │ ├── slim
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── slim.js
│ │ │ │ │ │ └── test.js
│ │ │ │ │ ├── smalltalk
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── smalltalk.js
│ │ │ │ │ ├── smarty
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── smarty.js
│ │ │ │ │ ├── smartymixed
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── smartymixed.js
│ │ │ │ │ ├── solr
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── solr.js
│ │ │ │ │ ├── soy
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── soy.js
│ │ │ │ │ ├── sparql
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── sparql.js
│ │ │ │ │ ├── spreadsheet
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── spreadsheet.js
│ │ │ │ │ ├── sql
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── sql.js
│ │ │ │ │ ├── stex
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── stex.js
│ │ │ │ │ │ └── test.js
│ │ │ │ │ ├── stylus
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── stylus.js
│ │ │ │ │ ├── tcl
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── tcl.js
│ │ │ │ │ ├── textile
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── test.js
│ │ │ │ │ │ └── textile.js
│ │ │ │ │ ├── tiddlywiki
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── tiddlywiki.css
│ │ │ │ │ │ └── tiddlywiki.js
│ │ │ │ │ ├── tiki
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── tiki.css
│ │ │ │ │ │ └── tiki.js
│ │ │ │ │ ├── toml
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── toml.js
│ │ │ │ │ ├── tornado
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── tornado.js
│ │ │ │ │ ├── turtle
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── turtle.js
│ │ │ │ │ ├── vb
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── vb.js
│ │ │ │ │ ├── vbscript
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── vbscript.js
│ │ │ │ │ ├── velocity
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── velocity.js
│ │ │ │ │ ├── verilog
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── test.js
│ │ │ │ │ │ └── verilog.js
│ │ │ │ │ ├── xml
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── test.js
│ │ │ │ │ │ └── xml.js
│ │ │ │ │ ├── xquery
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── test.js
│ │ │ │ │ │ └── xquery.js
│ │ │ │ │ ├── yaml
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── yaml.js
│ │ │ │ │ └── z80
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── z80.js
│ │ │ │ ├── modes.min.js
│ │ │ │ ├── package.json
│ │ │ │ └── theme
│ │ │ │ │ ├── 3024-day.css
│ │ │ │ │ ├── 3024-night.css
│ │ │ │ │ ├── ambiance-mobile.css
│ │ │ │ │ ├── ambiance.css
│ │ │ │ │ ├── base16-dark.css
│ │ │ │ │ ├── base16-light.css
│ │ │ │ │ ├── blackboard.css
│ │ │ │ │ ├── cobalt.css
│ │ │ │ │ ├── colorforth.css
│ │ │ │ │ ├── eclipse.css
│ │ │ │ │ ├── elegant.css
│ │ │ │ │ ├── erlang-dark.css
│ │ │ │ │ ├── lesser-dark.css
│ │ │ │ │ ├── mbo.css
│ │ │ │ │ ├── mdn-like.css
│ │ │ │ │ ├── midnight.css
│ │ │ │ │ ├── monokai.css
│ │ │ │ │ ├── neat.css
│ │ │ │ │ ├── neo.css
│ │ │ │ │ ├── night.css
│ │ │ │ │ ├── paraiso-dark.css
│ │ │ │ │ ├── paraiso-light.css
│ │ │ │ │ ├── pastel-on-dark.css
│ │ │ │ │ ├── rubyblue.css
│ │ │ │ │ ├── solarized.css
│ │ │ │ │ ├── the-matrix.css
│ │ │ │ │ ├── tomorrow-night-bright.css
│ │ │ │ │ ├── tomorrow-night-eighties.css
│ │ │ │ │ ├── twilight.css
│ │ │ │ │ ├── vibrant-ink.css
│ │ │ │ │ ├── xq-dark.css
│ │ │ │ │ ├── xq-light.css
│ │ │ │ │ └── zenburn.css
│ │ │ ├── flowchart.min.js
│ │ │ ├── jquery.flowchart.min.js
│ │ │ ├── marked.min.js
│ │ │ ├── prettify.min.js
│ │ │ ├── raphael.min.js
│ │ │ ├── sequence-diagram.min.js
│ │ │ └── underscore.min.js
│ │ └── plugins
│ │ │ ├── code-block-dialog
│ │ │ └── code-block-dialog.js
│ │ │ ├── emoji-dialog
│ │ │ ├── emoji-dialog.js
│ │ │ └── emoji.json
│ │ │ ├── image-dialog
│ │ │ └── image-dialog.js
│ │ │ ├── link-dialog
│ │ │ └── link-dialog.js
│ │ │ ├── preformatted-text-dialog
│ │ │ └── preformatted-text-dialog.js
│ │ │ ├── reference-link-dialog
│ │ │ └── reference-link-dialog.js
│ │ │ └── table-dialog
│ │ │ └── table-dialog.js
│ ├── css
│ │ ├── about.me.css
│ │ ├── bootstrap.min.css
│ │ ├── common.css
│ │ ├── editormd.preview.css
│ │ ├── error.css
│ │ ├── images
│ │ │ ├── login_bgx.gif
│ │ │ ├── m.png
│ │ │ └── thumb-default-small.png
│ │ ├── load.css
│ │ ├── loading.css
│ │ ├── login.css
│ │ ├── normalize.css
│ │ ├── pagination.css
│ │ ├── share.css
│ │ └── style.css
│ ├── ex
│ │ ├── background.jpg
│ │ ├── detail.jpg
│ │ ├── index.jpg
│ │ └── markdown.jpg
│ ├── favicon.ico
│ ├── image
│ │ ├── avatar.jpg
│ │ ├── error-img.png
│ │ ├── fork_github.png
│ │ ├── img-sprite.png
│ │ ├── loading.gif
│ │ ├── loading@2x.gif
│ │ ├── loading@3x.gif
│ │ ├── login_bgx.gif
│ │ ├── login_m_bg.png
│ │ ├── m.png
│ │ ├── share_core_square.jpg
│ │ ├── social.png
│ │ ├── thymeleaf.png
│ │ └── wechar.jpg
│ ├── js
│ │ ├── article-content.js
│ │ ├── busuamzi.pure.mini.js
│ │ ├── insight.js
│ │ ├── jqPaginator.min.js
│ │ ├── jquery.imgbox.pack.js
│ │ ├── jquery.js
│ │ ├── jquery.min.js
│ │ ├── lightgallery.min.js
│ │ ├── login.js
│ │ ├── main.js
│ │ ├── mi-shake.js
│ │ ├── rotator.js
│ │ └── share.js
│ └── sql
│ │ └── mi-blog.sql
│ └── templates
│ ├── admin
│ ├── article
│ │ ├── articleAdd.html
│ │ ├── articleEdit.html
│ │ ├── articleEditInfo.html
│ │ ├── articleInfo.html
│ │ ├── articleList.html
│ │ └── articleTable.html
│ ├── flink
│ │ ├── flinkAdd.html
│ │ ├── flinkEdit.html
│ │ ├── flinkList.html
│ │ └── flinkTable.html
│ ├── index.html
│ ├── partial
│ │ ├── avatar.html
│ │ ├── footer.html
│ │ ├── head.html
│ │ ├── module-userinfo.html
│ │ ├── sidebar.html
│ │ └── userinfo.html
│ ├── tag
│ │ ├── tagAdd.html
│ │ ├── tagEdit.html
│ │ ├── tagList.html
│ │ └── tagTable.html
│ └── type
│ │ ├── typeAdd.html
│ │ ├── typeEdit.html
│ │ ├── typeList.html
│ │ └── typeTable.html
│ ├── blog
│ ├── aboutMe.html
│ ├── archive.html
│ ├── archiveSummary.html
│ ├── article.html
│ ├── index.html
│ ├── left
│ │ └── baseUserInfo.html
│ ├── main.html
│ ├── part
│ │ ├── footer.html
│ │ ├── head.html
│ │ ├── header.html
│ │ ├── page.html
│ │ └── search-info.html
│ ├── right
│ │ ├── announcement.html
│ │ ├── aphorism.html
│ │ ├── books.html
│ │ ├── onlineTool.html
│ │ ├── tagCloud.html
│ │ └── typeList.html
│ ├── tag.html
│ ├── tagSummary.html
│ ├── type.html
│ └── typeSummary.html
│ ├── error
│ └── 404.html
│ └── login.html
├── mi-common
├── README.md
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── mi
│ │ ├── MiCommonApplication.java
│ │ ├── MybatisPlusGenerator.java
│ │ └── common
│ │ ├── annotation
│ │ ├── Dev.java
│ │ └── Pro.java
│ │ ├── constant
│ │ └── SystemPath.java
│ │ ├── dictionary
│ │ └── Dictionary.java
│ │ ├── excle
│ │ ├── Constant.java
│ │ ├── ExcelUtil.java
│ │ └── Parameter.java
│ │ ├── model
│ │ ├── BaseModel.java
│ │ ├── BaseResult.java
│ │ └── ReturnCode.java
│ │ └── util
│ │ ├── AESUtil.java
│ │ ├── FileUtil.java
│ │ ├── IDUntil.java
│ │ └── StaticContantUtil.java
│ └── resources
│ ├── application.yml
│ └── templates
│ ├── controller.java.vm
│ ├── entity.java.vm
│ ├── mapper.java.vm
│ ├── mapper.xml.vm
│ ├── service.java.vm
│ └── serviceImpl.java.vm
├── mi-config
├── README.md
├── mi-cloud-config-client
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── mi
│ │ │ ├── MiCloudConfigClientApplication.java
│ │ │ └── TestController.java
│ │ └── resources
│ │ └── bootstrap.properties
├── mi-cloud-config-repo
│ ├── billing-dev.properties
│ ├── cloud_config_client-dev.yml
│ ├── prod.yml
│ └── test.yml
├── mi-cloud-config-server
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── mi
│ │ │ └── MiCloudConfigServerApplication.java
│ │ └── resources
│ │ └── application.yml
└── pom.xml
├── mi-monitor
├── README.md
├── mi-spring-boot-admin
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── mi
│ │ │ ├── MiSpringBootAdminApplication.java
│ │ │ └── common
│ │ │ └── WebSecurityConfig.java
│ │ └── resources
│ │ ├── application-dev.yml
│ │ ├── application.yml
│ │ └── logback.xml
└── pom.xml
└── pom.xml
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.js linguist-language=java
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | logs
2 | # 项目资源
3 | /.idea/
4 | *.iml
5 |
6 | *application-pro.properties
7 | *application-pro.yml
8 |
9 | test
10 | target/
11 |
12 |
13 |
14 |
15 |
16 | # 目录结构太长隐藏
17 | # 暂时隐藏
18 | #mi-admin
19 | #mi-api
20 | #mi-app
21 | #
22 | #mi-config
23 | #
24 | #mi-blog/target/
25 | #mi-common/target/
26 |
27 |
--------------------------------------------------------------------------------
/.project-resouce/MI-PRO-O.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MIYAOW/MI-S/7fd51fb1b8cec00a90d62672f3f98f5b11ccb264/.project-resouce/MI-PRO-O.png
--------------------------------------------------------------------------------
/.project-resouce/MILOGO-120x120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MIYAOW/MI-S/7fd51fb1b8cec00a90d62672f3f98f5b11ccb264/.project-resouce/MILOGO-120x120.png
--------------------------------------------------------------------------------
/.project-resouce/README.md:
--------------------------------------------------------------------------------
1 | ## 项目资源文件
2 |
--------------------------------------------------------------------------------
/.project-resouce/thanks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MIYAOW/MI-S/7fd51fb1b8cec00a90d62672f3f98f5b11ccb264/.project-resouce/thanks.png
--------------------------------------------------------------------------------
/.project-resouce/项目效果图/SBA-v1.0.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MIYAOW/MI-S/7fd51fb1b8cec00a90d62672f3f98f5b11ccb264/.project-resouce/项目效果图/SBA-v1.0.gif
--------------------------------------------------------------------------------
/.project-resouce/项目效果图/SBA监控项目环境.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MIYAOW/MI-S/7fd51fb1b8cec00a90d62672f3f98f5b11ccb264/.project-resouce/项目效果图/SBA监控项目环境.png
--------------------------------------------------------------------------------
/.project-resouce/项目效果图/blog/background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MIYAOW/MI-S/7fd51fb1b8cec00a90d62672f3f98f5b11ccb264/.project-resouce/项目效果图/blog/background.jpg
--------------------------------------------------------------------------------
/.project-resouce/项目效果图/blog/detail.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MIYAOW/MI-S/7fd51fb1b8cec00a90d62672f3f98f5b11ccb264/.project-resouce/项目效果图/blog/detail.jpg
--------------------------------------------------------------------------------
/.project-resouce/项目效果图/blog/index.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MIYAOW/MI-S/7fd51fb1b8cec00a90d62672f3f98f5b11ccb264/.project-resouce/项目效果图/blog/index.jpg
--------------------------------------------------------------------------------
/.project-resouce/项目效果图/blog/markdown.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MIYAOW/MI-S/7fd51fb1b8cec00a90d62672f3f98f5b11ccb264/.project-resouce/项目效果图/blog/markdown.jpg
--------------------------------------------------------------------------------
/.project-resouce/项目效果图/eureka.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MIYAOW/MI-S/7fd51fb1b8cec00a90d62672f3f98f5b11ccb264/.project-resouce/项目效果图/eureka.png
--------------------------------------------------------------------------------
/.project-resouce/项目效果图/sbad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MIYAOW/MI-S/7fd51fb1b8cec00a90d62672f3f98f5b11ccb264/.project-resouce/项目效果图/sbad.png
--------------------------------------------------------------------------------
/.project-resouce/项目效果图/swagger2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MIYAOW/MI-S/7fd51fb1b8cec00a90d62672f3f98f5b11ccb264/.project-resouce/项目效果图/swagger2.gif
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 MIYAOW
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/mi-admin/README.md:
--------------------------------------------------------------------------------
1 | [](http://blog.csdn.net/fjnpysh)
2 |
3 | # MI - ADMIN 模块
4 |
5 | ## 技术要点
6 |
7 | #### **`Mi Platform Center`** MI 总平台管理中心
8 |
9 | - 数据库读写分离配置(AOP切入控制层读写)
10 | - Druid 数据监控
11 | - Mybatis 升级为 Mybatis-Plus
12 | - Reids 缓存数据库
13 |
14 |
15 | #### **`Mi Platform Center Web`** MI 总平台管理中心
16 |
17 | - Vue.js使用
18 | - 前后端分离
19 |
20 |
21 | #### **` √ Mi Spring Boot Admin `** 在Spring Boot Actuator的基础上提供简洁的可视化WEB UI,是用来管理 Spring Boot 应用程序的一个简单的界面,提供如下功能:
22 | - 引入Spring Security框架配套登入模块
23 | - 显示 name/id 和版本号
24 | - 显示在线状态
25 | - Logging日志级别管理
26 | - JMX beans管理
27 | - Threads会话和线程管理
28 | - Trace应用请求跟踪
29 | - 应用运行参数信息,如:
30 | - Java 系统属性
31 | - Java 环境变量属性
32 | - 内存信息
33 | - Spring 环境属性
34 |
35 |
36 | - 更新 `README.md` 等相关文档和示例;
37 |
38 | ## 备注
39 |
40 | 本案例只做演示作用
41 | 使用阿里云等服务器就已经就内置有监控系统了。没必要浪费系统资源。而且也有系统预警等多重服务
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", { "modules": false }],
4 | "stage-2"
5 | ],
6 | "plugins": ["transform-runtime"],
7 | "comments": false,
8 | "env": {
9 | "test": {
10 | "presets": ["env", "stage-2"],
11 | "plugins": [ "istanbul" ]
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | dist/
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | // to edit target browsers: use "browserlist" field in package.json
6 | "autoprefixer": {}
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/README.md:
--------------------------------------------------------------------------------
1 | # mi-platform-center-web
2 |
3 | > A Vue.js project
4 |
5 | ## Build Setup
6 |
7 | ``` bash
8 | # install dependencies
9 | npm install
10 |
11 | # serve with hot reload at localhost:8080
12 | npm run dev
13 |
14 | # build for production with minification
15 | npm run build
16 |
17 | # build for production and view the bundle analyzer report
18 | npm run build --report
19 | ```
20 |
21 | For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
22 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/build/build.js:
--------------------------------------------------------------------------------
1 | require('./check-versions')()
2 |
3 | process.env.NODE_ENV = 'production'
4 |
5 | var ora = require('ora')
6 | var rm = require('rimraf')
7 | var path = require('path')
8 | var chalk = require('chalk')
9 | var webpack = require('webpack')
10 | var config = require('../config')
11 | var webpackConfig = require('./webpack.prod.conf')
12 |
13 | var spinner = ora('building for production...')
14 | spinner.start()
15 |
16 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
17 | if (err) throw err
18 | webpack(webpackConfig, function (err, stats) {
19 | spinner.stop()
20 | if (err) throw err
21 | process.stdout.write(stats.toString({
22 | colors: true,
23 | modules: false,
24 | children: false,
25 | chunks: false,
26 | chunkModules: false
27 | }) + '\n\n')
28 |
29 | console.log(chalk.cyan(' Build complete.\n'))
30 | console.log(chalk.yellow(
31 | ' Tip: built files are meant to be served over an HTTP server.\n' +
32 | ' Opening index.html over file:// won\'t work.\n'
33 | ))
34 | })
35 | })
36 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/build/check-versions.js:
--------------------------------------------------------------------------------
1 | var chalk = require('chalk')
2 | var semver = require('semver')
3 | var packageConfig = require('../package.json')
4 | var shell = require('shelljs')
5 | function exec (cmd) {
6 | return require('child_process').execSync(cmd).toString().trim()
7 | }
8 |
9 | var versionRequirements = [
10 | {
11 | name: 'node',
12 | currentVersion: semver.clean(process.version),
13 | versionRequirement: packageConfig.engines.node
14 | },
15 | ]
16 |
17 | if (shell.which('npm')) {
18 | versionRequirements.push({
19 | name: 'npm',
20 | currentVersion: exec('npm --version'),
21 | versionRequirement: packageConfig.engines.npm
22 | })
23 | }
24 |
25 | module.exports = function () {
26 | var warnings = []
27 | for (var i = 0; i < versionRequirements.length; i++) {
28 | var mod = versionRequirements[i]
29 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
30 | warnings.push(mod.name + ': ' +
31 | chalk.red(mod.currentVersion) + ' should be ' +
32 | chalk.green(mod.versionRequirement)
33 | )
34 | }
35 | }
36 |
37 | if (warnings.length) {
38 | console.log('')
39 | console.log(chalk.yellow('To use this template, you must update following to modules:'))
40 | console.log()
41 | for (var i = 0; i < warnings.length; i++) {
42 | var warning = warnings[i]
43 | console.log(' ' + warning)
44 | }
45 | console.log()
46 | process.exit(1)
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/build/dev-client.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | require('eventsource-polyfill')
3 | var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
4 |
5 | hotClient.subscribe(function (event) {
6 | if (event.action === 'reload') {
7 | window.location.reload()
8 | }
9 | })
10 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/build/vue-loader.conf.js:
--------------------------------------------------------------------------------
1 | var utils = require('./utils')
2 | var config = require('../config')
3 | var isProduction = process.env.NODE_ENV === 'production'
4 |
5 | module.exports = {
6 | loaders: utils.cssLoaders({
7 | sourceMap: isProduction
8 | ? config.build.productionSourceMap
9 | : config.dev.cssSourceMap,
10 | extract: isProduction
11 | })
12 | }
13 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/build/webpack.base.conf.js:
--------------------------------------------------------------------------------
1 | var path = require('path')
2 | var utils = require('./utils')
3 | var config = require('../config')
4 | var vueLoaderConfig = require('./vue-loader.conf')
5 |
6 | function resolve (dir) {
7 | return path.join(__dirname, '..', dir)
8 | }
9 |
10 | module.exports = {
11 | entry: {
12 | app: './src/main.js'
13 | },
14 | output: {
15 | path: config.build.assetsRoot,
16 | filename: '[name].js',
17 | publicPath: process.env.NODE_ENV === 'production'
18 | ? config.build.assetsPublicPath
19 | : config.dev.assetsPublicPath
20 | },
21 | resolve: {
22 | extensions: ['.js', '.vue', '.json'],
23 | alias: {
24 | 'vue$': 'vue/dist/vue.esm.js',
25 | '@': resolve('src')
26 | }
27 | },
28 | module: {
29 | rules: [
30 | {
31 | test: /\.vue$/,
32 | loader: 'vue-loader',
33 | options: vueLoaderConfig
34 | },
35 | {
36 | test: /\.js$/,
37 | loader: 'babel-loader',
38 | include: [resolve('src'), resolve('test')]
39 | },
40 | {
41 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
42 | loader: 'url-loader',
43 | options: {
44 | limit: 10000,
45 | name: utils.assetsPath('img/[name].[hash:7].[ext]')
46 | }
47 | },
48 | {
49 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
50 | loader: 'url-loader',
51 | options: {
52 | limit: 10000,
53 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
54 | }
55 | }
56 | ]
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/build/webpack.dev.conf.js:
--------------------------------------------------------------------------------
1 | var utils = require('./utils')
2 | var webpack = require('webpack')
3 | var config = require('../config')
4 | var merge = require('webpack-merge')
5 | var baseWebpackConfig = require('./webpack.base.conf')
6 | var HtmlWebpackPlugin = require('html-webpack-plugin')
7 | var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
8 |
9 | // add hot-reload related code to entry chunks
10 | Object.keys(baseWebpackConfig.entry).forEach(function (name) {
11 | baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
12 | })
13 |
14 | module.exports = merge(baseWebpackConfig, {
15 | module: {
16 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })
17 | },
18 | // cheap-module-eval-source-map is faster for development
19 | devtool: '#cheap-module-eval-source-map',
20 | plugins: [
21 | new webpack.DefinePlugin({
22 | 'process.env': config.dev.env
23 | }),
24 | // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
25 | new webpack.HotModuleReplacementPlugin(),
26 | new webpack.NoEmitOnErrorsPlugin(),
27 | // https://github.com/ampedandwired/html-webpack-plugin
28 | new HtmlWebpackPlugin({
29 | filename: 'index.html',
30 | template: 'index.html',
31 | inject: true
32 | }),
33 | new FriendlyErrorsPlugin()
34 | ]
35 | })
36 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/config/dev.env.js:
--------------------------------------------------------------------------------
1 | var merge = require('webpack-merge')
2 | var prodEnv = require('./prod.env')
3 |
4 | module.exports = merge(prodEnv, {
5 | NODE_ENV: '"development"'
6 | })
7 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/config/index.js:
--------------------------------------------------------------------------------
1 | // see http://vuejs-templates.github.io/webpack for documentation.
2 | var path = require('path')
3 |
4 | module.exports = {
5 | build: {
6 | env: require('./prod.env'),
7 | index: path.resolve(__dirname, '../dist/index.html'),
8 | assetsRoot: path.resolve(__dirname, '../dist'),
9 | assetsSubDirectory: 'static',
10 | assetsPublicPath: '/',
11 | productionSourceMap: true,
12 | // Gzip off by default as many popular static hosts such as
13 | // Surge or Netlify already gzip all static assets for you.
14 | // Before setting to `true`, make sure to:
15 | // npm install --save-dev compression-webpack-plugin
16 | productionGzip: false,
17 | productionGzipExtensions: ['js', 'css'],
18 | // Run the build command with an extra argument to
19 | // View the bundle analyzer report after build finishes:
20 | // `npm run build --report`
21 | // Set to `true` or `false` to always turn it on or off
22 | bundleAnalyzerReport: process.env.npm_config_report
23 | },
24 | dev: {
25 | env: require('./dev.env'),
26 | port: 8080,
27 | autoOpenBrowser: true,
28 | assetsSubDirectory: 'static',
29 | assetsPublicPath: '/',
30 | proxyTable: {},
31 | // CSS Sourcemaps off by default because relative paths are "buggy"
32 | // with this option, according to the CSS-Loader README
33 | // (https://github.com/webpack/css-loader#sourcemaps)
34 | // In our experience, they generally work as expected,
35 | // just be aware of this issue when enabling this option.
36 | cssSourceMap: false
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/config/prod.env.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | NODE_ENV: '"production"'
3 | }
4 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | mi-platform-center-web
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |

4 |
5 |
6 |
7 |
8 |
13 |
14 |
24 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MIYAOW/MI-S/7fd51fb1b8cec00a90d62672f3f98f5b11ccb264/mi-admin/mi-platform-center-web/src/assets/logo.png
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/src/components/Hello.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{{ msg }}
4 |
Essential Links
5 |
13 |
Ecosystem
14 |
20 |
21 |
22 |
23 |
33 |
34 |
35 |
54 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/src/main.js:
--------------------------------------------------------------------------------
1 | // The Vue build version to load with the `import` command
2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3 | import Vue from 'vue'
4 | import App from './App'
5 | import router from './router'
6 |
7 | Vue.config.productionTip = false
8 |
9 | /* eslint-disable no-new */
10 | new Vue({
11 | el: '#app',
12 | router,
13 | template: '',
14 | components: { App }
15 | })
16 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/src/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Router from 'vue-router'
3 | import Hello from '@/components/Hello'
4 |
5 | Vue.use(Router)
6 |
7 | export default new Router({
8 | routes: [
9 | {
10 | path: '/',
11 | name: 'Hello',
12 | component: Hello
13 | }
14 | ]
15 | })
16 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center-web/static/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MIYAOW/MI-S/7fd51fb1b8cec00a90d62672f3f98f5b11ccb264/mi-admin/mi-platform-center-web/static/.gitkeep
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center/src/main/java/com/mi/MiPlatformCenterApplication.java:
--------------------------------------------------------------------------------
1 | package com.mi;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 | import org.springframework.boot.web.servlet.ServletComponentScan;
7 | import org.springframework.context.annotation.Configuration;
8 |
9 | @ServletComponentScan
10 | @Configuration
11 | @EnableAutoConfiguration
12 | public class MiPlatformCenterApplication {
13 |
14 | public static void main(String[] args) {
15 | SpringApplication.run(MiPlatformCenterApplication.class, args);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center/src/main/java/com/mi/SwaggerConfig.java:
--------------------------------------------------------------------------------
1 | package com.mi;
2 |
3 | import com.mi.common.swagger.BaseSwaggerConfig;
4 | import org.springframework.context.annotation.Configuration;
5 | import springfox.documentation.swagger2.annotations.EnableSwagger2;
6 |
7 | /**
8 | * 需配置Swagger API Doc 继承既可
9 | * @author yesh
10 | * (M.M)!
11 | * Created by 2017/6/29.
12 | */
13 | @Configuration
14 | @EnableSwagger2
15 | public class SwaggerConfig extends BaseSwaggerConfig {
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center/src/main/java/com/mi/config/database/DataSourceAop.java:
--------------------------------------------------------------------------------
1 | package com.mi.config.aspect.database;
2 |
3 | import lombok.extern.slf4j.Slf4j;
4 | import org.aspectj.lang.annotation.Aspect;
5 | import org.aspectj.lang.annotation.Before;
6 | import org.springframework.stereotype.Component;
7 |
8 | /**
9 | * 数据源切换AOP
10 | * @author yesh
11 | * (M.M)!
12 | * Created by 2017/6/16.
13 | */
14 | @Slf4j
15 | @Aspect
16 | @Component
17 | public class DataSourceAop {
18 |
19 | @Before("execution(* com.mi.module.*.controller..*.select*(..)) || execution(* com.mi.module.*.controller..*.find*(..)) || execution(* com.mi.module.*.controller..*.get*(..))")
20 | public void setReadDataSourceType() {
21 | DataSourceContextHolder.read();
22 | log.info("dataSource切换到:Read");
23 | }
24 |
25 | @Before("execution(* com.mi.module.*.controller..*.insert*(..)) || execution(* com.mi.module.*.controller..*.update*(..))")
26 | public void setWriteDataSourceType() {
27 | DataSourceContextHolder.write();
28 | log.info("dataSource切换到:write");
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center/src/main/java/com/mi/config/database/DataSourceContextHolder.java:
--------------------------------------------------------------------------------
1 | package com.mi.config.aspect.database;
2 |
3 | import lombok.extern.slf4j.Slf4j;
4 |
5 | /**
6 | * 本地线程全局变量(控制读写分离)
7 | * @author yesh
8 | * (M.M)!
9 | * Created by 2017/6/16.
10 | */
11 | @Slf4j
12 | public class DataSourceContextHolder {
13 |
14 | private static final ThreadLocal local = new ThreadLocal();
15 |
16 | public static ThreadLocal getLocal() {
17 | return local;
18 | }
19 |
20 | /**
21 | * Read Maybe More Database
22 | */
23 | public static void read() {
24 | local.set(DataSourceType.read.getType());
25 | }
26 |
27 | /**
28 | * Write Only One DataBase
29 | */
30 | public static void write() {
31 | local.set(DataSourceType.write.getType());
32 | }
33 |
34 | public static String getJdbcType() {
35 | return local.get();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center/src/main/java/com/mi/config/database/DataSourceTransactionManager.java:
--------------------------------------------------------------------------------
1 | package com.mi.config.aspect.database;
2 |
3 | import lombok.extern.slf4j.Slf4j;
4 | import org.springframework.context.annotation.Bean;
5 | import org.springframework.context.annotation.Configuration;
6 | import org.springframework.transaction.annotation.EnableTransactionManagement;
7 |
8 | import javax.annotation.Resource;
9 | import javax.sql.DataSource;
10 |
11 | /**
12 | * 自定义事务
13 | * @author yesh
14 | * (M.M)!
15 | * Created by 2017/6/16.
16 | */
17 | @Slf4j
18 | @Configuration
19 | @EnableTransactionManagement
20 | public class DataSourceTransactionManager {
21 | /**
22 | * 自定义事务
23 | * MyBatis自动参与到spring事务管理中,无需额外配置,只要org.mybatis.spring.SqlSessionFactoryBean引用的数据源与DataSourceTransactionManager引用的数据源一致即可,否则事务管理会不起作用。
24 | * @return
25 | */
26 | @Resource(name = "masterDataSource")
27 | private DataSource dataSource;
28 |
29 | @Bean(name = "transactionManager")
30 | public org.springframework.jdbc.datasource.DataSourceTransactionManager transactionManagers() {
31 | log.info("-------------------- Master DataSource TransactionManager init ---------------------");
32 | return new org.springframework.jdbc.datasource.DataSourceTransactionManager(dataSource);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center/src/main/java/com/mi/config/database/DataSourceType.java:
--------------------------------------------------------------------------------
1 | package com.mi.config.aspect.database;
2 | import lombok.Getter;
3 |
4 | /**
5 | * 读写分离数据枚举
6 | * @author yesh
7 | * (M.M)!
8 | * Created by 2017/6/16.
9 | */
10 | public enum DataSourceType{
11 |
12 | read("read", "从库"),
13 | write("write", "主库");
14 |
15 | @Getter
16 | private String type;
17 | @Getter
18 | private String name;
19 |
20 | DataSourceType(String type, String name) {
21 | this.type = type;
22 | this.name = name;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center/src/main/java/com/mi/config/database/MyAbstractRoutingDataSource.java:
--------------------------------------------------------------------------------
1 | package com.mi.config.aspect.database;
2 |
3 | import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
4 |
5 | import java.util.concurrent.atomic.AtomicInteger;
6 |
7 | /**
8 | * 多数据源切换
9 | * @author yesh
10 | * (M.M)!
11 | * Created by 2017/6/16.
12 | */
13 | public class MyAbstractRoutingDataSource extends AbstractRoutingDataSource {
14 |
15 | private final int dataSourceNumber;
16 |
17 | private AtomicInteger count = new AtomicInteger(0);
18 |
19 | public MyAbstractRoutingDataSource(int dataSourceNumber) {
20 | this.dataSourceNumber = dataSourceNumber;
21 | }
22 |
23 | @Override
24 | protected Object determineCurrentLookupKey() {
25 | String typeKey = DataSourceContextHolder.getJdbcType();
26 | //配置MyBatis后
27 | //determineTargetDataSource中默认跑了determineCurrentLookupKey方法
28 | //若为空设置为主库(写)
29 | if (typeKey == null){
30 | return DataSourceType.write.getType();
31 | }
32 | else if (typeKey.equals(DataSourceType.write.getType())){
33 | return DataSourceType.write.getType();
34 | }
35 |
36 | // 不为则为分库(读) 简单负载均衡
37 | int number = count.getAndAdd(1);
38 | int lookupKey = number % dataSourceNumber;
39 | return new Integer(lookupKey);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center/src/main/java/com/mi/config/druid/DruidStatFilter.java:
--------------------------------------------------------------------------------
1 | package com.mi.config.druid;
2 |
3 | import javax.servlet.annotation.WebFilter;
4 | import javax.servlet.annotation.WebInitParam;
5 |
6 | import com.alibaba.druid.support.http.WebStatFilter;
7 |
8 | /**
9 | * 数据库监控过滤器
10 | * @author yesh
11 | * (M.M)!
12 | * Created by 2017/6/16.
13 | */
14 | @WebFilter(filterName = "druidWebStatFilter", urlPatterns = "/*",
15 | initParams = {
16 | @WebInitParam(name = "exclusions", value = "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*")// 忽略资源
17 | }
18 | )
19 | public class DruidStatFilter extends WebStatFilter {
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center/src/main/java/com/mi/config/druid/DruidStatViewServlet.java:
--------------------------------------------------------------------------------
1 | package com.mi.config.druid;
2 |
3 | import javax.servlet.annotation.WebInitParam;
4 | import javax.servlet.annotation.WebServlet;
5 |
6 | import com.alibaba.druid.support.http.StatViewServlet;
7 |
8 | /**
9 | * 数据监控视图配置
10 | * @author yesh
11 | * (M.M)!
12 | * Created by 2017/6/16.
13 | */
14 | @WebServlet(urlPatterns="/druid/*",
15 |
16 | initParams={
17 | //@WebInitParam(name="allow",value="10.70.8.240,127.0.0.1"),// IP白名单(没有配置或者为空,则允许所有访问)
18 | // @WebInitParam(name="deny",value="192.168.1.73"),// IP黑名单 (存在共同时,deny优先于allow)
19 | // @WebInitParam(name="loginUsername",value="admin"),// 用户名
20 | // @WebInitParam(name="loginPassword",value="123456"),// 密码
21 | @WebInitParam(name="resetEnable",value="false")// 禁用HTML页面上的“Reset All”功能
22 | }
23 | )
24 | public class DruidStatViewServlet extends StatViewServlet{
25 |
26 | private static final long serialVersionUID = 1476501110303564392L;
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center/src/main/java/com/mi/module/common/controller/RedisController.java:
--------------------------------------------------------------------------------
1 | package com.mi.module.common.controller;
2 |
3 | import com.mi.common.annotation.Dev;
4 | import com.mi.config.redis.RedisUtil;
5 | import io.swagger.annotations.Api;
6 | import io.swagger.annotations.ApiImplicitParam;
7 | import io.swagger.annotations.ApiOperation;
8 | import org.springframework.web.bind.annotation.RequestMapping;
9 | import org.springframework.web.bind.annotation.RequestMethod;
10 | import org.springframework.web.bind.annotation.RequestParam;
11 | import org.springframework.web.bind.annotation.RestController;
12 |
13 |
14 | /**
15 | * Redis 控制器
16 | *
17 | * @author yesh
18 | * (M.M)!
19 | * Created by 2017-06-28.
20 | */
21 | @Api(description = "Redis 测试 控制器")
22 | @Dev
23 | @RestController
24 | @RequestMapping("/redis")
25 | public class RedisController {
26 |
27 |
28 | @ApiOperation(value = "接口简介",notes = "接口详细描述")
29 | @ApiImplicitParam(name = "name",required = true,paramType = "query" ,dataType = "String")
30 | @RequestMapping(value = "/test",method = RequestMethod.GET)
31 | public String test(@RequestParam(value = "name",required = false) String name) {
32 | RedisUtil.set("name:",name);
33 | return RedisUtil.get("name:").toString();
34 | }
35 |
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center/src/main/java/com/mi/module/system/mapper/MiSysLogMapper.java:
--------------------------------------------------------------------------------
1 | package com.mi.module.system.mapper;
2 |
3 | import com.mi.module.system.entity.MiSysLog;
4 | import com.baomidou.mybatisplus.mapper.BaseMapper;
5 |
6 | /**
7 | *
8 | * 操作日志; InnoDB free: 4096 kB Mapper 接口
9 | *
10 | * @author yesh
11 | * (M.M)!
12 | * Created by 2017-06-28.
13 | */
14 | public interface MiSysLogMapper extends BaseMapper {
15 |
16 | }
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center/src/main/java/com/mi/module/system/mapper/impl/MiSysLogMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center/src/main/java/com/mi/module/system/service/IMiSysLogService.java:
--------------------------------------------------------------------------------
1 | package com.mi.module.system.service;
2 |
3 | import com.mi.module.system.entity.MiSysLog;
4 | import com.baomidou.mybatisplus.service.IService;
5 |
6 | /**
7 | *
8 | * 操作日志; InnoDB free: 4096 kB 服务接口
9 | *
10 | * @author yesh
11 | * (M.M)!
12 | * Created by 2017-06-28.
13 | */
14 | public interface IMiSysLogService extends IService {
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center/src/main/java/com/mi/module/system/service/impl/MiSysLogServiceImpl.java:
--------------------------------------------------------------------------------
1 | package com.mi.module.system.service.impl;
2 |
3 | import com.mi.module.system.entity.MiSysLog;
4 | import com.mi.module.system.mapper.MiSysLogMapper;
5 | import com.mi.module.system.service.IMiSysLogService;
6 | import com.baomidou.mybatisplus.service.impl.ServiceImpl;
7 | import org.springframework.stereotype.Service;
8 |
9 | /**
10 | *
11 | * 操作日志; InnoDB free: 4096 kB 服务实现类
12 | *
13 | * @author yesh
14 | * (M.M)!
15 | * Created by 2017-06-28.
16 | */
17 | @Service
18 | public class MiSysLogServiceImpl extends ServiceImpl implements IMiSysLogService {
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/mi-admin/mi-platform-center/src/main/resources/application.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MIYAOW/MI-S/7fd51fb1b8cec00a90d62672f3f98f5b11ccb264/mi-admin/mi-platform-center/src/main/resources/application.properties
--------------------------------------------------------------------------------
/mi-admin/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | com.mi
7 | mi-admin
8 | 1.0
9 | jar
10 | mi-admin
11 | Admin Modules
12 |
13 |
14 |
--------------------------------------------------------------------------------
/mi-api/README.md:
--------------------------------------------------------------------------------
1 | [](http://blog.csdn.net/fjnpysh)
2 |
3 | # MI - API 模块
4 |
5 | ## 技术要点
6 |
7 | - **`Eureka Netflix`** 云端服务发现,一个基于REST的服务,用于定位服务,以实现云端中间层服务发现和故障转移
8 |
9 | - **`Hystrix Netflix`** 熔断器,容错管理工具,通过熔断机制控制服务和第三方库的节点,从而对延迟和故障提供更强大的容错能力
10 |
11 | ### V1.0 releases
12 |
13 | - 摘录要点
14 |
15 | - `完成服务注册中心可集群配置化、高可用性`
16 |
17 | - `完成消费者双模式消费` `(常用:Ribbon模式)`
18 |
19 |
20 | - 注意事项
21 |
22 | - 若远程调用服务,可能因为hostname名称识别不了。Win系统下# Windx C:\Windows\System32\drivers\etc 设置 指定好对应的hostname即可
23 |
24 |
25 | ### 主要模块:
26 |
27 | - 注册中心的服务与发现 Eureka server;
28 |
29 | - ` √ mi-eureka-server`(注册中心一)
30 |
31 | - ` √ mi-eureka-server-bak`(注册中心二)
32 |
33 | - 服务注册与消费 Eureka Client
34 |
35 | - ` √ mi-eureka-client` (服务提供者一)
36 |
37 | - ` √ mi-eureka-client-api` (服务提供者二)
38 |
39 | - ` √ mi-eureka-consumer` (服务消费者 双模式案例 Feign Ribbon)
40 |
41 | - 更新 `README.md` 等相关文档和示例;
42 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-client-api/src/main/java/com/mi/MiEurekaClientApiApplication.java:
--------------------------------------------------------------------------------
1 | package com.mi;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
6 | import org.springframework.web.bind.annotation.RestController;
7 |
8 | @SpringBootApplication
9 | @EnableDiscoveryClient
10 | public class MiEurekaClientApiApplication {
11 |
12 | public static void main(String[] args) {
13 | SpringApplication.run(MiEurekaClientApiApplication.class, args);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-client-api/src/main/java/com/mi/controller/ApiController.java:
--------------------------------------------------------------------------------
1 | package com.mi.controller;
2 |
3 | import org.apache.log4j.Logger;
4 | import org.springframework.beans.factory.annotation.Autowired;
5 | import org.springframework.cloud.client.ServiceInstance;
6 | import org.springframework.cloud.client.discovery.DiscoveryClient;
7 | import org.springframework.web.bind.annotation.RequestMapping;
8 | import org.springframework.web.bind.annotation.RequestParam;
9 | import org.springframework.web.bind.annotation.RestController;
10 |
11 | /**
12 | * API服务提供控制器
13 | * @author yesh
14 | * (M.M)!
15 | * Created by 2017/5/2.
16 | */
17 | @RestController
18 | public class ApiController {
19 |
20 | private final Logger log = Logger.getLogger(ApiController.class);
21 |
22 | private final DiscoveryClient discoveryClient;
23 |
24 | @Autowired
25 | public ApiController(DiscoveryClient discoveryClient) {
26 | this.discoveryClient = discoveryClient;
27 | }
28 |
29 | @RequestMapping("/hi")
30 | public String hello(@RequestParam String name){
31 | System.err.println("-----------------------------");
32 | //监听指定的服务提供者
33 | ServiceInstance instance = discoveryClient.getInstances("mi-eureka-client").get(0);
34 |
35 | log.info("Method:---->"+this.getClass().getSimpleName()+"---->Hello");
36 | log.info("Url:---->"+instance.getUri());
37 | log.info("Host:---->"+instance.getHost());
38 | log.info("Port:---->"+instance.getPort());
39 |
40 | return "Hello Api "+name + " ,i here in port :" +instance.getPort();
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-client-api/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | server:
2 | port: 1002
3 | spring:
4 | application:
5 | name: mi-eureka-client
6 | eureka:
7 | client:
8 | serviceUrl:
9 | defaultZone: http://mione:1000/eureka/ #,http://mitwo:2000/eureka/
10 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-client/src/main/java/com/mi/MiEurekaClientApplication.java:
--------------------------------------------------------------------------------
1 | package com.mi;
2 |
3 | import com.didispace.swagger.EnableSwagger2Doc;
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
7 |
8 |
9 | @SpringBootApplication
10 | @EnableDiscoveryClient
11 | @EnableSwagger2Doc //启动配置 DD 自制Swagger2
12 | public class MiEurekaClientApplication {
13 |
14 | public static void main(String[] args) {
15 | SpringApplication.run(MiEurekaClientApplication.class, args);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-client/src/main/java/com/mi/common/CORSConfiguration.java:
--------------------------------------------------------------------------------
1 | //package com.mi.common;
2 | //
3 | //import org.springframework.context.annotation.Bean;
4 | //import org.springframework.context.annotation.Configuration;
5 | //import org.springframework.stereotype.Component;
6 | //import org.springframework.web.cors.CorsConfiguration;
7 | //import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
8 | //import org.springframework.web.filter.CorsFilter;
9 | //
10 | ///**
11 | // * 跨域过滤器
12 | // * @author yesh
13 | // * (M.M)!
14 | // * Created by 2017/9/14.
15 | // */
16 | //@Configuration
17 | //@Component
18 | //public class CORSConfiguration{
19 | //
20 | // private CorsConfiguration buildConfig() {
21 | // CorsConfiguration corsConfiguration = new CorsConfiguration();
22 | // corsConfiguration.addAllowedOrigin("*"); // 1
23 | // corsConfiguration.addAllowedHeader("*"); // 2
24 | // corsConfiguration.addAllowedMethod("*"); // 3
25 | // return corsConfiguration;
26 | // }
27 | // @Bean
28 | // public CorsFilter corsFilter() {
29 | // UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
30 | // source.registerCorsConfiguration("/**", buildConfig()); // 4
31 | // return new CorsFilter(source);
32 | // }
33 | //
34 | //}
35 | //
36 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-client/src/main/java/com/mi/common/CorsFilter.java:
--------------------------------------------------------------------------------
1 | //package com.mi.common;
2 | //
3 | //import org.springframework.stereotype.Component;
4 | //
5 | //import javax.servlet.*;
6 | //import javax.servlet.http.HttpServletRequest;
7 | //import javax.servlet.http.HttpServletResponse;
8 | //import java.io.IOException;
9 | //
10 | ///**
11 | // * 跨域过滤器
12 | // * @author yesh
13 | // * (M.M)!
14 | // * Created by 2017/9/14.
15 | // */
16 | //@Component
17 | //public class CorsFilter implements Filter {
18 | // @Override
19 | // public void init(FilterConfig filterConfig) throws ServletException {
20 | //
21 | // }
22 | //
23 | // @Override
24 | // public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
25 | // HttpServletResponse response = (HttpServletResponse) res;
26 | // HttpServletRequest reqs = (HttpServletRequest) req;
27 | // response.setHeader("Access-Control-Allow-Origin","*");
28 | // response.setHeader("Access-Control-Allow-Credentials", "true");
29 | // response.setHeader("Access-Control-Allow-Methods", "*");
30 | // response.setHeader("Access-Control-Max-Age", "3600");
31 | // response.setHeader("Access-Control-Allow-Headers", "*");
32 | // chain.doFilter(req, res);
33 | // }
34 | //
35 | // @Override
36 | // public void destroy() {
37 | //
38 | // }
39 | //}
40 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-client/src/main/java/com/mi/common/ServiceMoitor.java:
--------------------------------------------------------------------------------
1 | //package com.mi.common;
2 | //
3 | //import org.aspectj.lang.annotation.Aspect;
4 | //
5 | //import org.springframework.stereotype.Component;
6 | //
7 | ///**
8 | // * gague和counter的定制 监控
9 | // * @author yesh
10 | // * (M.M)!
11 | // * Created by 2017/5/10.
12 | // */
13 | //@Aspect
14 | //@Component
15 | //public class ServiceMoitor {
16 | //
17 | //// @Autowired
18 | //// private GaugeService gaugeService;
19 | ////
20 | //// @Autowired
21 | //// private CounterService counterService;
22 | //
23 | //// @Before(value = "execution(* com.mi.controller.*.*(..))")
24 | //// public void countServiceInvoke(JoinPoint joinPoint) {
25 | ////// counterService.increment(joinPoint.getSignature().toString());
26 | ////// System.err.println("监控咯"+joinPoint.getSignature());
27 | //// }
28 | ////
29 | //// @Around(value = "execution(* com.mi.controller.*.*(..))")
30 | //// public void latencyService(ProceedingJoinPoint pjp) throws Throwable {
31 | ////// long start = System.currentTimeMillis();
32 | //////// pjp.proceed();
33 | //////// Thread.sleep(2000);
34 | ////// long end = System.currentTimeMillis();
35 | ////// System.err.println("延迟多久:"+(end-start));
36 | ////// gaugeService.submit(pjp.getSignature().toString(), end - start);
37 | //// }
38 | //
39 | //}
40 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-client/src/main/java/com/mi/controller/ClientController.java:
--------------------------------------------------------------------------------
1 | package com.mi.controller;
2 |
3 | import org.apache.log4j.Logger;
4 | import org.springframework.beans.factory.annotation.Autowired;
5 | import org.springframework.cloud.client.ServiceInstance;
6 | import org.springframework.cloud.client.discovery.DiscoveryClient;
7 | import org.springframework.stereotype.Controller;
8 | import org.springframework.web.bind.annotation.*;
9 |
10 | /**
11 | * 服务提供控制器
12 | * @author yesh
13 | * (M.M)!
14 | * Created by 2017/5/2.
15 | */
16 | @Controller
17 | public class ClientController {
18 |
19 | private final Logger log = Logger.getLogger(ClientController.class);
20 |
21 | private final DiscoveryClient discoveryClient;
22 |
23 | @Autowired
24 | public ClientController(DiscoveryClient discoveryClient) {
25 | this.discoveryClient = discoveryClient;
26 | }
27 |
28 | @ResponseBody
29 | @RequestMapping(value = "/hi", method = RequestMethod.GET)
30 | public String hello1(@RequestParam String name){
31 | System.err.println("-----------------------------");
32 | ServiceInstance instance = discoveryClient.getInstances("mi-eureka-client").get(0);
33 |
34 | log.info("Method:---->"+this.getClass().getSimpleName()+"---->Hello");
35 | log.info("Url:---->"+instance.getUri());
36 | log.info("Host:---->"+instance.getHost());
37 | log.info("Port:---->"+instance.getPort());
38 |
39 | return "Hello !! "+name + " ,I here in port "+instance.getPort();
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-client/src/main/java/com/mi/controller/SwaggerController.java:
--------------------------------------------------------------------------------
1 | package com.mi.controller;
2 |
3 | import io.swagger.annotations.*;
4 | import org.apache.log4j.Logger;
5 | import org.springframework.web.bind.annotation.*;
6 |
7 | /**
8 | * Swagger 控制器案例模版
9 | * @author yesh
10 | * (M.M)!
11 | * Created by 2017/5/7.
12 | */
13 | @Api(description = "Swagger模版控制器")
14 | @RestController
15 | @RequestMapping("/swagger")
16 | public class SwaggerController {
17 | private static final Logger log = Logger.getLogger(SwaggerController.class);
18 |
19 | @ApiOperation(value = "Swagger2案例接口(Get)", notes = "接口案例详细描述")
20 | @ApiImplicitParam(name = "name",required = true,paramType = "query" ,dataType = "String")
21 | @RequestMapping(value = "hello" ,method = RequestMethod.GET)
22 | public String hello(@RequestParam(value = "name",required = false) String name){
23 | log.info("Hello Swagger : my name is" + name);
24 | return "Hello Swagger : my name is "+ name;
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-client/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | spring:
2 | profiles:
3 | active: dev
4 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-client/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-consumer/src/main/java/com/mi/MiEurekaConsumerApplication.java:
--------------------------------------------------------------------------------
1 | package com.mi;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
6 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
7 | import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
8 | import org.springframework.cloud.netflix.feign.EnableFeignClients;
9 | import org.springframework.context.annotation.ComponentScan;
10 |
11 |
12 | @SpringBootApplication
13 | @ComponentScan
14 | @EnableDiscoveryClient
15 | @EnableFeignClients
16 | @EnableEurekaClient
17 | @EnableCircuitBreaker //路由注解开启
18 | public class MiEurekaConsumerApplication {
19 |
20 | public static void main(String[] args) {
21 | SpringApplication.run(MiEurekaConsumerApplication.class, args);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-consumer/src/main/java/com/mi/feign/FeignController.java:
--------------------------------------------------------------------------------
1 | package com.mi.feign;
2 |
3 | import com.mi.service.FeignService;
4 | import org.springframework.beans.factory.annotation.Autowired;
5 | import org.springframework.beans.factory.annotation.Qualifier;
6 | import org.springframework.web.bind.annotation.RequestMapping;
7 | import org.springframework.web.bind.annotation.RequestMethod;
8 | import org.springframework.web.bind.annotation.RequestParam;
9 | import org.springframework.web.bind.annotation.RestController;
10 |
11 | /**
12 | * Feign消费模式
13 | * @author yesh
14 | * (M.M)!
15 | * Created by 2017/5/2.
16 | */
17 | @RestController
18 | public class FeignController {
19 |
20 |
21 | @Autowired
22 | private FeignService feignService;
23 |
24 | @RequestMapping(value = "/hi", method = RequestMethod.GET)
25 | public String hello(@RequestParam String name){
26 | return feignService.Hello(name);
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-consumer/src/main/java/com/mi/ribbon/RibbonController.java:
--------------------------------------------------------------------------------
1 | package com.mi.ribbon;
2 |
3 | import com.mi.service.impl.RibbonServiceImpl;
4 | import org.springframework.beans.factory.annotation.Autowired;
5 | import org.springframework.web.bind.annotation.RequestMapping;
6 | import org.springframework.web.bind.annotation.RequestMethod;
7 | import org.springframework.web.bind.annotation.RestController;
8 | import org.springframework.web.client.RestTemplate;
9 |
10 | /**
11 | * Ribbon消费模式
12 | * @author yesh
13 | * (M.M)!
14 | * Created by 2017/5/2.
15 | */
16 | @RestController
17 | public class RibbonController {
18 |
19 | @Autowired
20 | private RestTemplate restTemplate;
21 |
22 | @Autowired
23 | private RibbonServiceImpl ribbonServiceImpl;
24 |
25 | @RequestMapping(value = "/helloR",method = RequestMethod.GET)
26 | public String hello(){
27 | return restTemplate.getForEntity("http://MI-EUREKA-CLIENT/hi?name=Ribbon", String.class).getBody();
28 | }
29 |
30 | @RequestMapping(value = "/helloH",method = RequestMethod.GET)
31 | public String helloHi(){
32 | return ribbonServiceImpl.helloToYou();
33 | }
34 |
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-consumer/src/main/java/com/mi/service/FeignService.java:
--------------------------------------------------------------------------------
1 | package com.mi.service;
2 |
3 | import org.springframework.cloud.netflix.feign.FeignClient;
4 | import org.springframework.web.bind.annotation.RequestMapping;
5 | import org.springframework.web.bind.annotation.RequestMethod;
6 | import org.springframework.web.bind.annotation.RequestParam;
7 |
8 | /**
9 | * Feign调用接口
10 | * @author yesh
11 | * (M.M)!
12 | * Created by 2017/5/2.
13 | */
14 | @FeignClient(name = "mi-eureka-client" , fallback = HystrixClientFallback.class)
15 | public interface FeignService {
16 |
17 | @RequestMapping(value = "/hi", method = RequestMethod.GET)
18 | String Hello(@RequestParam(value = "name") String name);
19 |
20 | }
21 |
22 | class HystrixClientFallback implements FeignService {
23 | @Override
24 | public String Hello(String name) {
25 | return "error";
26 | }
27 | }
28 |
29 |
30 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-consumer/src/main/java/com/mi/service/impl/RibbonServiceImpl.java:
--------------------------------------------------------------------------------
1 | package com.mi.service.impl;
2 |
3 | import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
4 | import org.springframework.beans.factory.annotation.Autowired;
5 | import org.springframework.stereotype.Service;
6 | import org.springframework.web.client.RestTemplate;
7 |
8 | /**
9 | * Ribbon接口实现类
10 | * @author yesh
11 | * (M.M)!
12 | * Created by 2017/5/3.
13 | */
14 | @Service
15 | public class RibbonServiceImpl {
16 |
17 | @Autowired
18 | RestTemplate restTemplate;
19 |
20 | @HystrixCommand(fallbackMethod = "helloError")
21 | public String helloToYou(){
22 | return restTemplate.getForEntity("http://MI-EUREKA-CLIENT/hi?name=RibbonHystrix",String .class).getBody();
23 | }
24 |
25 | public String helloError(){
26 | return "I am not here Ribbon --> Error";
27 | }
28 |
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-consumer/src/main/resources/application-dev.yml:
--------------------------------------------------------------------------------
1 | server:
2 | port: 2002
3 | ip: 127.0.0.1
4 | spring:
5 | application:
6 | name: MI-EUREKA-CONSUMER
7 | boot:
8 | admin:
9 | url: http://${server.ip}:1000 # 应用服务监控
10 |
11 | eureka:
12 | client:
13 | serviceUrl:
14 | defaultZone: http://${server.ip}:2000/eureka/ #,http://mitwo:2000/eureka/
15 |
16 | # 消费者中心 Map
17 | info:
18 | artifact : mi-eureka-consumer
19 | name: ${spring.application.name}
20 | description: 消费服务中心
21 | version : V1.0
22 |
23 |
24 | # 注意事项:若远程调用服务,可能因为hostname名称识别不了。Win系统下# Windx C:\Windows\System32\drivers\etc 设置 指定好对应的hostname即可
--------------------------------------------------------------------------------
/mi-api/mi-eureka-consumer/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | spring:
2 | profiles:
3 | active: dev
--------------------------------------------------------------------------------
/mi-api/mi-eureka-consumer/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-server-bak/src/main/java/com/mi/MiEurekaServerBakApplication.java:
--------------------------------------------------------------------------------
1 | package com.mi;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.boot.builder.SpringApplicationBuilder;
6 | import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
7 |
8 | @EnableEurekaServer
9 | @SpringBootApplication
10 | public class MiEurekaServerBakApplication {
11 |
12 | public static void main(String[] args) {
13 | new SpringApplicationBuilder(MiEurekaServerBakApplication.class).web(true).run();
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-server-bak/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | server:
2 | port: 2000
3 | spring:
4 | application:
5 | name: mi-eureka-server
6 |
7 | eureka:
8 | instance:
9 | hostname: mitwo # Windx C:\Windows\System32\drivers\etc 设置
10 | client:
11 | #若取消集群注册中心配置 registerWithEureka fetchRegistry defaultZone 值修改
12 | registerWithEureka: true
13 | fetchRegistry: true
14 | serviceUrl:
15 | defaultZone: http://mione:1000
16 | server:
17 | enable-self-preservation: true
18 | renewalPercentThreshold: 0 #设置更新率阈值
19 | eviction-interval-timer-in-ms: 20000 #毫秒 有关注册服务调用
20 |
21 |
22 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-server/src/main/java/com/mi/MiEurekaServerApplication.java:
--------------------------------------------------------------------------------
1 | package com.mi;
2 |
3 | //import org.springframework.boot.SpringApplication;
4 | //import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
5 | //import org.springframework.boot.autoconfigure.SpringBootApplication;
6 | //import org.springframework.boot.builder.SpringApplicationBuilder;
7 | //import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
8 | //import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
9 | //import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
10 | //import org.springframework.context.annotation.Configuration;
11 |
12 | import org.springframework.boot.SpringApplication;
13 | import org.springframework.boot.autoconfigure.SpringBootApplication;
14 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
15 | import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
16 | import org.springframework.context.annotation.Configuration;
17 |
18 | @Configuration
19 | @EnableEurekaServer
20 | @SpringBootApplication
21 | public class MiEurekaServerApplication {
22 |
23 | public static void main(String[] args) {
24 | SpringApplication.run(MiEurekaServerApplication.class, args);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-server/src/main/resources/application-dev.yml:
--------------------------------------------------------------------------------
1 | server:
2 | port: 2000
3 | ip: 127.0.0.1
4 | spring:
5 | application:
6 | name: MI-EUREKA-SERVER
7 | boot:
8 | admin:
9 | url: http://${server.ip}:1000 #应用服务监控
10 | eureka:
11 | instance:
12 | hostname: ${server.ip} # Windx C:\Windows\System32\drivers\etc 设置
13 |
14 | #若取消集群注册中心配置 registerWithEureka fetchRegistry defaultZone 值修改 true
15 | client:
16 | register-with-eureka: false
17 | fetch-registry: false
18 | serviceUrl:
19 | defaultZone: http://${server.ip}:2000/eureka/
20 |
21 | server:
22 | enable-self-preservation: true
23 | renewalPercentThreshold: 0.7 #设置更新率阈值
24 | eviction-interval-timer-in-ms: 20000 #毫秒 有关注册服务调用
25 |
26 | #开启shutdown的安全验证
27 | endpoints:
28 | health:
29 | sensitive: true
30 | shutdown:
31 | enabled: true #启用shutdown
32 | sensitive: false #禁用密码验证
33 | path: /stop/sc_eureka #最好不要暴露出去
34 |
35 |
36 | # 注册服务中心显式内容Map
37 | info:
38 | artifact : mi-eureka-server
39 | name: ${spring.application.name}
40 | description: 注册服务中心
41 | version : V1.0
42 |
43 |
--------------------------------------------------------------------------------
/mi-api/mi-eureka-server/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | spring:
2 | profiles:
3 | active: dev
--------------------------------------------------------------------------------
/mi-api/mi-eureka-server/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/mi-api/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | com.mi
7 | mi-api
8 | 1.0
9 | pom
10 |
11 | mi-api
12 | About Api
13 |
14 |
15 |
--------------------------------------------------------------------------------
/mi-blog/README.md:
--------------------------------------------------------------------------------
1 |
2 | # MI - BLOG 模块
3 |
4 | [](http://blog.csdn.net/fjnpysh)
5 |
6 |
7 | ## MI-博客模块
8 |
9 |
10 |
11 | ## 运行环境
12 | - JDK 1.8
13 | - Maven
14 | - MySQL 5.0↑
15 |
16 | ## 技术掌握
17 |
18 | - Spring
19 | - Spring Security
20 | - Spring Boot
21 | - Mybatis-plus
22 | - Bootstrap
23 | - Thymeleaf
24 | - Editor.md
25 | - jqPaginator
26 |
27 | ### V1.0 releases
28 |
29 | 发布 V1.0 测试版。
30 |
31 | ## License
32 |
33 | The mi-blog is released under version 2.0 of the [Apache License](http://www.apache.org/licenses/LICENSE-2.0).
34 |
35 |
36 | - 基础版本(因为开源的博客系统太多,可选择性部署。也可以自己编写)
37 |
38 | - 更新 `README.md` 等相关文档和示例;
39 |
--------------------------------------------------------------------------------
/mi-blog/src/main/java/com/mi/MiBlogApplication.java:
--------------------------------------------------------------------------------
1 | package com.mi;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration;
6 | import org.springframework.boot.context.properties.EnableConfigurationProperties;
7 | import org.springframework.transaction.annotation.EnableTransactionManagement;
8 |
9 |
10 | @SpringBootApplication
11 | @EnableConfigurationProperties
12 | public class MiBlogApplication {
13 |
14 | public static void main(String[] args) {
15 | SpringApplication.run(MiBlogApplication.class, args);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/mi-blog/src/main/java/com/mi/config/database/DataSourceAop.java:
--------------------------------------------------------------------------------
1 | //package com.mi.config.database;
2 | //
3 | //import lombok.extern.slf4j.Slf4j;
4 | //import org.aspectj.lang.annotation.Aspect;
5 | //import org.aspectj.lang.annotation.Before;
6 | //import org.springframework.stereotype.Component;
7 | //
8 | ///**
9 | // * 数据源切换AOP
10 | // * @author yesh
11 | // * (M.M)!
12 | // * Created by 2017/6/16.
13 | // */
14 | //@Slf4j
15 | //@Aspect
16 | //@Component
17 | //public class DataSourceAop {
18 | //
19 | // @Before("execution(* com.mi.module.*.mapper..*.load*(..)) || execution(* com.mi.module.*.mapper..*.select*(..)) || execution(* com.mi.module.*.mapper..*.find*(..)) || execution(* com.mi.module.*.mapper..*.get*(..))")
20 | // public void setReadDataSourceType() {
21 | // DataSourceContextHolder.read();
22 | // log.info("dataSource切换到:Read");
23 | // }
24 | //
25 | // @Before("execution(* com.mi.module.*.mapper..*.insert*(..)) || execution(* com.mi.module.*.mapper..*.update*(..)) || execution(* com.mi.module.*.mapper..*.save*(..)) ")
26 | // public void setWriteDataSourceType() {
27 | // DataSourceContextHolder.write();
28 | // log.info("dataSource切换到:write");
29 | // }
30 | //}
31 |
--------------------------------------------------------------------------------
/mi-blog/src/main/java/com/mi/config/database/DataSourceContextHolder.java:
--------------------------------------------------------------------------------
1 | //package com.mi.config.database;
2 | //
3 | //import lombok.extern.slf4j.Slf4j;
4 | //
5 | ///**
6 | // * 本地线程全局变量(控制读写分离)
7 | // * @author yesh
8 | // * (M.M)!
9 | // * Created by 2017/6/16.
10 | // */
11 | //@Slf4j
12 | //public class DataSourceContextHolder {
13 | //
14 | // private static final ThreadLocal local = new ThreadLocal();
15 | //
16 | // public static ThreadLocal getLocal() {
17 | // return local;
18 | // }
19 | //
20 | // /**
21 | // * Read Maybe More Database
22 | // */
23 | // public static void read() {
24 | // local.set(DataSourceType.read.getType());
25 | // }
26 | //
27 | // /**
28 | // * Write Only One DataBase
29 | // */
30 | // public static void write() {
31 | // local.set(DataSourceType.write.getType());
32 | // }
33 | //
34 | // public static String getJdbcType() {
35 | // return local.get();
36 | // }
37 | //}
38 |
--------------------------------------------------------------------------------
/mi-blog/src/main/java/com/mi/config/database/DataSourceType.java:
--------------------------------------------------------------------------------
1 | //package com.mi.config.database;
2 | //import lombok.Getter;
3 | //
4 | ///**
5 | // * 读写分离数据枚举
6 | // * @author yesh
7 | // * (M.M)!
8 | // * Created by 2017/6/16.
9 | // */
10 | //public enum DataSourceType{
11 | //
12 | // read("read", "从库"),
13 | // write("write", "主库");
14 | //
15 | // @Getter
16 | // private String type;
17 | // @Getter
18 | // private String name;
19 | //
20 | // DataSourceType(String type, String name) {
21 | // this.type = type;
22 | // this.name = name;
23 | // }
24 | //}
25 |
--------------------------------------------------------------------------------
/mi-blog/src/main/java/com/mi/config/database/MyAbstractRoutingDataSource.java:
--------------------------------------------------------------------------------
1 | //package com.mi.config.database;
2 | //
3 | //import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
4 | //
5 | //import java.util.concurrent.atomic.AtomicInteger;
6 | //
7 | ///**
8 | // * 多数据源切换
9 | // * @author yesh
10 | // * (M.M)!
11 | // * Created by 2017/6/16.
12 | // */
13 | //public class MyAbstractRoutingDataSource extends AbstractRoutingDataSource {
14 | //
15 | // private final int dataSourceNumber;
16 | //
17 | // private AtomicInteger count = new AtomicInteger(0);
18 | //
19 | // public MyAbstractRoutingDataSource(int dataSourceNumber) {
20 | // this.dataSourceNumber = dataSourceNumber;
21 | // }
22 | //
23 | // @Override
24 | // protected Object determineCurrentLookupKey() {
25 | // String typeKey = DataSourceContextHolder.getJdbcType();
26 | // //配置MyBatis后
27 | // //determineTargetDataSource中默认跑了determineCurrentLookupKey方法
28 | // //若为空设置为主库(写)
29 | // if (typeKey == null){
30 | // return DataSourceType.write.getType();
31 | // }
32 | // else if (typeKey.equals(DataSourceType.write.getType())){
33 | // return DataSourceType.write.getType();
34 | // }
35 | //
36 | // // 不为则为分库(读) 简单负载均衡
37 | // int number = count.getAndAdd(1);
38 | // int lookupKey = number % dataSourceNumber;
39 | // return new Integer(lookupKey);
40 | // }
41 | //}
42 |
--------------------------------------------------------------------------------
/mi-blog/src/main/java/com/mi/config/druid/DruidStatFilter.java:
--------------------------------------------------------------------------------
1 | package com.mi.config.druid;
2 |
3 | import javax.servlet.annotation.WebFilter;
4 | import javax.servlet.annotation.WebInitParam;
5 |
6 | import com.alibaba.druid.support.http.WebStatFilter;
7 |
8 | /**
9 | * 数据库监控过滤器
10 | * @author yesh
11 | * (M.M)!
12 | * Created by 2017/6/16.
13 | */
14 | @WebFilter(filterName = "druidWebStatFilter", urlPatterns = "/*",
15 | initParams = {
16 | @WebInitParam(name = "exclusions", value = "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*")// 忽略资源
17 | }
18 | )
19 | public class DruidStatFilter extends WebStatFilter {
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/mi-blog/src/main/java/com/mi/config/druid/DruidStatViewServlet.java:
--------------------------------------------------------------------------------
1 | package com.mi.config.druid;
2 |
3 | import javax.servlet.annotation.WebInitParam;
4 | import javax.servlet.annotation.WebServlet;
5 |
6 | import com.alibaba.druid.support.http.StatViewServlet;
7 |
8 | /**
9 | * 数据监控视图配置
10 | * @author yesh
11 | * (M.M)!
12 | * Created by 2017/6/16.
13 | */
14 | @WebServlet(urlPatterns="/druid/*",
15 |
16 | initParams={
17 | //@WebInitParam(name="allow",value="10.70.8.240,127.0.0.1"),// IP白名单(没有配置或者为空,则允许所有访问)
18 | // @WebInitParam(name="deny",value="192.168.1.73"),// IP黑名单 (存在共同时,deny优先于allow)
19 | // @WebInitParam(name="loginUsername",value="admin"),// 用户名
20 | // @WebInitParam(name="loginPassword",value="123456"),// 密码
21 | @WebInitParam(name="resetEnable",value="false")// 禁用HTML页面上的“Reset All”功能
22 | }
23 | )
24 | public class DruidStatViewServlet extends StatViewServlet{
25 |
26 | private static final long serialVersionUID = 1476501110303564392L;
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/mi-blog/src/main/java/com/mi/data/dto/readme.txt:
--------------------------------------------------------------------------------
1 | 用于处理业务传输实体
--------------------------------------------------------------------------------
/mi-blog/src/main/java/com/mi/data/vo/ArticleVo.java:
--------------------------------------------------------------------------------
1 | package com.mi.data.vo;
2 |
3 |
4 | import com.baomidou.mybatisplus.annotations.TableId;
5 | import com.mi.module.blog.entity.Tag;
6 | import com.mi.module.blog.entity.Type;
7 | import lombok.Data;
8 |
9 | import java.io.Serializable;
10 | import java.util.Date;
11 | import java.util.List;
12 |
13 | /**
14 | * 自定义文章类
15 | * @author yesh
16 | * (M.M)!
17 | * Created by 2017/7/9.
18 | */
19 | @Data
20 | public class ArticleVo implements Serializable {
21 |
22 | /**
23 | * 主键
24 | */
25 | private String articleId;
26 | /**
27 | * 标题
28 | */
29 | private String title;
30 | /**
31 | * 内容
32 | */
33 | private String content;
34 | /**
35 | * 简介
36 | */
37 | private String description;
38 | /**
39 | * 状态 0:正常 1:不可用
40 | */
41 | private Integer status;
42 | /**
43 | * 状态 0:原创 1:装载
44 | */
45 | private Integer classType;
46 | /**
47 | * 作者
48 | */
49 | private String author;
50 | /**
51 | * 创建时间
52 | */
53 | private Date createTime;
54 | /**
55 | * 修改时间
56 | */
57 | private Date updateTime;
58 | /**
59 | * 访问量
60 | */
61 | private Integer lookCount;
62 |
63 | private List typeList; //文章类别
64 | private List tagList; //标签列表
65 |
66 |
67 | }
68 |
--------------------------------------------------------------------------------
/mi-blog/src/main/java/com/mi/data/vo/TagCloudVo.java:
--------------------------------------------------------------------------------
1 | package com.mi.data.vo;
2 |
3 | /**
4 | * 标签云定位
5 | *
6 | * @author yesh
7 | * (M.M)!
8 | * Created by 2017/9/6.
9 | */
10 | public class TagCloudVo {
11 |
12 | private String tagId;
13 | private String tagName; // 表情名称
14 | private String position;//坐标
15 |
16 | public String getTagId() {
17 | return tagId;
18 | }
19 |
20 | public void setTagId(String tagId) {
21 | this.tagId = tagId;
22 | }
23 |
24 | public String getTagName() {
25 | return tagName;
26 | }
27 |
28 | public void setTagName(String tagName) {
29 | this.tagName = tagName;
30 | }
31 |
32 | public String getPosition() {
33 | return position;
34 | }
35 |
36 | public void setPosition(String position) {
37 | this.position = position;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/mi-blog/src/main/java/com/mi/data/vo/TypeVo.java:
--------------------------------------------------------------------------------
1 | package com.mi.data.vo;
2 |
3 | import lombok.Data;
4 |
5 | import java.io.Serializable;
6 |
7 | /**
8 | * 类别视图
9 | * @author yesh
10 | * (M.M)!
11 | * Created by 2017/8/16.
12 | */
13 | @Data
14 | public class TypeVo implements Serializable {
15 | private String typeId;
16 | private String typeName; //分类名
17 | private String aliasName;//分类别名
18 | private Integer articleCount;//此分类下文章的数量
19 | }
20 |
--------------------------------------------------------------------------------
/mi-blog/src/main/java/com/mi/data/vo/readme.txt:
--------------------------------------------------------------------------------
1 | 视图传输实体
--------------------------------------------------------------------------------
/mi-blog/src/main/java/com/mi/module/blog/entity/ArticleTag.java:
--------------------------------------------------------------------------------
1 | package com.mi.module.blog.entity;
2 |
3 | import com.baomidou.mybatisplus.annotations.TableId;
4 | import com.baomidou.mybatisplus.annotations.TableField;
5 | import com.baomidou.mybatisplus.activerecord.Model;
6 | import com.baomidou.mybatisplus.annotations.TableName;
7 | import lombok.Data;
8 |
9 | import java.io.Serializable;
10 |
11 | /**
12 | *
13 | * 文章标签关联; InnoDB free: 11264 kB 实体
14 | *
15 | * @author yesh
16 | * (M.M)!
17 | * Created by 2017-07-09.
18 | */
19 | @TableName("blog_article_tag")
20 | @Data
21 | public class ArticleTag extends Model {
22 |
23 | private static final long serialVersionUID = 1L;
24 |
25 | /**
26 | * 文章主键
27 | */
28 | @TableId("article_id")
29 | private String articleId;
30 | /**
31 | * 标签主键
32 | */
33 | @TableField("tag_id")
34 | private String tagId;
35 |
36 |
37 |
38 | @Override
39 | protected Serializable pkVal() {
40 | return this.articleId;
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/mi-blog/src/main/java/com/mi/module/blog/entity/ArticleType.java:
--------------------------------------------------------------------------------
1 | package com.mi.module.blog.entity;
2 |
3 | import com.baomidou.mybatisplus.annotations.TableId;
4 | import com.baomidou.mybatisplus.annotations.TableField;
5 | import com.baomidou.mybatisplus.activerecord.Model;
6 | import com.baomidou.mybatisplus.annotations.TableName;
7 | import lombok.Data;
8 |
9 | import java.io.Serializable;
10 |
11 | /**
12 | *
13 | * 文章分类关联; InnoDB free: 11264 kB 实体
14 | *
15 | * @author yesh
16 | * (M.M)!
17 | * Created by 2017-07-09.
18 | */
19 | @TableName("blog_article_type")
20 | @Data
21 | public class ArticleType extends Model {
22 |
23 | private static final long serialVersionUID = 1L;
24 |
25 | /**
26 | * 文章主键
27 | */
28 | @TableId("article_id")
29 | private String articleId;
30 | /**
31 | * 标签主键
32 | */
33 | @TableField("type_id")
34 | private String typeId;
35 |
36 | @Override
37 | protected Serializable pkVal() {
38 | return this.articleId;
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/mi-blog/src/main/java/com/mi/module/blog/entity/Friendlink.java:
--------------------------------------------------------------------------------
1 | package com.mi.module.blog.entity;
2 |
3 | import java.util.Date;
4 | import com.baomidou.mybatisplus.annotations.TableId;
5 | import com.baomidou.mybatisplus.annotations.TableField;
6 | import com.baomidou.mybatisplus.activerecord.Model;
7 | import com.baomidou.mybatisplus.annotations.TableName;
8 | import lombok.Data;
9 |
10 | import java.io.Serializable;
11 |
12 | /**
13 | * 友情链接; InnoDB free: 11264 kB 实体
14 | * @author yesh
15 | * (M.M)!
16 | * Created by 2017-07-09.
17 | */
18 | @TableName("blog_friendlink")
19 | @Data
20 | public class Friendlink extends Model {
21 |
22 | private static final long serialVersionUID = 1L;
23 |
24 | /**
25 | * 主键
26 | */
27 | @TableId("flink_id")
28 | private String flinkId;
29 | /**
30 | * 站点名称
31 | */
32 | @TableField("site_name")
33 | private String siteName;
34 | /**
35 | * 站点地址
36 | */
37 | @TableField("site_url")
38 | private String siteUrl;
39 | /**
40 | * 站点作者
41 | */
42 | @TableField("site_author")
43 | private String siteAuthor;
44 | /**
45 | * 站点描述
46 | */
47 | @TableField("site_desc")
48 | private String siteDesc;
49 | /**
50 | * 排序
51 | */
52 | private Integer sort;
53 | /**
54 | * 创建时间
55 | */
56 | @TableField("create_time")
57 | private Date createTime;
58 |
59 | /**
60 | * 修改时间
61 | */
62 | @TableField("update_time")
63 | private Date updateTime;
64 |
65 |
66 | @Override
67 | protected Serializable pkVal() {
68 | return null;
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/mi-blog/src/main/java/com/mi/module/blog/mapper/ArticleMapper.java:
--------------------------------------------------------------------------------
1 | package com.mi.module.blog.mapper;
2 |
3 | import com.baomidou.mybatisplus.plugins.Page;
4 | import com.mi.data.vo.ArticleVo;
5 | import com.mi.data.vo.Pager;
6 | import com.mi.module.blog.entity.Article;
7 | import com.baomidou.mybatisplus.mapper.BaseMapper;
8 | import org.apache.ibatis.annotations.Param;
9 |
10 | import java.util.List;
11 | import java.util.Map;
12 |
13 | /**
14 | *
15 | * 文章; InnoDB free: 11264 kB Mapper 接口
16 | *
17 | * @author yesh
18 | * (M.M)!
19 | * Created by 2017-07-09.
20 | */
21 | public interface ArticleMapper extends BaseMapper {
22 |
23 | List