├── .gitignore ├── LICENSE ├── README.md ├── api-client-codegen ├── README.md ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── feiyangedu │ │ │ └── springcloud │ │ │ └── codegen │ │ │ ├── ApiClientCodegen.java │ │ │ ├── TemplateBuilder.java │ │ │ ├── TypeMapping.java │ │ │ └── Util.java │ └── resources │ │ ├── bean.txt │ │ ├── client.txt │ │ └── pom.txt │ └── test │ └── java │ └── com │ └── feiyangedu │ └── springcloud │ └── codegen │ └── TypeMappingTest.java ├── api-swagger ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── itranswarp │ │ └── springcloud │ │ └── api │ │ ├── RestApplication.java │ │ ├── bean │ │ └── UserReq.java │ │ ├── domain │ │ └── User.java │ │ └── rest │ │ └── UserController.java │ └── resources │ └── application.yml ├── cache-redis ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── itranswarp │ │ └── springcloud │ │ └── cache │ │ └── RedisCacheApplication.java │ └── resources │ └── application.yml ├── cache ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── itranswarp │ │ └── springcloud │ │ └── cache │ │ └── CacheApplication.java │ └── resources │ └── application.yml ├── config-bean ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── itranswarp │ │ └── springcloud │ │ └── configbean │ │ ├── ConfigBeanApplication.java │ │ ├── UrlFetcher.java │ │ └── config │ │ ├── ProxyConfig.java │ │ └── ProxyConfigs.java │ └── resources │ └── application.yml ├── data-es ├── .gitignore ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── feiyangedu │ │ └── springcloud │ │ └── es │ │ ├── DataESApplication.java │ │ ├── domain │ │ └── News.java │ │ ├── repository │ │ └── NewsRepository.java │ │ └── util │ │ ├── Phrase.java │ │ ├── Span.java │ │ ├── SplitUtil.java │ │ └── Word.java │ └── resources │ └── application.yml ├── data-jdbc ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── itranswarp │ │ └── springcloud │ │ └── data │ │ ├── DataJdbcApplication.java │ │ ├── domain │ │ └── User.java │ │ └── request │ │ └── UserReq.java │ └── resources │ └── application.yml ├── data-jpa ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── feiyangedu │ │ └── springcloud │ │ └── data │ │ ├── DataJpaApplication.java │ │ ├── domain │ │ └── User.java │ │ ├── repository │ │ └── UserRepository.java │ │ └── request │ │ └── UserReq.java │ └── resources │ └── application.yml ├── data-multidatasource ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── itranswarp │ │ └── springcloud │ │ └── data │ │ ├── DataMultiDataSourceApplication.java │ │ ├── domain │ │ ├── Book.java │ │ └── User.java │ │ ├── request │ │ ├── BookReq.java │ │ └── UserReq.java │ │ └── service │ │ ├── BookService.java │ │ └── UserService.java │ └── resources │ └── application.yml ├── data-routingdatasource ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── itranswarp │ │ └── springcloud │ │ └── data │ │ ├── DataRoutingDataSourceApplication.java │ │ ├── context │ │ ├── RoutingAspect.java │ │ ├── RoutingDataSource.java │ │ ├── RoutingDataSourceContext.java │ │ └── RoutingWith.java │ │ ├── domain │ │ └── User.java │ │ ├── request │ │ └── UserReq.java │ │ └── service │ │ ├── UserController.java │ │ └── UserService.java │ └── resources │ └── application.yml ├── hello ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── itranswarp │ │ └── springcloud │ │ └── hello │ │ ├── HelloApplication.java │ │ └── HelloController.java │ └── resources │ └── application.yml ├── mail ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── feiyangedu │ │ └── springcloud │ │ └── mail │ │ ├── MailApplication.java │ │ └── web │ │ ├── Mail.java │ │ └── MailController.java │ └── resources │ ├── application.yml │ ├── static │ ├── css │ │ ├── components │ │ │ ├── accordion.css │ │ │ ├── autocomplete.css │ │ │ ├── datepicker.css │ │ │ ├── dotnav.css │ │ │ ├── form-advanced.css │ │ │ ├── form-file.css │ │ │ ├── form-password.css │ │ │ ├── form-select.css │ │ │ ├── htmleditor.css │ │ │ ├── nestable.css │ │ │ ├── notify.css │ │ │ ├── placeholder.css │ │ │ ├── progress.css │ │ │ ├── search.css │ │ │ ├── slidenav.css │ │ │ ├── slider.css │ │ │ ├── slideshow.css │ │ │ ├── sortable.css │ │ │ ├── sticky.css │ │ │ ├── tooltip.css │ │ │ └── upload.css │ │ └── uikit.css │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ └── js │ │ ├── components │ │ ├── accordion.js │ │ ├── autocomplete.js │ │ ├── datepicker.js │ │ ├── form-password.js │ │ ├── form-select.js │ │ ├── grid-parallax.js │ │ ├── grid.js │ │ ├── htmleditor.js │ │ ├── lightbox.js │ │ ├── nestable.js │ │ ├── notify.js │ │ ├── pagination.js │ │ ├── parallax.js │ │ ├── search.js │ │ ├── slider.js │ │ ├── slideset.js │ │ ├── slideshow-fx.js │ │ ├── slideshow.js │ │ ├── sortable.js │ │ ├── sticky.js │ │ ├── timepicker.js │ │ ├── tooltip.js │ │ └── upload.js │ │ ├── jquery.js │ │ └── uikit.js │ └── templates │ └── index.html ├── messaging-amqp ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── feiyangedu │ │ └── springcloud │ │ └── messaging │ │ └── MessagingApplication.java │ └── resources │ └── application.yml ├── messaging-jms ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── feiyangedu │ │ └── springcloud │ │ └── messaging │ │ ├── MessagingApplication.java │ │ └── Notify.java │ └── resources │ └── application.yml ├── messaging-stream ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── feiyangedu │ │ └── springcloud │ │ └── messaging │ │ ├── StreamApplication.java │ │ ├── Vote.java │ │ ├── VoteController.java │ │ ├── VoteHolder.java │ │ ├── VoteListener.java │ │ ├── VoteLogListener.java │ │ ├── VoteSink.java │ │ └── VoteSource.java │ └── resources │ └── application.yml ├── parent └── pom.xml ├── petstore ├── petstore-account │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── feiyangedu │ │ │ └── springcloud │ │ │ └── petstore │ │ │ └── account │ │ │ ├── AccountApplication.java │ │ │ ├── bean │ │ │ └── UserBean.java │ │ │ ├── domain │ │ │ ├── User.java │ │ │ └── UserPasswdAuth.java │ │ │ ├── repository │ │ │ └── UserRepository.java │ │ │ └── service │ │ │ └── AccountService.java │ │ └── resources │ │ └── bootstrap.yml ├── petstore-batch │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── feiyangedu │ │ │ └── springcloud │ │ │ └── petstore │ │ │ └── search │ │ │ └── BatchApplication.java │ │ └── resources │ │ └── bootstrap.yml ├── petstore-build │ ├── .env │ ├── README.txt │ ├── build.sh │ ├── docker-compose.yml │ ├── openvpn-client-conf │ │ └── localvpn.ovpn │ ├── openvpn-data │ │ ├── down.sh │ │ ├── openvpn.conf │ │ ├── ovpn_env.sh │ │ ├── pki │ │ │ ├── .rnd │ │ │ ├── ca.crt │ │ │ ├── certs_by_serial │ │ │ │ ├── 01.pem │ │ │ │ └── 02.pem │ │ │ ├── dh.pem │ │ │ ├── index.txt │ │ │ ├── index.txt.attr │ │ │ ├── index.txt.attr.old │ │ │ ├── index.txt.old │ │ │ ├── issued │ │ │ │ ├── local.transwarp.xyz.crt │ │ │ │ └── localvpn.crt │ │ │ ├── private │ │ │ │ ├── ca.key │ │ │ │ ├── local.transwarp.xyz.key │ │ │ │ └── localvpn.key │ │ │ ├── reqs │ │ │ │ ├── local.transwarp.xyz.req │ │ │ │ └── localvpn.req │ │ │ ├── serial │ │ │ ├── serial.old │ │ │ └── ta.key │ │ └── up.sh │ └── pom.xml ├── petstore-clients │ ├── account-client │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── io │ │ │ └── swagger │ │ │ └── api │ │ │ └── client │ │ │ └── account │ │ │ ├── AccountClient.java │ │ │ └── model │ │ │ ├── Page.java │ │ │ ├── Sort.java │ │ │ ├── User.java │ │ │ └── UserBean.java │ └── gen-account-client.sh ├── petstore-common │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── feiyangedu │ │ │ └── springcloud │ │ │ └── petstore │ │ │ └── common │ │ │ ├── config │ │ │ └── CustomWebConfiguration.java │ │ │ ├── constant │ │ │ ├── Gender.java │ │ │ └── Role.java │ │ │ ├── context │ │ │ ├── NoUserContextException.java │ │ │ ├── UserContext.java │ │ │ └── UserInfo.java │ │ │ ├── domain │ │ │ ├── AbstractEntity.java │ │ │ └── StringIdGenerator.java │ │ │ ├── exception │ │ │ ├── APIEntityNotFoundException.java │ │ │ └── APIException.java │ │ │ ├── filter │ │ │ └── UserContextFilter.java │ │ │ ├── rest │ │ │ ├── APIErrorResponse.java │ │ │ ├── RestErrorDecoder.java │ │ │ ├── RestExceptionHandler.java │ │ │ └── RestFeignClientConfiguration.java │ │ │ ├── service │ │ │ └── AbstractService.java │ │ │ └── util │ │ │ ├── BeanUtil.java │ │ │ ├── CookieUtil.java │ │ │ ├── IdUtil.java │ │ │ ├── IpUtil.java │ │ │ └── JsonUtil.java │ │ └── test │ │ └── java │ │ └── com │ │ └── feiyangedu │ │ └── springcloud │ │ └── petstore │ │ └── common │ │ └── context │ │ └── UserContextTest.java ├── petstore-config-files │ ├── account.yml │ ├── application-native.yml │ ├── application.yml │ ├── gateway.yml │ ├── web-native.yml │ ├── web-production.yml │ ├── web.yml │ └── zipkin.yml ├── petstore-config │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── feiyangedu │ │ │ └── springcloud │ │ │ └── petstore │ │ │ └── config │ │ │ └── ConfigServerApplication.java │ │ └── resources │ │ └── bootstrap.yml ├── petstore-eureka │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── feiyangedu │ │ │ └── springcloud │ │ │ └── petstore │ │ │ └── eureka │ │ │ └── EurekaServerApplication.java │ │ └── resources │ │ └── bootstrap.yml ├── petstore-gateway │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── feiyangedu │ │ │ └── springcloud │ │ │ └── petstore │ │ │ └── gateway │ │ │ ├── GatewayApplication.java │ │ │ └── filter │ │ │ ├── IpFilter.java │ │ │ └── UserFilter.java │ │ └── resources │ │ └── bootstrap.yml ├── petstore-parent │ ├── Dockerfile │ └── pom.xml ├── petstore-product │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── feiyangedu │ │ │ └── springcloud │ │ │ └── petstore │ │ │ └── user │ │ │ └── ProductApplication.java │ │ └── resources │ │ └── bootstrap.yml ├── petstore-search │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── feiyangedu │ │ │ └── springcloud │ │ │ └── petstore │ │ │ └── search │ │ │ └── SearchApplication.java │ │ └── resources │ │ └── bootstrap.yml ├── petstore-support │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── feiyangedu │ │ │ └── springcloud │ │ │ └── petstore │ │ │ └── support │ │ │ └── SupportApplication.java │ │ └── resources │ │ └── bootstrap.yml ├── petstore-web │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── feiyangedu │ │ │ └── springcloud │ │ │ └── petstore │ │ │ └── web │ │ │ ├── WebApplication.java │ │ │ ├── client │ │ │ └── AccountFeignClient.java │ │ │ └── mvc │ │ │ ├── UIController.java │ │ │ └── UserController.java │ │ └── resources │ │ ├── bootstrap.yml │ │ ├── static │ │ ├── css │ │ │ └── .gitignore │ │ ├── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ │ ├── js │ │ │ ├── components │ │ │ │ ├── accordion.js │ │ │ │ ├── autocomplete.js │ │ │ │ ├── datepicker.js │ │ │ │ ├── form-password.js │ │ │ │ ├── form-select.js │ │ │ │ ├── grid-parallax.js │ │ │ │ ├── grid.js │ │ │ │ ├── htmleditor.js │ │ │ │ ├── lightbox.js │ │ │ │ ├── nestable.js │ │ │ │ ├── notify.js │ │ │ │ ├── pagination.js │ │ │ │ ├── parallax.js │ │ │ │ ├── search.js │ │ │ │ ├── slider.js │ │ │ │ ├── slideset.js │ │ │ │ ├── slideshow-fx.js │ │ │ │ ├── slideshow.js │ │ │ │ ├── sortable.js │ │ │ │ ├── sticky.js │ │ │ │ ├── timepicker.js │ │ │ │ ├── tooltip.js │ │ │ │ └── upload.js │ │ │ ├── core │ │ │ │ ├── alert.js │ │ │ │ ├── button.js │ │ │ │ ├── core.js │ │ │ │ ├── cover.js │ │ │ │ ├── dropdown.js │ │ │ │ ├── grid.js │ │ │ │ ├── modal.js │ │ │ │ ├── nav.js │ │ │ │ ├── offcanvas.js │ │ │ │ ├── scrollspy.js │ │ │ │ ├── smooth-scroll.js │ │ │ │ ├── switcher.js │ │ │ │ ├── tab.js │ │ │ │ ├── toggle.js │ │ │ │ ├── touch.js │ │ │ │ └── utility.js │ │ │ ├── jquery.js │ │ │ ├── uikit.js │ │ │ └── uikit.min.js │ │ └── less │ │ │ ├── main.less │ │ │ └── uikit │ │ │ ├── src │ │ │ └── less │ │ │ │ ├── components │ │ │ │ ├── accordion.less │ │ │ │ ├── autocomplete.less │ │ │ │ ├── datepicker.less │ │ │ │ ├── dotnav.less │ │ │ │ ├── form-advanced.less │ │ │ │ ├── form-file.less │ │ │ │ ├── form-password.less │ │ │ │ ├── form-select.less │ │ │ │ ├── htmleditor.less │ │ │ │ ├── nestable.less │ │ │ │ ├── notify.less │ │ │ │ ├── placeholder.less │ │ │ │ ├── progress.less │ │ │ │ ├── search.less │ │ │ │ ├── slidenav.less │ │ │ │ ├── slider.less │ │ │ │ ├── slideshow.less │ │ │ │ ├── sortable.less │ │ │ │ ├── sticky.less │ │ │ │ ├── tooltip.less │ │ │ │ └── upload.less │ │ │ │ ├── core │ │ │ │ ├── alert.less │ │ │ │ ├── animation.less │ │ │ │ ├── article.less │ │ │ │ ├── badge.less │ │ │ │ ├── base.less │ │ │ │ ├── block.less │ │ │ │ ├── breadcrumb.less │ │ │ │ ├── button.less │ │ │ │ ├── close.less │ │ │ │ ├── column.less │ │ │ │ ├── comment.less │ │ │ │ ├── contrast.less │ │ │ │ ├── cover.less │ │ │ │ ├── description-list.less │ │ │ │ ├── dropdown.less │ │ │ │ ├── flex.less │ │ │ │ ├── form.less │ │ │ │ ├── grid.less │ │ │ │ ├── icon.less │ │ │ │ ├── list.less │ │ │ │ ├── modal.less │ │ │ │ ├── nav.less │ │ │ │ ├── navbar.less │ │ │ │ ├── offcanvas.less │ │ │ │ ├── overlay.less │ │ │ │ ├── pagination.less │ │ │ │ ├── panel.less │ │ │ │ ├── print.less │ │ │ │ ├── subnav.less │ │ │ │ ├── switcher.less │ │ │ │ ├── tab.less │ │ │ │ ├── table.less │ │ │ │ ├── text.less │ │ │ │ ├── thumbnail.less │ │ │ │ ├── thumbnav.less │ │ │ │ ├── utility.less │ │ │ │ └── variables.less │ │ │ │ └── uikit.less │ │ │ └── themes │ │ │ ├── almost-flat │ │ │ ├── accordion.less │ │ │ ├── alert.less │ │ │ ├── article.less │ │ │ ├── autocomplete.less │ │ │ ├── badge.less │ │ │ ├── base.less │ │ │ ├── block.less │ │ │ ├── breadcrumb.less │ │ │ ├── button.less │ │ │ ├── close.less │ │ │ ├── column.less │ │ │ ├── comment.less │ │ │ ├── contrast.less │ │ │ ├── customizer.json │ │ │ ├── datepicker.less │ │ │ ├── description-list.less │ │ │ ├── dotnav.less │ │ │ ├── dropdown.less │ │ │ ├── form-advanced.less │ │ │ ├── form-password.less │ │ │ ├── form.less │ │ │ ├── grid.less │ │ │ ├── htmleditor.less │ │ │ ├── icon.less │ │ │ ├── list.less │ │ │ ├── modal.less │ │ │ ├── nav.less │ │ │ ├── navbar.less │ │ │ ├── nestable.less │ │ │ ├── notify.less │ │ │ ├── offcanvas.less │ │ │ ├── overlay.less │ │ │ ├── pagination.less │ │ │ ├── panel.less │ │ │ ├── placeholder.less │ │ │ ├── progress.less │ │ │ ├── search.less │ │ │ ├── slidenav.less │ │ │ ├── sortable.less │ │ │ ├── sticky.less │ │ │ ├── subnav.less │ │ │ ├── tab.less │ │ │ ├── table.less │ │ │ ├── text.less │ │ │ ├── thumbnail.less │ │ │ ├── thumbnav.less │ │ │ ├── tooltip.less │ │ │ ├── uikit-customizer.less │ │ │ ├── uikit.less │ │ │ ├── utility.less │ │ │ └── variables.less │ │ │ ├── default │ │ │ ├── accordion.less │ │ │ ├── alert.less │ │ │ ├── article.less │ │ │ ├── autocomplete.less │ │ │ ├── badge.less │ │ │ ├── base.less │ │ │ ├── block.less │ │ │ ├── breadcrumb.less │ │ │ ├── button.less │ │ │ ├── close.less │ │ │ ├── column.less │ │ │ ├── comment.less │ │ │ ├── contrast.less │ │ │ ├── customizer.json │ │ │ ├── datepicker.less │ │ │ ├── description-list.less │ │ │ ├── dotnav.less │ │ │ ├── dropdown.less │ │ │ ├── form-advanced.less │ │ │ ├── form-password.less │ │ │ ├── form.less │ │ │ ├── grid.less │ │ │ ├── htmleditor.less │ │ │ ├── icon.less │ │ │ ├── list.less │ │ │ ├── modal.less │ │ │ ├── nav.less │ │ │ ├── navbar.less │ │ │ ├── nestable.less │ │ │ ├── notify.less │ │ │ ├── offcanvas.less │ │ │ ├── overlay.less │ │ │ ├── pagination.less │ │ │ ├── panel.less │ │ │ ├── placeholder.less │ │ │ ├── progress.less │ │ │ ├── search.less │ │ │ ├── slidenav.less │ │ │ ├── sortable.less │ │ │ ├── sticky.less │ │ │ ├── subnav.less │ │ │ ├── tab.less │ │ │ ├── table.less │ │ │ ├── text.less │ │ │ ├── thumbnail.less │ │ │ ├── thumbnav.less │ │ │ ├── tooltip.less │ │ │ ├── uikit-customizer.less │ │ │ ├── uikit.less │ │ │ ├── utility.less │ │ │ └── variables.less │ │ │ └── gradient │ │ │ ├── accordion.less │ │ │ ├── alert.less │ │ │ ├── article.less │ │ │ ├── autocomplete.less │ │ │ ├── badge.less │ │ │ ├── base.less │ │ │ ├── block.less │ │ │ ├── breadcrumb.less │ │ │ ├── button.less │ │ │ ├── close.less │ │ │ ├── column.less │ │ │ ├── comment.less │ │ │ ├── contrast.less │ │ │ ├── customizer.json │ │ │ ├── datepicker.less │ │ │ ├── description-list.less │ │ │ ├── dotnav.less │ │ │ ├── dropdown.less │ │ │ ├── form-advanced.less │ │ │ ├── form-password.less │ │ │ ├── form.less │ │ │ ├── grid.less │ │ │ ├── htmleditor.less │ │ │ ├── icon.less │ │ │ ├── list.less │ │ │ ├── modal.less │ │ │ ├── nav.less │ │ │ ├── navbar.less │ │ │ ├── nestable.less │ │ │ ├── notify.less │ │ │ ├── offcanvas.less │ │ │ ├── overlay.less │ │ │ ├── pagination.less │ │ │ ├── panel.less │ │ │ ├── placeholder.less │ │ │ ├── progress.less │ │ │ ├── search.less │ │ │ ├── slidenav.less │ │ │ ├── sortable.less │ │ │ ├── sticky.less │ │ │ ├── subnav.less │ │ │ ├── tab.less │ │ │ ├── table.less │ │ │ ├── text.less │ │ │ ├── thumbnail.less │ │ │ ├── thumbnav.less │ │ │ ├── tooltip.less │ │ │ ├── uikit-customizer.less │ │ │ ├── uikit.less │ │ │ ├── utility.less │ │ │ └── variables.less │ │ └── templates │ │ ├── _base.html │ │ ├── hello.html │ │ └── index.html └── petstore-zipkin │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── com │ │ └── feiyangedu │ │ └── springcloud │ │ └── petstore │ │ └── zipkin │ │ └── ZipkinServerApplication.java │ └── resources │ └── bootstrap.yml ├── scheduler ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── feiyangedu │ │ └── springcloud │ │ └── schedule │ │ └── SchedulerApplication.java │ └── resources │ └── application.yml ├── security ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── itranswarp │ │ └── springcloud │ │ └── security │ │ └── SecureApplication.java │ └── resources │ └── application.yml ├── sso-server ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── feiyangedu │ │ └── springcloud │ │ └── sso │ │ ├── SSOServerApplication.java │ │ └── domain │ │ ├── User.java │ │ └── UserController.java │ └── resources │ ├── application.yml │ ├── static │ ├── css │ │ ├── components │ │ │ ├── accordion.css │ │ │ ├── autocomplete.css │ │ │ ├── datepicker.css │ │ │ ├── dotnav.css │ │ │ ├── form-advanced.css │ │ │ ├── form-file.css │ │ │ ├── form-password.css │ │ │ ├── form-select.css │ │ │ ├── htmleditor.css │ │ │ ├── nestable.css │ │ │ ├── notify.css │ │ │ ├── placeholder.css │ │ │ ├── progress.css │ │ │ ├── search.css │ │ │ ├── slidenav.css │ │ │ ├── slider.css │ │ │ ├── slideshow.css │ │ │ ├── sortable.css │ │ │ ├── sticky.css │ │ │ ├── tooltip.css │ │ │ └── upload.css │ │ └── uikit.css │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ └── js │ │ ├── components │ │ ├── accordion.js │ │ ├── autocomplete.js │ │ ├── datepicker.js │ │ ├── form-password.js │ │ ├── form-select.js │ │ ├── grid-parallax.js │ │ ├── grid.js │ │ ├── htmleditor.js │ │ ├── lightbox.js │ │ ├── nestable.js │ │ ├── notify.js │ │ ├── pagination.js │ │ ├── parallax.js │ │ ├── search.js │ │ ├── slider.js │ │ ├── slideset.js │ │ ├── slideshow-fx.js │ │ ├── slideshow.js │ │ ├── sortable.js │ │ ├── sticky.js │ │ ├── timepicker.js │ │ ├── tooltip.js │ │ └── upload.js │ │ ├── jquery.js │ │ └── uikit.js │ └── templates │ ├── hello.html │ └── index.html ├── view-freemarker ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── itranswarp │ │ └── springcloud │ │ └── freemarker │ │ ├── FreemarkerApplication.java │ │ └── mvc │ │ ├── User.java │ │ └── UserController.java │ └── resources │ ├── application.yml │ ├── static │ ├── css │ │ ├── components │ │ │ ├── accordion.css │ │ │ ├── autocomplete.css │ │ │ ├── datepicker.css │ │ │ ├── dotnav.css │ │ │ ├── form-advanced.css │ │ │ ├── form-file.css │ │ │ ├── form-password.css │ │ │ ├── form-select.css │ │ │ ├── htmleditor.css │ │ │ ├── nestable.css │ │ │ ├── notify.css │ │ │ ├── placeholder.css │ │ │ ├── progress.css │ │ │ ├── search.css │ │ │ ├── slidenav.css │ │ │ ├── slider.css │ │ │ ├── slideshow.css │ │ │ ├── sortable.css │ │ │ ├── sticky.css │ │ │ ├── tooltip.css │ │ │ └── upload.css │ │ └── uikit.css │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ └── js │ │ ├── components │ │ ├── accordion.js │ │ ├── autocomplete.js │ │ ├── datepicker.js │ │ ├── form-password.js │ │ ├── form-select.js │ │ ├── grid-parallax.js │ │ ├── grid.js │ │ ├── htmleditor.js │ │ ├── lightbox.js │ │ ├── nestable.js │ │ ├── notify.js │ │ ├── pagination.js │ │ ├── parallax.js │ │ ├── search.js │ │ ├── slider.js │ │ ├── slideset.js │ │ ├── slideshow-fx.js │ │ ├── slideshow.js │ │ ├── sortable.js │ │ ├── sticky.js │ │ ├── timepicker.js │ │ ├── tooltip.js │ │ └── upload.js │ │ ├── jquery.js │ │ └── uikit.js │ └── templates │ ├── hello.html │ └── index.html └── view-pebble ├── pom.xml └── src └── main ├── java └── com │ └── itranswarp │ └── springcloud │ └── pebble │ ├── PebbleApplication.java │ └── mvc │ ├── User.java │ └── UserController.java └── resources ├── application.yml ├── static ├── css │ ├── components │ │ ├── accordion.css │ │ ├── autocomplete.css │ │ ├── datepicker.css │ │ ├── dotnav.css │ │ ├── form-advanced.css │ │ ├── form-file.css │ │ ├── form-password.css │ │ ├── form-select.css │ │ ├── htmleditor.css │ │ ├── nestable.css │ │ ├── notify.css │ │ ├── placeholder.css │ │ ├── progress.css │ │ ├── search.css │ │ ├── slidenav.css │ │ ├── slider.css │ │ ├── slideshow.css │ │ ├── sortable.css │ │ ├── sticky.css │ │ ├── tooltip.css │ │ └── upload.css │ └── uikit.css ├── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ └── fontawesome-webfont.woff2 └── js │ ├── components │ ├── accordion.js │ ├── autocomplete.js │ ├── datepicker.js │ ├── form-password.js │ ├── form-select.js │ ├── grid-parallax.js │ ├── grid.js │ ├── htmleditor.js │ ├── lightbox.js │ ├── nestable.js │ ├── notify.js │ ├── pagination.js │ ├── parallax.js │ ├── search.js │ ├── slider.js │ ├── slideset.js │ ├── slideshow-fx.js │ ├── slideshow.js │ ├── sortable.js │ ├── sticky.js │ ├── timepicker.js │ ├── tooltip.js │ └── upload.js │ ├── jquery.js │ └── uikit.js └── templates ├── _base.html ├── hello.html └── index.html /README.md: -------------------------------------------------------------------------------- 1 | # springcloud -------------------------------------------------------------------------------- /api-client-codegen/README.md: -------------------------------------------------------------------------------- 1 | # api client codegen 2 | 3 | A simple feign client codegen tool based on swagger schema. 4 | 5 | Build jar: 6 | 7 | ``` 8 | mvn clean package 9 | ``` 10 | 11 | Usage: 12 | 13 | ``` 14 | java -jar ./target/api-client-codegen-0.0.1-SNAPSHOT.jar --name= --url= --output= 15 | ``` 16 | 17 | For example, name: account, url: http://localhost:9002/v2/api-docs 18 | 19 | ``` 20 | java -jar ./target/api-client-codegen-0.0.1-SNAPSHOT.jar --name=account --url=http://localhost:9002/v2/api-docs --output=../petstore-clients 21 | ``` 22 | 23 | will generate client 'account' as Maven project at './account-client'. 24 | -------------------------------------------------------------------------------- /api-client-codegen/src/main/java/com/feiyangedu/springcloud/codegen/Util.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.codegen; 2 | 3 | import java.util.Map; 4 | 5 | public class Util { 6 | 7 | public String getJavaType(Map input) { 8 | return TypeMapping.getMapping(input); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /api-client-codegen/src/main/resources/bean.txt: -------------------------------------------------------------------------------- 1 | package {{ config.basePackage }}.model; 2 | 3 | /** 4 | * {{ swagger.info.description }} 5 | * 6 | * Auto-generated by api-client-codegen. 7 | */ 8 | {% set model = swagger.definitions[name] %} 9 | public class {{ name|firstUpper }} { 10 | 11 | {% for prop in model.properties %} 12 | {%- set name = prop.key %} 13 | {%- set type = util.getJavaType(prop.value) %} 14 | {%- if config.publicField %} 15 | public {{ type }} {{ prop.key }}; 16 | {%- else %} 17 | 18 | private {{ type }} {{ prop.key }}; 19 | 20 | public {{ type }} {{ prop.key | getter(type) }}() { 21 | return this.{{ prop.key }}; 22 | } 23 | 24 | public void {{ prop.key | setter }}({{ type }} {{ prop.key }}) { 25 | this.{{ prop.key }} = {{ prop.key }}; 26 | } 27 | 28 | {%- endif %} 29 | {% endfor %} 30 | 31 | } 32 | -------------------------------------------------------------------------------- /api-client-codegen/src/main/resources/pom.txt: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | {{ config.groupId }} 5 | {{ config.name }}-client 6 | {{ config.version }} 7 | jar 8 | {{ config.name }}-client 9 | 10 | 11 | UTF-8 12 | 1.8 13 | 1.8 14 | 1.8 15 | 16 | 17 | 18 | 19 | org.springframework 20 | spring-webmvc 21 | {{ config.springVersion }} 22 | 23 | 24 | junit 25 | junit 26 | 4.12 27 | test 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /api-swagger/src/main/java/com/itranswarp/springcloud/api/RestApplication.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.api; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | import springfox.documentation.builders.PathSelectors; 9 | import springfox.documentation.spi.DocumentationType; 10 | import springfox.documentation.spring.web.plugins.Docket; 11 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 12 | 13 | /** 14 | * Spring Boot Application with Swagger support. 15 | * 16 | * @author Michael Liao 17 | */ 18 | @SpringBootApplication 19 | @EnableSwagger2 20 | @RestController 21 | public class RestApplication { 22 | 23 | public static void main(String[] args) throws Exception { 24 | SpringApplication.run(RestApplication.class, args); 25 | } 26 | 27 | @Bean 28 | public Docket userApi() { 29 | return new Docket(DocumentationType.SWAGGER_2).select().paths(PathSelectors.regex("^/api/.*$")).build(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /api-swagger/src/main/java/com/itranswarp/springcloud/api/bean/UserReq.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.api.bean; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | 5 | public class UserReq { 6 | 7 | private String email; 8 | 9 | private String name; 10 | 11 | private boolean gender; 12 | 13 | @ApiModelProperty(value = "the email address", required = true, example = "me@example.com") 14 | public String getEmail() { 15 | return email; 16 | } 17 | 18 | public void setEmail(String email) { 19 | this.email = email; 20 | } 21 | 22 | @ApiModelProperty(value = "the name of the user", required = true, example = "Walter White") 23 | public String getName() { 24 | return name; 25 | } 26 | 27 | public void setName(String name) { 28 | this.name = name; 29 | } 30 | 31 | @ApiModelProperty(value = "the gender of the user, false=male, true=female", required = true) 32 | public boolean isGender() { 33 | return gender; 34 | } 35 | 36 | public void setGender(boolean gender) { 37 | this.gender = gender; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /api-swagger/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: api-swagger 4 | datasource: 5 | driverClassName: org.hsqldb.jdbc.JDBCDriver 6 | jdbcUrl: jdbc:hsqldb:mem:db1 7 | username: sa 8 | password: 9 | 10 | server: 11 | port: 9090 12 | -------------------------------------------------------------------------------- /cache-redis/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: cacheredis 4 | 5 | cache: 6 | # 强制使用Redis作为Cache: 7 | type: Redis 8 | 9 | redis: 10 | host: localhost 11 | port: 6379 12 | # Redis数据库索引(默认为0) 13 | database: 0 14 | # Redis连接密码(默认为空) 15 | # password: xxx 16 | pool: 17 | # 连接池最大连接数 18 | max-active: 8 19 | # 连接池中的最大空闲连接 20 | max-idle: 8 21 | # 连接池中的最小空闲连接 22 | min-idle: 2 23 | # 连接池最大阻塞等待时间 24 | max-wait: 2000 25 | # 连接超时时间 26 | timeout: 500 27 | 28 | server: 29 | port: 9090 30 | -------------------------------------------------------------------------------- /cache/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: cache 4 | 5 | server: 6 | port: 9090 7 | -------------------------------------------------------------------------------- /config-bean/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | 7 | com.itranswarp.springcloud 8 | parent 9 | 1.0-SNAPSHOT 10 | ../parent/pom.xml 11 | 12 | 13 | config-bean 14 | jar 15 | 16 | 17 | 18 | org.springframework.boot 19 | spring-boot-starter-web 20 | 21 | 22 | org.springframework.boot 23 | spring-boot-starter-actuator 24 | 25 | 26 | org.springframework.boot 27 | spring-boot-devtools 28 | true 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /config-bean/src/main/java/com/itranswarp/springcloud/configbean/ConfigBeanApplication.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.configbean; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | * Spring Boot Application. 8 | * 9 | * @author Michael Liao 10 | */ 11 | @SpringBootApplication 12 | public class ConfigBeanApplication { 13 | 14 | public static void main(String[] args) throws Exception { 15 | SpringApplication.run(ConfigBeanApplication.class, args); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /config-bean/src/main/java/com/itranswarp/springcloud/configbean/UrlFetcher.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.configbean; 2 | 3 | import javax.annotation.PostConstruct; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Component; 7 | 8 | import com.fasterxml.jackson.databind.ObjectMapper; 9 | import com.itranswarp.springcloud.configbean.config.ProxyConfigs; 10 | 11 | @Component 12 | public class UrlFetcher { 13 | 14 | @Autowired 15 | ProxyConfigs configs; 16 | 17 | @PostConstruct 18 | public void init() throws Exception { 19 | ObjectMapper mapper = new ObjectMapper(); 20 | System.out.println("********************************************************************************"); 21 | System.out.println(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(configs)); 22 | System.out.println("********************************************************************************"); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /config-bean/src/main/java/com/itranswarp/springcloud/configbean/config/ProxyConfig.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.configbean.config; 2 | 3 | public class ProxyConfig { 4 | 5 | private String name; 6 | private String host; 7 | private int port = 80; 8 | 9 | private String[] headers = {}; 10 | 11 | public String getName() { 12 | return name; 13 | } 14 | 15 | public void setName(String name) { 16 | this.name = name; 17 | } 18 | 19 | public String getHost() { 20 | return host; 21 | } 22 | 23 | public void setHost(String host) { 24 | this.host = host; 25 | } 26 | 27 | public int getPort() { 28 | return port; 29 | } 30 | 31 | public void setPort(int port) { 32 | this.port = port; 33 | } 34 | 35 | public String[] getHeaders() { 36 | return headers; 37 | } 38 | 39 | public void setHeaders(String[] headers) { 40 | this.headers = headers; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /config-bean/src/main/java/com/itranswarp/springcloud/configbean/config/ProxyConfigs.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.configbean.config; 2 | 3 | import java.util.Map; 4 | 5 | import org.springframework.boot.context.properties.ConfigurationProperties; 6 | import org.springframework.stereotype.Component; 7 | 8 | @Component 9 | @ConfigurationProperties("fetch") 10 | public class ProxyConfigs { 11 | 12 | private Map proxies; 13 | 14 | public Map getProxies() { 15 | return proxies; 16 | } 17 | 18 | public void setProxies(Map proxies) { 19 | this.proxies = proxies; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /config-bean/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: hello 4 | 5 | server: 6 | port: 9090 7 | 8 | fetch: 9 | proxies: 10 | office: 11 | name: Office Internal Use 12 | host: office.proxy.example.com 13 | headers: 14 | - UserName 15 | - UserToken 16 | www: 17 | name: ${PUBLIC_PROXY:Access Internet} 18 | host: internet.proxy.example.com 19 | port: 8080 20 | headers: 21 | - FromAddress 22 | - AuthToken 23 | test: 24 | name: Test Only 25 | host: test.proxy.example.com 26 | -------------------------------------------------------------------------------- /data-es/.gitignore: -------------------------------------------------------------------------------- 1 | # ignore elastic search data dir: 2 | data/ 3 | -------------------------------------------------------------------------------- /data-es/src/main/java/com/feiyangedu/springcloud/es/domain/News.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.es.domain; 2 | 3 | import org.springframework.data.elasticsearch.annotations.Document; 4 | 5 | @Document(indexName = "es") 6 | public class News { 7 | 8 | public String id; 9 | public String link; 10 | public String title; 11 | public String description; 12 | public long pubDate; 13 | 14 | @Override 15 | public String toString() { 16 | return new StringBuilder(128).append("News(title=").append(title).append(", description=") 17 | .append(description.length() >= 20 ? description.substring(0, 20) + "..." : description).append(")") 18 | .toString(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /data-es/src/main/java/com/feiyangedu/springcloud/es/repository/NewsRepository.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.es.repository; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.elasticsearch.repository.ElasticsearchCrudRepository; 6 | 7 | import com.feiyangedu.springcloud.es.domain.News; 8 | 9 | public interface NewsRepository extends ElasticsearchCrudRepository { 10 | 11 | List findByTitleLike(String q); 12 | } 13 | -------------------------------------------------------------------------------- /data-es/src/main/java/com/feiyangedu/springcloud/es/util/Phrase.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.es.util; 2 | 3 | public class Phrase extends Span { 4 | 5 | public Phrase(String text) { 6 | super(text); 7 | } 8 | 9 | @Override 10 | public boolean equals(Object o) { 11 | if (o instanceof Phrase) { 12 | Phrase p = (Phrase) o; 13 | return this.text.equals(p.text); 14 | } 15 | return false; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /data-es/src/main/java/com/feiyangedu/springcloud/es/util/Span.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.es.util; 2 | 3 | public abstract class Span { 4 | 5 | public final String text; 6 | 7 | public Span(String text) { 8 | this.text = text; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /data-es/src/main/java/com/feiyangedu/springcloud/es/util/Word.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.es.util; 2 | 3 | public class Word extends Span { 4 | 5 | public Word(String text) { 6 | super(text); 7 | } 8 | 9 | @Override 10 | public boolean equals(Object o) { 11 | if (o instanceof Word) { 12 | Word w = (Word) o; 13 | return this.text.equals(w.text); 14 | } 15 | return false; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /data-es/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: data-es 4 | jdbc: 5 | show-sql: true 6 | 7 | server: 8 | port: 9090 9 | -------------------------------------------------------------------------------- /data-jdbc/src/main/java/com/itranswarp/springcloud/data/request/UserReq.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.data.request; 2 | 3 | public class UserReq { 4 | 5 | private String email; 6 | 7 | private String name; 8 | 9 | private boolean gender; 10 | 11 | public String getEmail() { 12 | return email; 13 | } 14 | 15 | public void setEmail(String email) { 16 | this.email = email; 17 | } 18 | 19 | public String getName() { 20 | return name; 21 | } 22 | 23 | public void setName(String name) { 24 | this.name = name; 25 | } 26 | 27 | public boolean isGender() { 28 | return gender; 29 | } 30 | 31 | public void setGender(boolean gender) { 32 | this.gender = gender; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /data-jdbc/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: data-jdbc 4 | 5 | server: 6 | port: 9090 7 | -------------------------------------------------------------------------------- /data-jpa/src/main/java/com/feiyangedu/springcloud/data/repository/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.data.repository; 2 | 3 | import org.springframework.data.repository.PagingAndSortingRepository; 4 | import org.springframework.transaction.annotation.Transactional; 5 | 6 | import com.feiyangedu.springcloud.data.domain.User; 7 | 8 | @Transactional 9 | public interface UserRepository extends PagingAndSortingRepository { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /data-jpa/src/main/java/com/feiyangedu/springcloud/data/request/UserReq.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.data.request; 2 | 3 | public class UserReq { 4 | 5 | private String email; 6 | 7 | private String name; 8 | 9 | private boolean gender; 10 | 11 | public String getEmail() { 12 | return email; 13 | } 14 | 15 | public void setEmail(String email) { 16 | this.email = email; 17 | } 18 | 19 | public String getName() { 20 | return name; 21 | } 22 | 23 | public void setName(String name) { 24 | this.name = name; 25 | } 26 | 27 | public boolean isGender() { 28 | return gender; 29 | } 30 | 31 | public void setGender(boolean gender) { 32 | this.gender = gender; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /data-jpa/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: data-jpa 4 | # JPA配置: 5 | jpa: 6 | show-sql: true 7 | properties: 8 | javax: 9 | persistence: 10 | # 自动生成DDL脚本: 11 | schema-generation: 12 | create-source: metadata 13 | scripts: 14 | action: create 15 | create-target: target/init.sql 16 | 17 | server: 18 | port: 9090 19 | -------------------------------------------------------------------------------- /data-multidatasource/src/main/java/com/itranswarp/springcloud/data/domain/Book.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.data.domain; 2 | 3 | public class Book { 4 | 5 | private String id; 6 | private String name; 7 | private String isbn; 8 | private long createdAt; 9 | private long updatedAt; 10 | private long version; 11 | 12 | public String getId() { 13 | return id; 14 | } 15 | 16 | public void setId(String id) { 17 | this.id = id; 18 | } 19 | 20 | public String getName() { 21 | return name; 22 | } 23 | 24 | public void setName(String name) { 25 | this.name = name; 26 | } 27 | 28 | public String getIsbn() { 29 | return isbn; 30 | } 31 | 32 | public void setIsbn(String isbn) { 33 | this.isbn = isbn; 34 | } 35 | 36 | public long getCreatedAt() { 37 | return createdAt; 38 | } 39 | 40 | public void setCreatedAt(long createdAt) { 41 | this.createdAt = createdAt; 42 | } 43 | 44 | public long getUpdatedAt() { 45 | return updatedAt; 46 | } 47 | 48 | public void setUpdatedAt(long updatedAt) { 49 | this.updatedAt = updatedAt; 50 | } 51 | 52 | public long getVersion() { 53 | return version; 54 | } 55 | 56 | public void setVersion(long version) { 57 | this.version = version; 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /data-multidatasource/src/main/java/com/itranswarp/springcloud/data/request/BookReq.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.data.request; 2 | 3 | public class BookReq { 4 | 5 | private String name; 6 | 7 | private String isbn; 8 | 9 | public String getName() { 10 | return name; 11 | } 12 | 13 | public void setName(String name) { 14 | this.name = name; 15 | } 16 | 17 | public String getIsbn() { 18 | return isbn; 19 | } 20 | 21 | public void setIsbn(String isbn) { 22 | this.isbn = isbn; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /data-multidatasource/src/main/java/com/itranswarp/springcloud/data/request/UserReq.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.data.request; 2 | 3 | public class UserReq { 4 | 5 | private String email; 6 | 7 | private String name; 8 | 9 | private boolean gender; 10 | 11 | public String getEmail() { 12 | return email; 13 | } 14 | 15 | public void setEmail(String email) { 16 | this.email = email; 17 | } 18 | 19 | public String getName() { 20 | return name; 21 | } 22 | 23 | public void setName(String name) { 24 | this.name = name; 25 | } 26 | 27 | public boolean isGender() { 28 | return gender; 29 | } 30 | 31 | public void setGender(boolean gender) { 32 | this.gender = gender; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /data-multidatasource/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: data-multidatasource 4 | datasource: 5 | driverClassName: org.hsqldb.jdbc.JDBCDriver 6 | jdbcUrl: jdbc:hsqldb:mem:db1 7 | username: sa 8 | password: 9 | second-datasource: 10 | driverClassName: org.hsqldb.jdbc.JDBCDriver 11 | jdbcUrl: jdbc:hsqldb:mem:db2 12 | username: sa 13 | password: 14 | 15 | server: 16 | port: 9090 17 | -------------------------------------------------------------------------------- /data-routingdatasource/src/main/java/com/itranswarp/springcloud/data/context/RoutingAspect.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.data.context; 2 | 3 | import org.aspectj.lang.ProceedingJoinPoint; 4 | import org.aspectj.lang.annotation.Around; 5 | import org.aspectj.lang.annotation.Aspect; 6 | import org.springframework.stereotype.Component; 7 | 8 | @Aspect 9 | @Component 10 | public class RoutingAspect { 11 | 12 | @Around("@annotation(routingWith)") 13 | public Object routingWithDataSource(ProceedingJoinPoint joinPoint, RoutingWith routingWith) throws Throwable { 14 | String key = routingWith.value(); 15 | try (RoutingDataSourceContext ctx = new RoutingDataSourceContext(key)) { 16 | return joinPoint.proceed(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /data-routingdatasource/src/main/java/com/itranswarp/springcloud/data/context/RoutingDataSource.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.data.context; 2 | 3 | import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; 4 | 5 | /** 6 | * Routing data source by key of data source context. 7 | * 8 | * @author liaoxuefeng 9 | */ 10 | public class RoutingDataSource extends AbstractRoutingDataSource { 11 | 12 | @Override 13 | protected Object determineCurrentLookupKey() { 14 | return RoutingDataSourceContext.getDataSourceRoutingKey(); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /data-routingdatasource/src/main/java/com/itranswarp/springcloud/data/context/RoutingWith.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.data.context; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Target(ElementType.METHOD) 9 | @Retention(RetentionPolicy.RUNTIME) 10 | public @interface RoutingWith { 11 | 12 | /** 13 | * The routing key as string. 14 | * 15 | * @return Routing key. 16 | */ 17 | String value(); 18 | } 19 | -------------------------------------------------------------------------------- /data-routingdatasource/src/main/java/com/itranswarp/springcloud/data/request/UserReq.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.data.request; 2 | 3 | public class UserReq { 4 | 5 | private String email; 6 | 7 | private String name; 8 | 9 | private boolean gender; 10 | 11 | public String getEmail() { 12 | return email; 13 | } 14 | 15 | public void setEmail(String email) { 16 | this.email = email; 17 | } 18 | 19 | public String getName() { 20 | return name; 21 | } 22 | 23 | public void setName(String name) { 24 | this.name = name; 25 | } 26 | 27 | public boolean isGender() { 28 | return gender; 29 | } 30 | 31 | public void setGender(boolean gender) { 32 | this.gender = gender; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /data-routingdatasource/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: data-multidatasource 4 | datasource: 5 | driverClassName: org.hsqldb.jdbc.JDBCDriver 6 | jdbcUrl: jdbc:hsqldb:mem:db1 7 | username: sa 8 | password: 9 | ro-datasource: 10 | driverClassName: org.hsqldb.jdbc.JDBCDriver 11 | jdbcUrl: jdbc:hsqldb:mem:db1 12 | username: sa 13 | password: 14 | 15 | server: 16 | port: 9090 17 | -------------------------------------------------------------------------------- /hello/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | 7 | com.itranswarp.springcloud 8 | parent 9 | 1.0-SNAPSHOT 10 | ../parent/pom.xml 11 | 12 | 13 | hello 14 | jar 15 | 16 | 17 | 18 | org.springframework.boot 19 | spring-boot-starter-web 20 | 21 | 22 | org.springframework.boot 23 | spring-boot-starter-actuator 24 | 25 | 26 | org.springframework.boot 27 | spring-boot-devtools 28 | true 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /hello/src/main/java/com/itranswarp/springcloud/hello/HelloApplication.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.hello; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | * Spring Boot Application. 8 | * 9 | * @author liaoxuefeng 10 | */ 11 | @SpringBootApplication 12 | public class HelloApplication { 13 | 14 | public static void main(String[] args) throws Exception { 15 | SpringApplication.run(HelloApplication.class, args); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /hello/src/main/java/com/itranswarp/springcloud/hello/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.hello; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.ResponseBody; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | /** 8 | * Hello controller. 9 | * 10 | * @author liaoxuefeng 11 | */ 12 | @RestController 13 | public class HelloController { 14 | 15 | @GetMapping("/") 16 | @ResponseBody 17 | String home() { 18 | return "

Hello World!

"; 19 | } 20 | 21 | @GetMapping("/api") 22 | public String[] api() { 23 | return "Hello Spring Boot Application".split(" "); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /hello/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: hello 4 | 5 | server: 6 | port: 9090 7 | -------------------------------------------------------------------------------- /mail/src/main/java/com/feiyangedu/springcloud/mail/web/Mail.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.mail.web; 2 | 3 | public class Mail { 4 | 5 | private String to; 6 | private String subject; 7 | private String body; 8 | 9 | public String getTo() { 10 | return to; 11 | } 12 | 13 | public void setTo(String to) { 14 | this.to = to; 15 | } 16 | 17 | public String getSubject() { 18 | return subject; 19 | } 20 | 21 | public void setSubject(String subject) { 22 | this.subject = subject; 23 | } 24 | 25 | public String getBody() { 26 | return body; 27 | } 28 | 29 | public void setBody(String body) { 30 | this.body = body; 31 | } 32 | 33 | public void validate() { 34 | this.to = notEmpty(this.to, "Field 'to' is empty.").toLowerCase(); 35 | if (!this.to.matches("^[a-z0-9\\.\\_\\-]+@[a-z0-9\\.\\-]+\\.[a-z]{2,6}$")) { 36 | throw new RuntimeException("Field 'to' is invalid."); 37 | } 38 | this.subject = notEmpty(this.subject, "Field 'subject' is empty."); 39 | this.body = notEmpty(this.body, "Field 'body' is empty."); 40 | } 41 | 42 | String notEmpty(String value, String error) { 43 | if (value == null || value.trim().isEmpty()) { 44 | throw new RuntimeException(error); 45 | } 46 | return value.trim(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /mail/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: sendmail 4 | mail: 5 | host: smtp.sina.com 6 | port: 465 7 | protocol: smtp 8 | username: springcloudmail@sina.com 9 | password: DoNotChangeMe 10 | properties: 11 | mail.smtp.socketFactory.port: 465 12 | mail.smtp.socketFactory.class: javax.net.ssl.SSLSocketFactory 13 | mail.smtp.auth: true 14 | mail.debug: true 15 | freemarker: 16 | suffix: .html 17 | cache: false 18 | settings: 19 | output_format: HTMLOutputFormat 20 | rabbitmq: 21 | host: localhost 22 | port: 5672 23 | username: guest 24 | password: guest 25 | 26 | server: 27 | port: 9090 28 | -------------------------------------------------------------------------------- /mail/src/main/resources/static/css/components/accordion.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Accordion 4 | ========================================================================== */ 5 | /* Sub-object: `uk-accordion-title` 6 | ========================================================================== */ 7 | .uk-accordion-title { 8 | margin-top: 0; 9 | margin-bottom: 15px; 10 | padding: 5px 15px; 11 | background: #eee; 12 | font-size: 18px; 13 | line-height: 24px; 14 | cursor: pointer; 15 | } 16 | /* Sub-object: `uk-accordion-content` 17 | ========================================================================== */ 18 | .uk-accordion-content { 19 | padding: 0 15px 15px 15px; 20 | } 21 | /* 22 | * Micro clearfix to make panels more robust 23 | */ 24 | .uk-accordion-content:before, 25 | .uk-accordion-content:after { 26 | content: ""; 27 | display: table; 28 | } 29 | .uk-accordion-content:after { 30 | clear: both; 31 | } 32 | /* 33 | * Remove margin from the last-child 34 | */ 35 | .uk-accordion-content > :last-child { 36 | margin-bottom: 0; 37 | } 38 | -------------------------------------------------------------------------------- /mail/src/main/resources/static/css/components/form-file.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Form file 4 | ========================================================================== */ 5 | /* 6 | * 1. Behave like form elements 7 | * 2. Create position context for dropdowns 8 | * 3. Clip content 9 | */ 10 | .uk-form-file { 11 | /* 1 */ 12 | display: inline-block; 13 | vertical-align: middle; 14 | /* 2 */ 15 | position: relative; 16 | /* 3 */ 17 | overflow: hidden; 18 | } 19 | /* 20 | * 1. Required for Firefox 21 | * 2. Expand height and required for the cursor 22 | */ 23 | .uk-form-file input[type="file"] { 24 | position: absolute; 25 | top: 0; 26 | z-index: 1; 27 | width: 100%; 28 | opacity: 0; 29 | cursor: pointer; 30 | /* 1 */ 31 | left: 0; 32 | /* 2 */ 33 | font-size: 500px; 34 | } 35 | -------------------------------------------------------------------------------- /mail/src/main/resources/static/css/components/form-password.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Form password 4 | ========================================================================== */ 5 | /* 6 | * 1. Container width fits its content 7 | * 2. Create position context 8 | * 3. Prevent `inline-block` consequences 9 | */ 10 | .uk-form-password { 11 | /* 1 */ 12 | display: inline-block; 13 | /* 2 */ 14 | position: relative; 15 | /* 3 */ 16 | max-width: 100%; 17 | } 18 | .uk-form-password-toggle { 19 | display: block; 20 | position: absolute; 21 | top: 50%; 22 | right: 10px; 23 | margin-top: -6px; 24 | font-size: 13px; 25 | line-height: 13px; 26 | color: #999; 27 | } 28 | .uk-form-password-toggle:hover { 29 | color: #999; 30 | text-decoration: none; 31 | } 32 | .uk-form-password > input { 33 | padding-right: 50px !important; 34 | } 35 | -------------------------------------------------------------------------------- /mail/src/main/resources/static/css/components/form-select.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Form select 4 | ========================================================================== */ 5 | /* 6 | * 1. Behave like form elements 7 | * 2. Create position context for dropdowns 8 | * 3. Clip content 9 | */ 10 | .uk-form-select { 11 | /* 1 */ 12 | display: inline-block; 13 | vertical-align: middle; 14 | /* 2 */ 15 | position: relative; 16 | /* 3 */ 17 | overflow: hidden; 18 | } 19 | /* 20 | * 1. Required for Firefox 21 | * 1. Required for Webkit to make `height` work 22 | */ 23 | .uk-form-select select { 24 | position: absolute; 25 | top: 0; 26 | z-index: 1; 27 | width: 100%; 28 | height: 100%; 29 | opacity: 0; 30 | cursor: pointer; 31 | /* 1 */ 32 | left: 0; 33 | /* 2 */ 34 | -webkit-appearance: none; 35 | } 36 | -------------------------------------------------------------------------------- /mail/src/main/resources/static/css/components/placeholder.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Placeholder 4 | ========================================================================== */ 5 | .uk-placeholder { 6 | margin-bottom: 15px; 7 | padding: 15px; 8 | border: 1px dashed #ddd; 9 | background: #fafafa; 10 | color: #444; 11 | } 12 | /* 13 | * Add margin if adjacent element 14 | */ 15 | * + .uk-placeholder { 16 | margin-top: 15px; 17 | } 18 | /* 19 | * Remove margin from the last-child 20 | */ 21 | .uk-placeholder > :last-child { 22 | margin-bottom: 0; 23 | } 24 | /* Modifier: `uk-placeholder-large` 25 | ========================================================================== */ 26 | .uk-placeholder-large { 27 | padding-top: 80px; 28 | padding-bottom: 80px; 29 | } 30 | -------------------------------------------------------------------------------- /mail/src/main/resources/static/css/components/sticky.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Sticky 4 | ========================================================================== */ 5 | /* 6 | * 1. More robust if padding and border are used 7 | * 2. Enable hardware acceleration for iOS browsers, resolves scrolling issue 8 | */ 9 | [data-uk-sticky].uk-active { 10 | z-index: 980; 11 | /* 1 */ 12 | box-sizing: border-box; 13 | /* 2 */ 14 | -webkit-backface-visibility: hidden; 15 | } 16 | /* 17 | * Faster animations 18 | */ 19 | [data-uk-sticky][class*='uk-animation-'] { 20 | -webkit-animation-duration: 0.2s; 21 | animation-duration: 0.2s; 22 | } 23 | [data-uk-sticky].uk-animation-reverse { 24 | -webkit-animation-duration: 0.2s; 25 | animation-duration: 0.2s; 26 | } 27 | -------------------------------------------------------------------------------- /mail/src/main/resources/static/css/components/upload.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Upload 4 | ========================================================================== */ 5 | /* 6 | * Create a box-shadow when dragging a file over the upload area 7 | */ 8 | .uk-dragover { 9 | box-shadow: 0 0 20px rgba(100, 100, 100, 0.3); 10 | } 11 | -------------------------------------------------------------------------------- /mail/src/main/resources/static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/mail/src/main/resources/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /mail/src/main/resources/static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/mail/src/main/resources/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /mail/src/main/resources/static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/mail/src/main/resources/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /mail/src/main/resources/static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/mail/src/main/resources/static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /messaging-amqp/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: amqp 4 | 5 | rabbitmq: 6 | host: localhost 7 | port: 5672 8 | username: guest 9 | password: guest 10 | 11 | server: 12 | port: 9090 13 | -------------------------------------------------------------------------------- /messaging-jms/src/main/java/com/feiyangedu/springcloud/messaging/Notify.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.messaging; 2 | 3 | /** 4 | * Object message. 5 | */ 6 | public class Notify { 7 | 8 | public String from; 9 | public String to; 10 | public String message; 11 | 12 | public Notify() { 13 | } 14 | 15 | public Notify(String from, String to, String message) { 16 | super(); 17 | this.from = from; 18 | this.to = to; 19 | this.message = message; 20 | } 21 | 22 | @Override 23 | public String toString() { 24 | return String.format("From: %s\nTo: %s\nMessage: %s\n", from, to, message); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /messaging-jms/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: jms 4 | 5 | activemq: 6 | in-memory: true 7 | pool: 8 | enabled: false 9 | 10 | server: 11 | port: 9090 12 | -------------------------------------------------------------------------------- /messaging-stream/src/main/java/com/feiyangedu/springcloud/messaging/StreamApplication.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.messaging; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.stream.annotation.EnableBinding; 6 | 7 | /** 8 | * Spring Boot Application. 9 | * 10 | * @author Michael Liao 11 | */ 12 | @SpringBootApplication 13 | @EnableBinding({ VoteSink.class, VoteSource.class }) 14 | public class StreamApplication { 15 | 16 | public static void main(String[] args) throws Exception { 17 | SpringApplication.run(StreamApplication.class, args); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /messaging-stream/src/main/java/com/feiyangedu/springcloud/messaging/Vote.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.messaging; 2 | 3 | public class Vote { 4 | 5 | public static enum Name { 6 | Bob, Tim, Alice, Lisa 7 | } 8 | 9 | private Name name; 10 | 11 | public Vote() { 12 | } 13 | 14 | public Vote(String name) { 15 | this.name = Name.valueOf(name); 16 | } 17 | 18 | public Name getName() { 19 | return name; 20 | } 21 | 22 | public void setName(Name name) { 23 | this.name = name; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /messaging-stream/src/main/java/com/feiyangedu/springcloud/messaging/VoteHolder.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.messaging; 2 | 3 | import java.util.Map; 4 | import java.util.concurrent.ConcurrentHashMap; 5 | import java.util.concurrent.atomic.AtomicLong; 6 | 7 | import javax.annotation.PostConstruct; 8 | 9 | import org.springframework.stereotype.Component; 10 | 11 | /** 12 | * VoteHolder. 13 | * 14 | * @author Michael Liao 15 | */ 16 | @Component 17 | public class VoteHolder { 18 | 19 | final Map votes = new ConcurrentHashMap<>(); 20 | 21 | @PostConstruct 22 | public void initVotes() { 23 | for (Vote.Name name : Vote.Name.values()) { 24 | votes.put(name, new AtomicLong(0L)); 25 | } 26 | } 27 | 28 | public long addVote(Vote vote) { 29 | return votes.get(vote.getName()).incrementAndGet(); 30 | } 31 | 32 | public Map getVotes() { 33 | return this.votes; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /messaging-stream/src/main/java/com/feiyangedu/springcloud/messaging/VoteListener.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.messaging; 2 | 3 | import org.apache.commons.logging.Log; 4 | import org.apache.commons.logging.LogFactory; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.cloud.stream.annotation.StreamListener; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * Handle message. 11 | * 12 | * @author liaoxuefeng 13 | */ 14 | @Component 15 | public class VoteListener { 16 | 17 | final Log log = LogFactory.getLog(getClass()); 18 | 19 | @Autowired 20 | VoteHolder voteHolder; 21 | 22 | @StreamListener(VoteSink.VOTE_INPUT) 23 | public void processVote(Vote vote) { 24 | long n = voteHolder.addVote(vote); 25 | log.info(n + " votes for candidate: " + vote.getName().name()); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /messaging-stream/src/main/java/com/feiyangedu/springcloud/messaging/VoteLogListener.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.messaging; 2 | 3 | import org.apache.commons.logging.Log; 4 | import org.apache.commons.logging.LogFactory; 5 | import org.springframework.cloud.stream.annotation.StreamListener; 6 | import org.springframework.stereotype.Component; 7 | 8 | /** 9 | * Handle message. 10 | * 11 | * @author liaoxuefeng 12 | */ 13 | @Component 14 | public class VoteLogListener { 15 | 16 | final Log log = LogFactory.getLog(getClass()); 17 | 18 | @StreamListener(VoteSink.VOTE_LOG_INPUT) 19 | public void processVote(Vote vote) { 20 | log.info("LOG Listener => Vote for: " + vote.getName().name()); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /messaging-stream/src/main/java/com/feiyangedu/springcloud/messaging/VoteSink.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.messaging; 2 | 3 | import org.springframework.cloud.stream.annotation.Input; 4 | import org.springframework.messaging.SubscribableChannel; 5 | 6 | /** 7 | * For receive message. 8 | * 9 | * @author liaoxuefeng 10 | */ 11 | public interface VoteSink { 12 | 13 | String VOTE_INPUT = "voteInput"; 14 | String VOTE_LOG_INPUT = "voteLogInput"; 15 | 16 | @Input(VOTE_INPUT) 17 | SubscribableChannel voteInput(); 18 | 19 | @Input(VOTE_LOG_INPUT) 20 | SubscribableChannel logInput(); 21 | } 22 | -------------------------------------------------------------------------------- /messaging-stream/src/main/java/com/feiyangedu/springcloud/messaging/VoteSource.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.messaging; 2 | 3 | import org.springframework.cloud.stream.annotation.Output; 4 | import org.springframework.messaging.MessageChannel; 5 | 6 | /** 7 | * For send message. 8 | * 9 | * @author liaoxuefeng 10 | */ 11 | public interface VoteSource { 12 | 13 | String VOTE_OUTPUT = "voteOutput"; 14 | 15 | @Output(VOTE_OUTPUT) 16 | MessageChannel output(); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /messaging-stream/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: stream 4 | cloud: 5 | stream: 6 | bindings: 7 | voteInput: 8 | group: voteGroup 9 | destination: vote.exchange 10 | contentType: application/json 11 | binder: myrabbit1 12 | voteLogInput: 13 | group: logGroup 14 | destination: vote.exchange 15 | contentType: application/json 16 | binder: myrabbit1 17 | voteOutput: 18 | destination: vote.exchange 19 | contentType: application/json 20 | binder: myrabbit1 21 | binders: 22 | myrabbit1: 23 | type: rabbit 24 | environment: 25 | spring: 26 | rabbitmq: 27 | host: localhost 28 | port: 5672 29 | username: guest 30 | password: guest 31 | 32 | server: 33 | port: 9090 34 | -------------------------------------------------------------------------------- /petstore/petstore-account/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | com.feiyangedu.springcloud 7 | petstore-parent 8 | 1.0-SNAPSHOT 9 | ../petstore-parent/pom.xml 10 | 11 | 12 | petstore-account 13 | jar 14 | petstore-account 15 | 16 | 17 | 18 | com.feiyangedu.springcloud 19 | petstore-common 20 | ${project.version} 21 | 22 | 23 | 24 | 25 | 26 | 27 | org.springframework.boot 28 | spring-boot-maven-plugin 29 | 30 | 31 | com.spotify 32 | docker-maven-plugin 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /petstore/petstore-account/src/main/java/com/feiyangedu/springcloud/petstore/account/AccountApplication.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.account; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.context.annotation.Import; 6 | import org.springframework.data.jpa.repository.config.EnableJpaRepositories; 7 | 8 | import com.feiyangedu.springcloud.petstore.common.config.CustomWebConfiguration; 9 | 10 | @SpringBootApplication 11 | @EnableJpaRepositories 12 | @Import(CustomWebConfiguration.class) 13 | public class AccountApplication { 14 | 15 | public static void main(String[] args) { 16 | SpringApplication.run(AccountApplication.class, args); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /petstore/petstore-account/src/main/java/com/feiyangedu/springcloud/petstore/account/bean/UserBean.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.account.bean; 2 | 3 | import java.time.LocalDate; 4 | 5 | import com.feiyangedu.springcloud.petstore.common.constant.Gender; 6 | 7 | public class UserBean { 8 | 9 | public String email; 10 | 11 | public String name; 12 | 13 | public Gender gender; 14 | 15 | public LocalDate birth; 16 | } 17 | -------------------------------------------------------------------------------- /petstore/petstore-account/src/main/java/com/feiyangedu/springcloud/petstore/account/domain/User.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.account.domain; 2 | 3 | import java.time.LocalDate; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | 8 | import com.feiyangedu.springcloud.petstore.common.constant.Gender; 9 | import com.feiyangedu.springcloud.petstore.common.constant.Role; 10 | import com.feiyangedu.springcloud.petstore.common.domain.AbstractEntity; 11 | 12 | @Entity 13 | public class User extends AbstractEntity { 14 | 15 | @Column(nullable = false, updatable = false) 16 | public int role = Role.USER; 17 | 18 | @Column(length = VARCHAR_100, nullable = false, updatable = false, unique = true) 19 | public String email; 20 | 21 | @Column(length = VARCHAR_100, nullable = false) 22 | public String name; 23 | 24 | @Column(length = VARCHAR_100, nullable = false) 25 | public Gender gender; 26 | 27 | @Column(columnDefinition = "DATE", nullable = false) 28 | public LocalDate birth; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /petstore/petstore-account/src/main/java/com/feiyangedu/springcloud/petstore/account/domain/UserPasswdAuth.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.account.domain; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | 6 | import com.feiyangedu.springcloud.petstore.common.domain.AbstractEntity; 7 | 8 | @Entity 9 | public class UserPasswdAuth extends AbstractEntity { 10 | 11 | @Column(length = ID_LENGTH, nullable = false, updatable = false, unique = true) 12 | private String userId; 13 | 14 | @Column(length = VARCHAR_100, nullable = false) 15 | private String passwd; 16 | 17 | @Column(length = VARCHAR_100, nullable = false) 18 | private String salt; 19 | 20 | public String getUserId() { 21 | return userId; 22 | } 23 | 24 | public void setUserId(String userId) { 25 | this.userId = userId; 26 | } 27 | 28 | public String getPasswd() { 29 | return passwd; 30 | } 31 | 32 | public void setPasswd(String passwd) { 33 | this.passwd = passwd; 34 | } 35 | 36 | public String getSalt() { 37 | return salt; 38 | } 39 | 40 | public void setSalt(String salt) { 41 | this.salt = salt; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /petstore/petstore-account/src/main/java/com/feiyangedu/springcloud/petstore/account/repository/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.account.repository; 2 | 3 | import org.springframework.data.repository.PagingAndSortingRepository; 4 | 5 | import com.feiyangedu.springcloud.petstore.account.domain.User; 6 | 7 | public interface UserRepository extends PagingAndSortingRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /petstore/petstore-account/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: account 4 | profiles: 5 | active: ${PROFILES:native} 6 | cloud: 7 | config: 8 | uri: http://${CONFIG_IP:172.27.0.202}:8888 9 | fail-fast: true 10 | -------------------------------------------------------------------------------- /petstore/petstore-batch/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | com.feiyangedu.springcloud 7 | petstore-parent 8 | 1.0-SNAPSHOT 9 | ../petstore-parent/pom.xml 10 | 11 | 12 | petstore-batch 13 | jar 14 | petstore-batch 15 | 16 | 17 | 18 | org.springframework.cloud 19 | spring-cloud-starter-config 20 | 21 | 22 | org.springframework.cloud 23 | spring-cloud-starter-eureka 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /petstore/petstore-batch/src/main/java/com/feiyangedu/springcloud/petstore/search/BatchApplication.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.search; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 6 | 7 | @SpringBootApplication 8 | @EnableDiscoveryClient 9 | public class BatchApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(BatchApplication.class, args); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /petstore/petstore-batch/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: batch 4 | profiles: 5 | active: ${PROFILES:native} 6 | cloud: 7 | config: 8 | uri: http://${CONFIG_IP:172.27.0.202}:8888 9 | fail-fast: true 10 | -------------------------------------------------------------------------------- /petstore/petstore-build/.env: -------------------------------------------------------------------------------- 1 | # default env: 2 | 3 | MYSQL_IP=172.27.0.101 4 | REDIS_IP=172.27.0.102 5 | RABBITMQ_IP=172.27.0.103 6 | ES_IP=172.27.0.104 7 | KIBANA_IP=172.27.0.105 8 | 9 | EUREKA_IP=172.27.0.201 10 | CONFIG_IP=172.27.0.202 11 | ZIPKIN_IP=172.27.0.203 12 | GATEWAY_IP=172.27.0.220 13 | -------------------------------------------------------------------------------- /petstore/petstore-build/README.txt: -------------------------------------------------------------------------------- 1 | # How to run VPN for docker 2 | 3 | 1. Start OpenVPN in docker: 4 | 5 | $ docker-compose up -d openvpn 6 | 7 | 2. Install OpenVPN client for macOS: 8 | 9 | https://tunnelblick.net/ 10 | 11 | 3. Import OpenVPN configuration by double click `localvpn.ovpn` 12 | 13 | 4. Connect `localvpn`. 14 | -------------------------------------------------------------------------------- /petstore/petstore-build/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "build maven packages..." 4 | mvn clean package 5 | 6 | echo "build docker images..." 7 | 8 | for name in account config eureka gateway product search support web zipkin; do 9 | (cd ../petstore-$name && exec mvn docker:build) 10 | done; 11 | 12 | echo "start mysql..." 13 | 14 | docker-compose up -d mysql 15 | 16 | echo "start rabbitmq..." 17 | 18 | docker-compose up -d rabbitmq 19 | 20 | -------------------------------------------------------------------------------- /petstore/petstore-build/openvpn-data/down.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (c) 2006-2007 Gentoo Foundation 3 | # Distributed under the terms of the GNU General Public License v2 4 | # Contributed by Roy Marples (uberlord@gentoo.org) 5 | 6 | # If we have a service specific script, run this now 7 | if [ -x /etc/openvpn/"${SVCNAME}"-down.sh ] ; then 8 | /etc/openvpn/"${SVCNAME}"-down.sh "$@" 9 | fi 10 | 11 | # Restore resolv.conf to how it was 12 | if [ "${PEER_DNS}" != "no" ]; then 13 | if [ -x /sbin/resolvconf ] ; then 14 | /sbin/resolvconf -d "${dev}" 15 | elif [ -e /etc/resolv.conf-"${dev}".sv ] ; then 16 | # Important that we cat instead of move incase resolv.conf is 17 | # a symlink and not an actual file 18 | cat /etc/resolv.conf-"${dev}".sv > /etc/resolv.conf 19 | rm -f /etc/resolv.conf-"${dev}".sv 20 | fi 21 | fi 22 | 23 | if [ -n "${SVCNAME}" ]; then 24 | # Re-enter the init script to start any dependant services 25 | if /etc/init.d/"${SVCNAME}" --quiet status ; then 26 | export IN_BACKGROUND=true 27 | /etc/init.d/"${SVCNAME}" --quiet stop 28 | fi 29 | fi 30 | 31 | exit 0 32 | 33 | # vim: ts=4 : 34 | -------------------------------------------------------------------------------- /petstore/petstore-build/openvpn-data/openvpn.conf: -------------------------------------------------------------------------------- 1 | server 192.168.255.0 255.255.255.0 2 | verb 3 3 | key /etc/openvpn/pki/private/local.transwarp.xyz.key 4 | ca /etc/openvpn/pki/ca.crt 5 | cert /etc/openvpn/pki/issued/local.transwarp.xyz.crt 6 | dh /etc/openvpn/pki/dh.pem 7 | tls-auth /etc/openvpn/pki/ta.key 8 | key-direction 0 9 | keepalive 10 60 10 | persist-key 11 | persist-tun 12 | 13 | proto udp 14 | # Rely on Docker to do port mapping, internally always 1194 15 | port 1194 16 | dev tun0 17 | status /tmp/openvpn-status.log 18 | 19 | user nobody 20 | group nogroup 21 | 22 | ### Route Configurations Below 23 | route 192.168.254.0 255.255.255.0 24 | 25 | ### Push Configurations Below 26 | push block-outside-dns 27 | push dhcp-option DNS 8.8.8.8 28 | push dhcp-option DNS 8.8.4.4 29 | 30 | ### Extra Configurations Below 31 | -------------------------------------------------------------------------------- /petstore/petstore-build/openvpn-data/ovpn_env.sh: -------------------------------------------------------------------------------- 1 | declare -x OVPN_AUTH="" 2 | declare -x OVPN_CIPHER="" 3 | declare -x OVPN_CLIENT_TO_CLIENT 4 | declare -x OVPN_CN="local.transwarp.xyz" 5 | declare -x OVPN_COMP_LZO 6 | declare -x OVPN_DEFROUTE="1" 7 | declare -x OVPN_DEVICE="tun" 8 | declare -x OVPN_DNS="1" 9 | declare -x OVPN_ENV="/etc/openvpn/ovpn_env.sh" 10 | declare -x OVPN_FRAGMENT 11 | declare -x OVPN_MTU 12 | declare -x OVPN_NAT="0" 13 | declare -x OVPN_OTP_AUTH 14 | declare -x OVPN_PORT="1194" 15 | declare -x OVPN_PROTO="udp" 16 | declare -x OVPN_PUSH 17 | declare -x OVPN_ROUTES 18 | declare -x OVPN_SERVER="192.168.255.0/24" 19 | declare -x OVPN_SERVER_URL="udp://local.transwarp.xyz" 20 | declare -x OVPN_TLS_CIPHER="" 21 | -------------------------------------------------------------------------------- /petstore/petstore-build/openvpn-data/pki/.rnd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/petstore/petstore-build/openvpn-data/pki/.rnd -------------------------------------------------------------------------------- /petstore/petstore-build/openvpn-data/pki/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDITCCAgmgAwIBAgIJAOrMwWoqwR4qMA0GCSqGSIb3DQEBCwUAMBAxDjAMBgNV 3 | BAMMBWxvY2FsMB4XDTE3MDEwNTAxMjcyNVoXDTI3MDEwMzAxMjcyNVowEDEOMAwG 4 | A1UEAwwFbG9jYWwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCXydoF 5 | 45UUgyOAyhGg+Cq2VLBLpua1+XRUMNPZxRG88W0UauGLrvKOLMOZhx9cBV9sYMLd 6 | IBlXTtjbYdMsO2YA7Tdov9QfShXfflMVOK7cj1Pq7XDIf64VWkNlb82gkVVVmXvW 7 | jWE0i8D6WIA48ZrrL7KfPnTW0nXMCQJ9VW8f7heM3HDHI5ClAiFkrgdjwXfG9Fbw 8 | GMMHpnamSjuNX9sJVTD+r8jud4+UBZon+G7yIZ6g1p6Q3RcLEf+ox620j1CkprLQ 9 | 89fOAar3V2PNyqdP+5ts3WiQDHsP88sVn9CPOrWRVKywoCGj9VA7/b7PgCAMdLJI 10 | hhcL8mUxqfeagh9hAgMBAAGjfjB8MB0GA1UdDgQWBBRTw04L473DygEgNLoES9OD 11 | FkUXezBABgNVHSMEOTA3gBRTw04L473DygEgNLoES9ODFkUXe6EUpBIwEDEOMAwG 12 | A1UEAwwFbG9jYWyCCQDqzMFqKsEeKjAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIB 13 | BjANBgkqhkiG9w0BAQsFAAOCAQEAbYg/hHv3TTEYCe0B6JtbEcD5hGCtMew2Sh6x 14 | 2A+94aTjLdDIKCfwepQSsXHcej6rU5BObzJYslreduLrNY2QbgFna1Nt2tBrIlMM 15 | 35Af91Zgl91xY0E7fNSyRn4xbIoRebkXbnQ9d9Tr5XlGC4BYrV8/kk9eRM9JzNTR 16 | 2NcNGVYA4y9y20vBXZD1xECtptWEQSo47k6rjWZeJlFROrc6m1S351pIULbDW8mI 17 | c2Q4EaneRoAvhA0wmd4XZsBQftOKMn/GE5GHzMutSYI9r5DuQiGPnciabDfneqAS 18 | 7SWUW71tlr6ZmYSkf2kucwLTwhu+LbvRNnncQgR1QMY7giFsFg== 19 | -----END CERTIFICATE----- 20 | -------------------------------------------------------------------------------- /petstore/petstore-build/openvpn-data/pki/dh.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DH PARAMETERS----- 2 | MIIBCAKCAQEA62Osh2huK3VhJIwdZctA4hn9OimLTDpjw6HhhwLT+y+ifqiF48KN 3 | igaIBxiWR3YlN6QfZHSfaz6RWPK9l7PeKM8awkoOLKTUMc0DSF77SrHADjwsOKow 4 | IDNWQ1VVk0Kb3YYQQYla6o4vCwA5wPYR0IDW7ecS/TfylDUr3ZADGqYiq7PVIKwc 5 | 5jXZG1iNccSEEMJfv1oIEWdxwHOpaAH9QuygWVm5ManGJwbfZ6gmC6KMODizqk7h 6 | w2ZPMG9AZN738b4Ot56iLwQ0ro4uDDIG7q8SmTE7aLTAOKE+Sxm8/DGR23MufURQ 7 | A89uJuvi+xakyfs6T7Y5nA9XNJX2J2lzawIBAg== 8 | -----END DH PARAMETERS----- 9 | -------------------------------------------------------------------------------- /petstore/petstore-build/openvpn-data/pki/index.txt: -------------------------------------------------------------------------------- 1 | V 270103012952Z 01 unknown /CN=local.transwarp.xyz 2 | V 270103013037Z 02 unknown /CN=localvpn 3 | -------------------------------------------------------------------------------- /petstore/petstore-build/openvpn-data/pki/index.txt.attr: -------------------------------------------------------------------------------- 1 | unique_subject = yes 2 | -------------------------------------------------------------------------------- /petstore/petstore-build/openvpn-data/pki/index.txt.attr.old: -------------------------------------------------------------------------------- 1 | unique_subject = yes 2 | -------------------------------------------------------------------------------- /petstore/petstore-build/openvpn-data/pki/index.txt.old: -------------------------------------------------------------------------------- 1 | V 270103012952Z 01 unknown /CN=local.transwarp.xyz 2 | -------------------------------------------------------------------------------- /petstore/petstore-build/openvpn-data/pki/reqs/local.transwarp.xyz.req: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIICYzCCAUsCAQAwHjEcMBoGA1UEAwwTbG9jYWwudHJhbnN3YXJwLnh5ejCCASIw 3 | DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANjNIutkLD4QWQqoxV9tGFYJoYEK 4 | 3KzBBMw8OG4AGblKkW4iHEDulmNo2U5gFl/q7BXamZLPFsvgdwy3Qa6W6TM/eFOM 5 | XB2NsEczF56NK4ThN/xB8y8H7MehAkOxkPjqIF2kpRuQopR4f52WQW5fVggLcGTn 6 | i8QFCZ0KKBL/9dqVb+WECMLYth8VJOMgWq3HBI/78zic16i265DM9QDshc0/cGMf 7 | OLPQavKsUY1FPtZDkV7gFExFxq3CbXWIIXweW6w8Q311DgMP4KjPaLt5/YYbgtM/ 8 | 6QKLrrrcE+Tf9mjgMLdc9y95venrAuGWj0XWM6QGyW95r75U36ve8nDsdg8CAwEA 9 | AaAAMA0GCSqGSIb3DQEBCwUAA4IBAQBfPLtdWWdvzhchcvHX0xl2Lo4huTP8CUjB 10 | 3h04wA3YM/b4qU1V1vVQnKYNc2WSfUTdNFRT/YGwgEQ57YYYqwMfEiTh6t7kaiEH 11 | J5cFvMXcFMJvD0gpopVYTelpZ8xd1AgZ9ze04892BJx+PIRmaCNgDpiesjAxfKXi 12 | jjJH/u6brI3hKSJ97us3RA8RvmEIhCiSREaes3gfuEvqv1hY1nOkUhnncDdBNj2S 13 | /MtNcWKh68BhGKj1hlUckCUW/xQLaoha7X6aj03HaXb4LsRRdc6sVE4IZVKCh4cX 14 | 1sefwCKN5hXcWBVOnnFrJoSrIuKTHMgPbZGBQTci6yIv73Jha+wI 15 | -----END CERTIFICATE REQUEST----- 16 | -------------------------------------------------------------------------------- /petstore/petstore-build/openvpn-data/pki/reqs/localvpn.req: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIICWDCCAUACAQAwEzERMA8GA1UEAwwIbG9jYWx2cG4wggEiMA0GCSqGSIb3DQEB 3 | AQUAA4IBDwAwggEKAoIBAQDXg7TcSmHVI9mJ4O+Bf5KUobyFNIlSoXgx9P7xBcn3 4 | Wve/6hmhlzouLkM15Iu3CO7weJbe4vb//GZBipMJLlwGayK+s3Tw1HPhho8Nr51e 5 | Vo9KTWf7WoGmyeTwM6+FQk2bxCq3SB7p4pXYR3lLpTIaPOTW6smBrZrf04htUKsZ 6 | gbxe6RupS2XdF19KcRoXFJwbgOfpZNEWf7c6B0+fTa3lkmOM2xB8mQF1d9f/DkbD 7 | RbOEISz25hHu6Vl+tsgrNN6jrB6g7LZy3JLgFAT/6c+U+TZk6o3GY9KyGlU8f8iR 8 | SeNCeELrjfTtvw5u7s4WyJftv6YgKB4vlBfPW1B6ZZsXAgMBAAGgADANBgkqhkiG 9 | 9w0BAQsFAAOCAQEAN0Xg4KkQ1UC+yu+j7wefvu2roO8zmQAmWWZCw2tMf+xCHEVk 10 | NG6Q5+ihTN1hdFLHcEgDB+doyX2J0uO6QTLQb1aJn1q5yR3JPB6uTr0AaSFkh3YQ 11 | K/IgAZh5uECQAJbPtcqpJEItPWeU0/36YD1oOyvCZXxHyzxqRSTBVh/KtTuv79J7 12 | ItvdD/W9QfmC7bjXacvKwjoC4J+r4k6Sm2b6rOltKRTaYa/PT6bbxeth961Ij1FZ 13 | rh1S7m898REYsTjnqx+DSpnaJinxYTU/uNEhT5LN6OrOT+hl7g8zRUzKJ7C9BO4H 14 | 8vz+CBWlpqeaNKoZSC8DOr1Nr2pPDTJZqXTi8g== 15 | -----END CERTIFICATE REQUEST----- 16 | -------------------------------------------------------------------------------- /petstore/petstore-build/openvpn-data/pki/serial: -------------------------------------------------------------------------------- 1 | 03 2 | -------------------------------------------------------------------------------- /petstore/petstore-build/openvpn-data/pki/serial.old: -------------------------------------------------------------------------------- 1 | 02 2 | -------------------------------------------------------------------------------- /petstore/petstore-build/openvpn-data/pki/ta.key: -------------------------------------------------------------------------------- 1 | # 2 | # 2048 bit OpenVPN static key 3 | # 4 | -----BEGIN OpenVPN Static key V1----- 5 | 02cef6e9dd4f8e5c738f4d197b90fcea 6 | 62312b56ed88f771f9d06017cdbd2ea6 7 | 26a20a9c6b1ea47da254037d58e9163d 8 | c69cf547f0cb624dd2f55599f7adf38d 9 | 08cc62958bc33ca910e9f0c54c1eeec0 10 | 1c978325d62209fd107ec8aee33638dd 11 | b9607708312b8a0769f42eec65e6107f 12 | be5c702d55d85a6292eaa594cc172f89 13 | 3425a5d045362fa8293610c63658ffbb 14 | 1da9f1eb21cfda8dbb117ba7e73d1cf9 15 | cba347dd2ee22bc08131aa2017ae8ede 16 | b0f3d8c05476ed459db06de39d8af861 17 | fd3b18c55a8a24af72787e370cbfab6e 18 | 5ce21278a3b52af049b21aecda46694f 19 | fc5f5ccf29f2fd377b428383063fcb4e 20 | 44e0b4ec5d27d13457ba169625c1aef6 21 | -----END OpenVPN Static key V1----- 22 | -------------------------------------------------------------------------------- /petstore/petstore-build/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | com.feiyangedu.springcloud 5 | petstore-build 6 | 0.0.1-SNAPSHOT 7 | pom 8 | Petstore Build 9 | 10 | 11 | ../petstore-clients/account-client 12 | ../petstore-account 13 | ../petstore-batch 14 | ../petstore-common 15 | ../petstore-config 16 | ../petstore-eureka 17 | ../petstore-gateway 18 | ../petstore-parent 19 | ../petstore-product 20 | ../petstore-search 21 | ../petstore-support 22 | ../petstore-web 23 | ../petstore-zipkin 24 | 25 | 26 | -------------------------------------------------------------------------------- /petstore/petstore-clients/account-client/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.itranswarp.petstore.api.client 7 | account-client 8 | 0.0.1-SNAPSHOT 9 | jar 10 | account-client 11 | 12 | 13 | UTF-8 14 | 11 15 | 11 16 | 11 17 | 18 | 19 | 20 | 21 | org.springframework 22 | spring-webmvc 23 | 24 | 25 | junit 26 | junit 27 | test 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /petstore/petstore-clients/account-client/src/main/java/io/swagger/api/client/account/AccountClient.java: -------------------------------------------------------------------------------- 1 | package io.swagger.api.client.account; 2 | 3 | import io.swagger.api.client.account.model.*; 4 | 5 | import org.springframework.web.bind.annotation.*; 6 | 7 | /** 8 | * Petstore Sample Application on Spring Cloud 9 | * 10 | * Auto-generated by api-client-codegen. 11 | */ 12 | public interface AccountClient { 13 | 14 | static final String NAME = "account"; 15 | 16 | 17 | @RequestMapping(value="/api/account/users", method=RequestMethod.GET) 18 | Page getUsers(@RequestParam(value="page", defaultValue="0", required=false) Integer page); 19 | 20 | 21 | @RequestMapping(value="/api/account/users", method=RequestMethod.POST) 22 | User createUser(@RequestBody(required=true) UserBean bean); 23 | 24 | 25 | @RequestMapping(value="/api/account/users/{id}", method=RequestMethod.GET) 26 | User getUser(@PathVariable(value="id", required=true) String id); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /petstore/petstore-clients/account-client/src/main/java/io/swagger/api/client/account/model/Sort.java: -------------------------------------------------------------------------------- 1 | package io.swagger.api.client.account.model; 2 | 3 | /** 4 | * Petstore Sample Application on Spring Cloud 5 | * 6 | * Auto-generated by api-client-codegen. 7 | */ 8 | public class Sort { 9 | 10 | 11 | } 12 | -------------------------------------------------------------------------------- /petstore/petstore-clients/account-client/src/main/java/io/swagger/api/client/account/model/UserBean.java: -------------------------------------------------------------------------------- 1 | package io.swagger.api.client.account.model; 2 | 3 | /** 4 | * Petstore Sample Application on Spring Cloud 5 | * 6 | * Auto-generated by api-client-codegen. 7 | */ 8 | public class UserBean { 9 | 10 | 11 | private java.time.LocalDate birth; 12 | 13 | public java.time.LocalDate getBirth() { 14 | return this.birth; 15 | } 16 | 17 | public void setBirth(java.time.LocalDate birth) { 18 | this.birth = birth; 19 | } 20 | private String email; 21 | 22 | public String getEmail() { 23 | return this.email; 24 | } 25 | 26 | public void setEmail(String email) { 27 | this.email = email; 28 | } 29 | private String gender; 30 | 31 | public String getGender() { 32 | return this.gender; 33 | } 34 | 35 | public void setGender(String gender) { 36 | this.gender = gender; 37 | } 38 | private String name; 39 | 40 | public String getName() { 41 | return this.name; 42 | } 43 | 44 | public void setName(String name) { 45 | this.name = name; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /petstore/petstore-clients/gen-account-client.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | java -jar ../api-client-codegen/target/api-client-codegen-0.0.1-SNAPSHOT.jar --name=account --url=http://localhost:9001/v2/api-docs 4 | 5 | -------------------------------------------------------------------------------- /petstore/petstore-common/src/main/java/com/feiyangedu/springcloud/petstore/common/constant/Gender.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.common.constant; 2 | 3 | public enum Gender { 4 | 5 | SECRET, MALE, FEMALE 6 | 7 | } 8 | -------------------------------------------------------------------------------- /petstore/petstore-common/src/main/java/com/feiyangedu/springcloud/petstore/common/constant/Role.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.common.constant; 2 | 3 | public interface Role { 4 | 5 | static int ADMIN = 0; 6 | static int EDITOR = 1000; 7 | static int USER = 2000; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /petstore/petstore-common/src/main/java/com/feiyangedu/springcloud/petstore/common/context/NoUserContextException.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.common.context; 2 | 3 | public class NoUserContextException extends RuntimeException { 4 | 5 | public NoUserContextException() { 6 | } 7 | 8 | public NoUserContextException(String message) { 9 | super(message); 10 | } 11 | 12 | public NoUserContextException(Throwable cause) { 13 | super(cause); 14 | } 15 | 16 | public NoUserContextException(String message, Throwable cause) { 17 | super(message, cause); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /petstore/petstore-common/src/main/java/com/feiyangedu/springcloud/petstore/common/context/UserContext.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.common.context; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | public class UserContext implements AutoCloseable { 7 | 8 | static final ThreadLocal> threadLocal = new ThreadLocal<>(); 9 | 10 | public static UserInfo getCurrentUserInfo() { 11 | List list = threadLocal.get(); 12 | return list == null || list.isEmpty() ? null : list.get(list.size() - 1); 13 | } 14 | 15 | public static UserInfo getRequiredCurrentUserInfo() { 16 | UserInfo userInfo = getCurrentUserInfo(); 17 | if (userInfo == null) { 18 | throw new NoUserContextException(); 19 | } 20 | return userInfo; 21 | } 22 | 23 | public UserContext(UserInfo userInfo) { 24 | List list = threadLocal.get(); 25 | if (list == null) { 26 | list = new ArrayList<>(3); 27 | threadLocal.set(list); 28 | } 29 | list.add(userInfo); 30 | } 31 | 32 | @Override 33 | public void close() { 34 | List list = threadLocal.get(); 35 | if (list.size() > 1) { 36 | list.remove(list.size() - 1); 37 | } else { 38 | threadLocal.remove(); 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /petstore/petstore-common/src/main/java/com/feiyangedu/springcloud/petstore/common/context/UserInfo.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.common.context; 2 | 3 | import com.feiyangedu.springcloud.petstore.common.constant.Role; 4 | 5 | public class UserInfo { 6 | 7 | public static final UserInfo SYSTEM; 8 | 9 | static { 10 | UserInfo sys = new UserInfo(); 11 | sys.id = "00000000000000000000"; 12 | sys.role = Role.ADMIN; 13 | sys.email = "system@sample.io"; 14 | sys.name = "SYSTEM"; 15 | SYSTEM = sys; 16 | } 17 | 18 | public String id; 19 | 20 | public int role; 21 | 22 | public String email; 23 | 24 | public String name; 25 | 26 | @Override 27 | public String toString() { 28 | return "UserInfo(id=" + id + ", email=" + email + ")"; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /petstore/petstore-common/src/main/java/com/feiyangedu/springcloud/petstore/common/domain/StringIdGenerator.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.common.domain; 2 | 3 | import java.io.Serializable; 4 | 5 | import org.hibernate.engine.spi.SessionImplementor; 6 | import org.hibernate.id.IdentifierGenerator; 7 | 8 | import com.feiyangedu.springcloud.petstore.common.util.IdUtil; 9 | 10 | public class StringIdGenerator implements IdentifierGenerator { 11 | 12 | @Override 13 | public Serializable generate(SessionImplementor s, Object obj) { 14 | return IdUtil.next(); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /petstore/petstore-common/src/main/java/com/feiyangedu/springcloud/petstore/common/exception/APIEntityNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.common.exception; 2 | 3 | public class APIEntityNotFoundException extends APIException { 4 | 5 | static final String CODE = "entity:not_found"; 6 | 7 | public APIEntityNotFoundException() { 8 | super(CODE); 9 | } 10 | 11 | public APIEntityNotFoundException(String message) { 12 | super(CODE, message); 13 | } 14 | 15 | public APIEntityNotFoundException(String message, Throwable cause) { 16 | super(CODE, message, cause); 17 | } 18 | 19 | public APIEntityNotFoundException(Throwable cause) { 20 | super(CODE, "", cause); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /petstore/petstore-common/src/main/java/com/feiyangedu/springcloud/petstore/common/exception/APIException.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.common.exception; 2 | 3 | public class APIException extends RuntimeException { 4 | 5 | public static final String UNKNOWN_INTERNAL_ERROR = "unknown:internal_error"; 6 | 7 | public final String code; 8 | 9 | public APIException(String code) { 10 | super("Unknown internal error."); 11 | this.code = code; 12 | } 13 | 14 | public APIException(String code, String message) { 15 | super(message); 16 | this.code = code; 17 | } 18 | 19 | public APIException(String code, String message, Throwable cause) { 20 | super(message, cause); 21 | this.code = code; 22 | } 23 | 24 | public APIException(Throwable cause) { 25 | super(cause); 26 | this.code = UNKNOWN_INTERNAL_ERROR; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /petstore/petstore-common/src/main/java/com/feiyangedu/springcloud/petstore/common/rest/APIErrorResponse.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.common.rest; 2 | 3 | import com.feiyangedu.springcloud.petstore.common.exception.APIException; 4 | 5 | public class APIErrorResponse { 6 | 7 | public String code; 8 | public String message; 9 | 10 | public APIErrorResponse() { 11 | } 12 | 13 | public APIErrorResponse(APIException e) { 14 | this.code = e.code; 15 | this.message = e.getMessage(); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /petstore/petstore-common/src/main/java/com/feiyangedu/springcloud/petstore/common/rest/RestExceptionHandler.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.common.rest; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.web.bind.annotation.ExceptionHandler; 5 | import org.springframework.web.bind.annotation.ResponseStatus; 6 | import org.springframework.web.bind.annotation.RestControllerAdvice; 7 | 8 | import com.feiyangedu.springcloud.petstore.common.exception.APIException; 9 | 10 | @RestControllerAdvice 11 | public class RestExceptionHandler { 12 | 13 | @ExceptionHandler(Exception.class) 14 | @ResponseStatus(HttpStatus.BAD_REQUEST) 15 | public APIErrorResponse handleRestException(Exception ex) { 16 | APIException e = null; 17 | if (ex instanceof APIException) { 18 | e = (APIException) ex; 19 | } else { 20 | e = new APIException(APIException.UNKNOWN_INTERNAL_ERROR, ex.getMessage(), ex); 21 | } 22 | return new APIErrorResponse(e); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /petstore/petstore-common/src/main/java/com/feiyangedu/springcloud/petstore/common/rest/RestFeignClientConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.common.rest; 2 | 3 | import org.springframework.beans.factory.annotation.Value; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | 7 | import feign.Logger; 8 | import feign.codec.ErrorDecoder; 9 | 10 | @Configuration 11 | public class RestFeignClientConfiguration { 12 | 13 | @Value("${spring.feign.logger.level:BASIC}") 14 | String loggerLevel; 15 | 16 | @Bean 17 | public ErrorDecoder feignErrorDecoder() { 18 | return new RestErrorDecoder(); 19 | } 20 | 21 | @Bean 22 | Logger.Level feignLoggerLevel() { 23 | return Logger.Level.valueOf(loggerLevel); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /petstore/petstore-common/src/main/java/com/feiyangedu/springcloud/petstore/common/service/AbstractService.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.common.service; 2 | 3 | import org.apache.commons.logging.Log; 4 | import org.apache.commons.logging.LogFactory; 5 | 6 | import com.feiyangedu.springcloud.petstore.common.exception.APIEntityNotFoundException; 7 | 8 | public abstract class AbstractService { 9 | 10 | protected final int DEFAULT_PAGE_SIZE = 20; 11 | 12 | protected final Log log = LogFactory.getLog(getClass()); 13 | 14 | protected T checkNonNull(T entity) { 15 | if (entity == null) { 16 | throw new APIEntityNotFoundException("Entity is null"); 17 | } 18 | return entity; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /petstore/petstore-common/src/main/java/com/feiyangedu/springcloud/petstore/common/util/CookieUtil.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.common.util; 2 | 3 | import javax.servlet.http.Cookie; 4 | import javax.servlet.http.HttpServletRequest; 5 | import javax.servlet.http.HttpServletResponse; 6 | 7 | import org.apache.commons.logging.Log; 8 | import org.apache.commons.logging.LogFactory; 9 | 10 | public interface CookieUtil { 11 | 12 | public final String AUTH_COOKIE_NAME = "auth"; 13 | 14 | final Log log = LogFactory.getLog(CookieUtil.class); 15 | 16 | public static String getAuthTokenFromCookie(HttpServletRequest request) { 17 | Cookie[] cookies = request.getCookies(); 18 | if (cookies != null) { 19 | for (Cookie cookie : cookies) { 20 | if (AUTH_COOKIE_NAME.equals(cookie.getName())) { 21 | String s = cookie.getValue(); 22 | log.info("Found auth token from cookie: " + s); 23 | return s; 24 | } 25 | } 26 | } 27 | return null; 28 | } 29 | 30 | public static void removeAuthTokenFromCookie(HttpServletResponse response) { 31 | Cookie cookie = new Cookie(AUTH_COOKIE_NAME, "deleted"); 32 | cookie.setMaxAge(0); 33 | cookie.setPath("/"); 34 | cookie.setHttpOnly(true); 35 | response.addCookie(cookie); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /petstore/petstore-config-files/account.yml: -------------------------------------------------------------------------------- 1 | # account service 2 | -------------------------------------------------------------------------------- /petstore/petstore-config-files/application-native.yml: -------------------------------------------------------------------------------- 1 | # native profile 2 | 3 | spring: 4 | jpa: 5 | show-sql: true 6 | properties: 7 | javax: 8 | persistence: 9 | schema-generation: 10 | create-source: metadata 11 | scripts: 12 | action: create 13 | create-target: /tmp/${spring.application.name}-init.sql 14 | hibernate: 15 | dialect: org.hibernate.dialect.MySQL5Dialect 16 | -------------------------------------------------------------------------------- /petstore/petstore-config-files/gateway.yml: -------------------------------------------------------------------------------- 1 | # gateway configuration 2 | 3 | zuul: 4 | ignoredServices: "*" 5 | routes: 6 | account: 7 | serviceId: account 8 | path: /api/account/** 9 | stripPrefix: false 10 | -------------------------------------------------------------------------------- /petstore/petstore-config-files/web-native.yml: -------------------------------------------------------------------------------- 1 | # web ui service 2 | 3 | pebble: 4 | cache: false 5 | -------------------------------------------------------------------------------- /petstore/petstore-config-files/web-production.yml: -------------------------------------------------------------------------------- 1 | # web ui service 2 | 3 | pebble: 4 | cache: true 5 | -------------------------------------------------------------------------------- /petstore/petstore-config-files/web.yml: -------------------------------------------------------------------------------- 1 | # web ui service 2 | -------------------------------------------------------------------------------- /petstore/petstore-config-files/zipkin.yml: -------------------------------------------------------------------------------- 1 | # zipkin server 2 | 3 | spring: 4 | sleuth: 5 | # do not trace zipkin server itself: 6 | enabled: false 7 | #refer to org.springframework.cloud.sleuth.instrument.hystrix.SleuthHystrixAutoConfiguration.java 8 | hystrix: 9 | strategy: 10 | enabled: false 11 | zipkin: 12 | storage: 13 | # type: mem, mysql 14 | type: mem 15 | -------------------------------------------------------------------------------- /petstore/petstore-config/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | com.feiyangedu.springcloud 7 | petstore-parent 8 | 1.0-SNAPSHOT 9 | ../petstore-parent/pom.xml 10 | 11 | 12 | petstore-config 13 | jar 14 | petstore-config 15 | 16 | 17 | 18 | 19 | org.springframework.cloud 20 | spring-cloud-config-server 21 | 22 | 23 | 24 | 25 | 26 | 27 | org.springframework.boot 28 | spring-boot-maven-plugin 29 | 30 | 31 | com.spotify 32 | docker-maven-plugin 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /petstore/petstore-config/src/main/java/com/feiyangedu/springcloud/petstore/config/ConfigServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.config; 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.cloud.config.server.EnableConfigServer; 7 | 8 | @EnableConfigServer 9 | @EnableDiscoveryClient 10 | @SpringBootApplication 11 | public class ConfigServerApplication { 12 | 13 | public static void main(String[] args) { 14 | SpringApplication.run(ConfigServerApplication.class, args); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /petstore/petstore-config/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | # config server port: 2 | server: 3 | port: 8888 4 | 5 | spring: 6 | application: 7 | name: config-server 8 | profiles: 9 | active: ${ENV:native} 10 | 11 | encrypt: 12 | # encrypted key from env or using default: 13 | key: ${SPRING_ENCRYPT_KEY:SecretKey4PetStore} 14 | 15 | eureka: 16 | instance: 17 | preferIpAddress: true 18 | client: 19 | serviceUrl: 20 | defaultZone: http://${EUREKA_IP:172.27.0.201}:8761/eureka/ 21 | 22 | --- 23 | 24 | # native configuration: 25 | 26 | spring: 27 | profiles: native 28 | cloud: 29 | config: 30 | server: 31 | native: 32 | search-locations: file:../petstore-config-files, file:/etc/petstore-config-files 33 | 34 | --- 35 | 36 | # 定义一个test profiles,使用git配置: 37 | 38 | spring: 39 | profiles: test 40 | cloud: 41 | config: 42 | server: 43 | git: 44 | uri: https://github.com/michaelliao/springcloud-config.git 45 | -------------------------------------------------------------------------------- /petstore/petstore-eureka/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | 7 | com.feiyangedu.springcloud 8 | petstore-parent 9 | 1.0-SNAPSHOT 10 | ../petstore-parent/pom.xml 11 | 12 | 13 | petstore-eureka 14 | jar 15 | petstore-eureka 16 | 17 | 18 | 19 | 20 | org.springframework.cloud 21 | spring-cloud-starter-netflix-eureka-server 22 | 23 | 24 | 25 | 26 | 27 | 28 | org.springframework.boot 29 | spring-boot-maven-plugin 30 | 31 | 32 | com.spotify 33 | docker-maven-plugin 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /petstore/petstore-eureka/src/main/java/com/feiyangedu/springcloud/petstore/eureka/EurekaServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.eureka; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; 6 | 7 | @SpringBootApplication 8 | @EnableEurekaServer 9 | public class EurekaServerApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(EurekaServerApplication.class, args); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /petstore/petstore-eureka/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: eureka 4 | 5 | # default eureka server port: 6 | 7 | server: 8 | port: 8761 9 | 10 | eureka: 11 | client: 12 | registerWithEureka: false 13 | fetchRegistry: false 14 | server: 15 | enableSelfPreservation: false 16 | 17 | --- 18 | 19 | spring: 20 | profiles: peer1 21 | 22 | server: 23 | port: 8761 24 | 25 | eureka: 26 | instance: 27 | hostname: eureka-1 28 | client: 29 | registerWithEureka: true 30 | fetchRegistry: true 31 | serviceUrl: 32 | defaultZone: http://eureka-2:8762/eureka/ 33 | server: 34 | enableSelfPreservation: true 35 | 36 | --- 37 | 38 | spring: 39 | profiles: peer2 40 | 41 | server: 42 | port: 8762 43 | 44 | eureka: 45 | instance: 46 | hostname: eureka-2 47 | client: 48 | registerWithEureka: true 49 | fetchRegistry: true 50 | serviceUrl: 51 | defaultZone: http://eureka-1:8761/eureka/ 52 | server: 53 | enableSelfPreservation: true 54 | -------------------------------------------------------------------------------- /petstore/petstore-gateway/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | com.feiyangedu.springcloud 7 | petstore-parent 8 | 1.0-SNAPSHOT 9 | ../petstore-parent/pom.xml 10 | 11 | 12 | petstore-gateway 13 | jar 14 | petstore-gateway 15 | 16 | 17 | 18 | com.feiyangedu.springcloud 19 | petstore-common 20 | ${project.version} 21 | 22 | 23 | org.springframework.cloud 24 | spring-cloud-starter-zuul 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /petstore/petstore-gateway/src/main/java/com/feiyangedu/springcloud/petstore/gateway/GatewayApplication.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.gateway; 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.cloud.netflix.zuul.EnableZuulProxy; 7 | 8 | @EnableZuulProxy 9 | @EnableDiscoveryClient 10 | @SpringBootApplication 11 | public class GatewayApplication { 12 | 13 | public static void main(String[] args) { 14 | SpringApplication.run(GatewayApplication.class, args); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /petstore/petstore-gateway/src/main/java/com/feiyangedu/springcloud/petstore/gateway/filter/IpFilter.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.gateway.filter; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | 5 | import org.apache.commons.logging.Log; 6 | import org.apache.commons.logging.LogFactory; 7 | import org.springframework.stereotype.Component; 8 | 9 | import com.netflix.zuul.ZuulFilter; 10 | import com.netflix.zuul.context.RequestContext; 11 | 12 | /** 13 | * Check ip blacklist. 14 | * 15 | * @author Michael Liao 16 | */ 17 | @Component 18 | public class IpFilter extends ZuulFilter { 19 | 20 | final Log log = LogFactory.getLog(getClass()); 21 | 22 | @Override 23 | public String filterType() { 24 | return "pre"; 25 | } 26 | 27 | @Override 28 | public boolean shouldFilter() { 29 | return true; 30 | } 31 | 32 | @Override 33 | public Object run() { 34 | RequestContext ctx = RequestContext.getCurrentContext(); 35 | HttpServletRequest request = ctx.getRequest(); 36 | log.info(String.format("%s: %s", request.getMethod(), request.getRequestURI())); 37 | return null; 38 | } 39 | 40 | @Override 41 | public int filterOrder() { 42 | return 1; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /petstore/petstore-gateway/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: gateway 4 | profiles: 5 | active: ${PROFILES:native} 6 | cloud: 7 | config: 8 | uri: http://${CONFIG_IP:172.27.0.202}:8888 9 | fail-fast: true 10 | -------------------------------------------------------------------------------- /petstore/petstore-parent/Dockerfile: -------------------------------------------------------------------------------- 1 | # use openjdk as base image 2 | # check https://hub.docker.com/_/openjdk/ 3 | FROM openjdk:8-jre 4 | 5 | # the executable jar file packaged by Spring Boot: 6 | ARG jarfile 7 | 8 | VOLUME /tmp 9 | 10 | COPY $jarfile app.jar 11 | 12 | CMD ["sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar app.jar"] 13 | -------------------------------------------------------------------------------- /petstore/petstore-product/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | com.feiyangedu.springcloud 7 | petstore-parent 8 | 1.0-SNAPSHOT 9 | ../petstore-parent/pom.xml 10 | 11 | 12 | petstore-product 13 | jar 14 | petstore-product 15 | 16 | 17 | 18 | com.feiyangedu.springcloud 19 | petstore-common 20 | ${project.version} 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /petstore/petstore-product/src/main/java/com/feiyangedu/springcloud/petstore/user/ProductApplication.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.user; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class ProductApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(ProductApplication.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /petstore/petstore-product/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: product 4 | profiles: 5 | active: ${PROFILES:native} 6 | cloud: 7 | config: 8 | uri: http://${CONFIG_IP:172.27.0.202}:8888 9 | fail-fast: true 10 | -------------------------------------------------------------------------------- /petstore/petstore-search/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | com.feiyangedu.springcloud 7 | petstore-parent 8 | 1.0-SNAPSHOT 9 | ../petstore-parent/pom.xml 10 | 11 | 12 | petstore-search 13 | jar 14 | petstore-search 15 | 16 | 17 | 18 | org.springframework.cloud 19 | spring-cloud-starter-config 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /petstore/petstore-search/src/main/java/com/feiyangedu/springcloud/petstore/search/SearchApplication.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.search; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 6 | 7 | @SpringBootApplication 8 | @EnableDiscoveryClient 9 | public class SearchApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(SearchApplication.class, args); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /petstore/petstore-search/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: search 4 | profiles: 5 | active: ${PROFILES:native} 6 | cloud: 7 | config: 8 | uri: http://${CONFIG_IP:172.27.0.202}:8888 9 | fail-fast: true 10 | -------------------------------------------------------------------------------- /petstore/petstore-support/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | com.feiyangedu.springcloud 7 | petstore-parent 8 | 1.0-SNAPSHOT 9 | ../petstore-parent/pom.xml 10 | 11 | 12 | petstore-support 13 | jar 14 | petstore-support 15 | 16 | 17 | 18 | com.feiyangedu.springcloud 19 | petstore-common 20 | ${project.version} 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /petstore/petstore-support/src/main/java/com/feiyangedu/springcloud/petstore/support/SupportApplication.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.support; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SupportApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SupportApplication.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /petstore/petstore-support/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: support 4 | profiles: 5 | active: ${PROFILES:native} 6 | cloud: 7 | config: 8 | uri: http://${CONFIG_IP:172.27.0.202}:8888 9 | fail-fast: true 10 | -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/java/com/feiyangedu/springcloud/petstore/web/client/AccountFeignClient.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.web.client; 2 | 3 | import org.springframework.cloud.netflix.feign.FeignClient; 4 | 5 | import com.feiyangedu.springcloud.petstore.common.rest.RestFeignClientConfiguration; 6 | 7 | import io.swagger.api.client.account.AccountClient; 8 | 9 | @FeignClient(name = AccountClient.NAME, configuration = RestFeignClientConfiguration.class) 10 | public interface AccountFeignClient extends AccountClient { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/java/com/feiyangedu/springcloud/petstore/web/mvc/UIController.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.web.mvc; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.servlet.ModelAndView; 9 | 10 | @Controller 11 | public class UIController { 12 | 13 | @GetMapping("/") 14 | public ModelAndView index() { 15 | return mv("index"); 16 | } 17 | 18 | ModelAndView mv(String view) { 19 | return mv(view, null); 20 | } 21 | 22 | ModelAndView mv(String view, Map model) { 23 | if (model == null) { 24 | model = new HashMap<>(); 25 | } 26 | model.put("__time__", System.currentTimeMillis()); 27 | return new ModelAndView(view, model); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/java/com/feiyangedu/springcloud/petstore/web/mvc/UserController.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.web.mvc; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | import org.springframework.web.bind.annotation.PathVariable; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | import com.feiyangedu.springcloud.petstore.web.client.AccountFeignClient; 9 | 10 | import io.swagger.api.client.account.model.Page; 11 | import io.swagger.api.client.account.model.User; 12 | 13 | @RestController 14 | public class UserController { 15 | 16 | @Autowired 17 | AccountFeignClient accountClient; 18 | 19 | @GetMapping("/getUsers") 20 | public Page getUsers() { 21 | return accountClient.getUsers(0); 22 | } 23 | 24 | @GetMapping("/getUser/{id}") 25 | public User getUser(@PathVariable("id") String id) { 26 | return accountClient.getUser(id); 27 | } 28 | 29 | @GetMapping("/getUser2") 30 | public String getUser() { 31 | try { 32 | accountClient.getUser("1b65nvt1k56u106000pp"); 33 | } catch (Exception e) { 34 | e.printStackTrace(); 35 | return "ex"; 36 | } 37 | return "ok"; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: web 4 | profiles: 5 | active: ${PROFILES:native} 6 | cloud: 7 | config: 8 | uri: http://${CONFIG_IP:172.27.0.202}:8888 9 | fail-fast: true 10 | -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/css/.gitignore: -------------------------------------------------------------------------------- 1 | # ignore generated css: 2 | main.css 3 | 4 | -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/petstore/petstore-web/src/main/resources/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/petstore/petstore-web/src/main/resources/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/petstore/petstore-web/src/main/resources/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/petstore/petstore-web/src/main/resources/static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/src/less/components/upload.less: -------------------------------------------------------------------------------- 1 | // Name: Upload 2 | // Description: Provides a dragover state for uploads 3 | // 4 | // Component: `uk-upload` 5 | // 6 | // States: `uk-dragover` 7 | // 8 | // ======================================================================== 9 | 10 | 11 | // Variables 12 | // ======================================================================== 13 | 14 | @uk-upload-dragover-box-shadow: rgba(100,100,100,0.3); 15 | @uk-upload-dragover-box-shadow-blur: 20px; 16 | 17 | 18 | /* ======================================================================== 19 | Component: Upload 20 | ========================================================================== */ 21 | 22 | /* 23 | * Create a box-shadow when dragging a file over the upload area 24 | */ 25 | 26 | .uk-dragover { box-shadow: 0 0 @uk-upload-dragover-box-shadow-blur @uk-upload-dragover-box-shadow; } 27 | 28 | 29 | // Hooks 30 | // ======================================================================== 31 | 32 | .hook-upload-misc; 33 | 34 | .hook-upload-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/src/less/core/switcher.less: -------------------------------------------------------------------------------- 1 | // Name: Switcher 2 | // Description: Defines styles for the switcher 3 | // 4 | // Component: `uk-switcher` 5 | // 6 | // States: `uk-active` 7 | // 8 | // ======================================================================== 9 | 10 | 11 | /* ======================================================================== 12 | Component: Switcher 13 | ========================================================================== */ 14 | 15 | /* 16 | * 1. Deactivate browser history navigation in IE11 17 | */ 18 | .uk-switcher { 19 | margin: 0; 20 | padding: 0; 21 | list-style: none; 22 | /* 1 */ 23 | touch-action: cross-slide-y pinch-zoom double-tap-zoom; 24 | } 25 | 26 | /* 27 | * Items 28 | */ 29 | 30 | .uk-switcher > :not(.uk-active) { display: none; } 31 | 32 | 33 | // Hooks 34 | // ======================================================================== 35 | 36 | .hook-switcher-misc; 37 | 38 | .hook-switcher-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/src/less/core/variables.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Variables 3 | // Description: Defines all color and style related values as variables 4 | // to allow easy customization for the most common cases. 5 | // 6 | // ======================================================================== 7 | 8 | 9 | // Global variables 10 | // ======================================================================== 11 | 12 | // 13 | // Breakpoints 14 | // 15 | @breakpoint-small: 480px; 16 | @breakpoint-medium: 768px; 17 | @breakpoint-large: 960px; 18 | @breakpoint-xlarge: 1220px; 19 | 20 | @breakpoint-mini-max: (@breakpoint-small - 1); 21 | @breakpoint-small-max: (@breakpoint-medium - 1); 22 | @breakpoint-medium-max: (@breakpoint-large - 1); 23 | @breakpoint-large-max: (@breakpoint-xlarge - 1); 24 | -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/almost-flat/block.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Block 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @block-default-background: @global-background; 11 | 12 | 13 | // Component 14 | // ======================================================================== 15 | 16 | .hook-block() {} 17 | 18 | 19 | // Color modifier 20 | // ======================================================================== 21 | 22 | .hook-block-default() {} 23 | 24 | .hook-block-muted() {} 25 | 26 | .hook-block-secondary() {} 27 | 28 | .hook-block-primary() {} 29 | 30 | 31 | // Miscellaneous 32 | // ======================================================================== 33 | 34 | .hook-block-misc() { 35 | 36 | /* 37 | * Adjust padding between equal colored blocks 38 | */ 39 | 40 | .uk-block-default + .uk-block-default, 41 | .uk-block-muted + .uk-block-muted, 42 | .uk-block-primary + .uk-block-primary, 43 | .uk-block-secondary + .uk-block-secondary { padding-top: 0; } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/almost-flat/breadcrumb.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Breadcrumb 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @breadcrumb-disabled-color: @global-muted-color; 11 | 12 | 13 | // Component 14 | // ======================================================================== 15 | 16 | .hook-breadcrumb() {} 17 | 18 | 19 | // Items 20 | // ======================================================================== 21 | 22 | .hook-breadcrumb-divider() {} 23 | 24 | 25 | // Miscellaneous 26 | // ======================================================================== 27 | 28 | .hook-breadcrumb-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/almost-flat/close.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Close 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @close-alt-background: @global-background; 11 | 12 | 13 | // Component 14 | // ======================================================================== 15 | 16 | .hook-close() {} 17 | 18 | 19 | // Modifier: `uk-close-alt` 20 | // ======================================================================== 21 | 22 | .hook-close-alt() { 23 | box-shadow: 0 0 0 1px rgba(0,0,0,0.1), 24 | 0 0 6px rgba(0,0,0,0.3); 25 | } 26 | 27 | 28 | // Miscellaneous 29 | // ======================================================================== 30 | 31 | .hook-close-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/almost-flat/column.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Column 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @column-gutter: @global-grid-gutter; 11 | 12 | 13 | // Component 14 | // ======================================================================== 15 | 16 | .hook-column() {} 17 | 18 | 19 | // Miscellaneous 20 | // ======================================================================== 21 | 22 | .hook-column-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/almost-flat/description-list.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Description list 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @description-list-line-border: @global-border; 11 | @description-list-line-color: @global-muted-color; 12 | 13 | 14 | // Miscellaneous 15 | // ======================================================================== 16 | 17 | .hook-description-list-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/almost-flat/dotnav.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Dotnav 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | 11 | // Component 12 | // ======================================================================== 13 | 14 | .hook-dotnav-item() { 15 | -webkit-transition: all 0.2s ease-in-out; 16 | transition: all 0.2s ease-in-out; 17 | } 18 | 19 | .hook-dotnav-item-hover() {} 20 | 21 | .hook-dotnav-item-onclick() {} 22 | 23 | .hook-dotnav-item-active() { 24 | -webkit-transform: scale(1.3); 25 | transform: scale(1.3); 26 | } 27 | 28 | .hook-dotnav-contrast-item() {} 29 | 30 | .hook-dotnav-contrast-item-hover() {} 31 | 32 | .hook-dotnav-contrast-item-onclick() {} 33 | 34 | .hook-dotnav-contrast-item-active() {} 35 | 36 | 37 | // Miscellaneous 38 | // ======================================================================== 39 | 40 | .hook-dotnav-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/almost-flat/form-advanced.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Form advanced 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Component 8 | // ======================================================================== 9 | 10 | .hook-form-advanced() {} 11 | 12 | .hook-form-advanced-checked() {} 13 | 14 | .hook-form-advanced-radio() {} 15 | 16 | .hook-form-advanced-checkbox() {} 17 | 18 | .hook-form-advanced-disabled() {} 19 | 20 | 21 | // Miscellaneous 22 | // ======================================================================== 23 | 24 | .hook-form-advanced-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/almost-flat/form-password.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Form password 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @form-password-font-size: @global-font-size - 1px; 11 | @form-password-line-height: @form-password-font-size; 12 | @form-password-color: @global-muted-color; 13 | @form-password-hover-color: @global-muted-color; 14 | 15 | 16 | // Miscellaneous 17 | // ======================================================================== 18 | 19 | .hook-form-password-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/almost-flat/grid.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Grid 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @grid-gutter-horizontal: @global-grid-gutter; 11 | @grid-gutter-vertical: @global-grid-gutter; 12 | 13 | @grid-gutter-large-horizontal: @global-grid-gutter-large; 14 | @grid-gutter-large-vertical: @global-grid-gutter-large; 15 | 16 | @grid-gutter-xlarge-horizontal: @global-grid-gutter-xlarge; 17 | @grid-gutter-xlarge-vertical: @global-grid-gutter-xlarge; 18 | 19 | @grid-divider-border: @global-border; 20 | 21 | 22 | // Miscellaneous 23 | // ======================================================================== 24 | 25 | .hook-grid-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/almost-flat/list.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: List 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @list-line-border: @global-border; 11 | 12 | @list-striped-background: #fafafa; 13 | 14 | // 15 | // New 16 | // 17 | 18 | @list-striped-border: @global-border; 19 | 20 | 21 | // Modifier: `list-line` 22 | // ======================================================================== 23 | 24 | .hook-list-line() {} 25 | 26 | 27 | // Modifier: `list-striped` 28 | // ======================================================================== 29 | 30 | .hook-list-striped() { border-bottom: 1px solid @list-striped-border; } 31 | 32 | 33 | // Miscellaneous 34 | // ======================================================================== 35 | 36 | .hook-list-misc() { 37 | 38 | .uk-list-striped > li:first-child { border-top: 1px solid @list-striped-border; } 39 | 40 | } -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/almost-flat/overlay.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Overlay 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @overlay-panel-color: @global-contrast-color; 11 | 12 | @overlay-icon-color: @global-contrast-color; 13 | 14 | 15 | // Sub-object `uk-overlay-panel` 16 | // ======================================================================== 17 | 18 | .hook-overlay-panel() {} 19 | 20 | 21 | // Sub-object `uk-overlay-background` 22 | // ======================================================================== 23 | 24 | .hook-overlay-background() {} 25 | 26 | 27 | // Sub-object `uk-overlay-image` 28 | // ======================================================================== 29 | 30 | .hook-overlay-image() {} 31 | 32 | 33 | // Sub-object `uk-overlay-icon` 34 | // ======================================================================== 35 | 36 | .hook-overlay-icon() {} 37 | 38 | 39 | // Miscellaneous 40 | // ======================================================================== 41 | 42 | .hook-overlay-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/almost-flat/placeholder.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Placeholder 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @placeholder-margin-vertical: @global-margin; 11 | @placeholder-padding: @global-margin; 12 | @placeholder-border: @global-border; 13 | @placeholder-color: @global-color; 14 | 15 | 16 | // Component 17 | // ======================================================================== 18 | 19 | .hook-placeholder() {} 20 | 21 | .hook-placeholder-large() {} 22 | 23 | 24 | // Miscellaneous 25 | // ======================================================================== 26 | 27 | .hook-placeholder-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/almost-flat/slidenav.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Slidenav 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | 11 | // Component 12 | // ======================================================================== 13 | 14 | .hook-slidenav() {} 15 | 16 | .hook-slidenav-hover() {} 17 | 18 | .hook-slidenav-active() {} 19 | 20 | .hook-slidenav-contrast() {} 21 | 22 | .hook-slidenav-contrast-hover() {} 23 | 24 | .hook-slidenav-contrast-active() {} 25 | 26 | 27 | // Miscellaneous 28 | // ======================================================================== 29 | 30 | .hook-slidenav-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/almost-flat/sortable.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Sortable 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @sortable-dragged-z-index: @global-z-index + 50; 11 | 12 | 13 | // Component 14 | // ======================================================================== 15 | 16 | .hook-sortable() {} 17 | 18 | .hook-sortable-dragged() {} 19 | 20 | .hook-sortable-placeholder() {} 21 | 22 | .hook-sortable-over() {} 23 | 24 | 25 | // Miscellaneous 26 | // ======================================================================== 27 | 28 | .hook-sortable-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/almost-flat/sticky.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Sticky 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @sticky-z-index: @global-z-index - 20; 11 | 12 | 13 | // Miscellaneous 14 | // ======================================================================== 15 | 16 | .hook-sticky-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/almost-flat/text.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Text 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @text-small-font-size: round((@global-font-size * 0.78)); // 11px / 12px 11 | @text-small-line-height: round((@text-small-font-size * 1.49)); // 16px / 18px 12 | @text-large-font-size: round((@global-font-size * 1.28)); // 18px / 20px 13 | @text-large-line-height: round((@text-large-font-size * 1.32)); // 24px / 26px 14 | 15 | @text-muted-color: @global-muted-color; 16 | @text-contrast-color: @global-contrast-color; 17 | 18 | 19 | // Miscellaneous 20 | // ======================================================================== 21 | 22 | .hook-text-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/almost-flat/thumbnail.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Thumbnail 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @thumbnail-border: @global-border; 11 | @thumbnail-background: @global-background; 12 | @thumbnail-hover-border: darken(@global-border, 20%); 13 | @thumbnail-hover-background: @global-background; 14 | 15 | @thumbnail-caption-color: @global-color; 16 | 17 | 18 | // Component 19 | // ======================================================================== 20 | 21 | .hook-thumbnail() { 22 | border-radius: @global-border-radius; 23 | } 24 | 25 | .hook-thumbnail-hover() {} 26 | 27 | 28 | // Caption 29 | // ======================================================================== 30 | 31 | .hook-thumbnail-caption() {} 32 | 33 | 34 | // Miscellaneous 35 | // ======================================================================== 36 | 37 | .hook-thumbnail-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/almost-flat/thumbnav.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Thumbnav 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Component 8 | // ======================================================================== 9 | 10 | .hook-thumbnav() {} 11 | 12 | 13 | // Miscellaneous 14 | // ======================================================================== 15 | 16 | .hook-thumbnav-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/almost-flat/tooltip.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Tooltip 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @tooltip-z-index: @global-z-index + 30; 11 | 12 | @tooltip-font-size: round((@global-font-size * 0.85)); // 12px / 14px 13 | @tooltip-line-height: round((@tooltip-font-size * 1.46)); // 18px / 20px 14 | 15 | // 16 | // New 17 | // 18 | 19 | @tooltip-text-shadow: rgba(0,0,0,0.5); 20 | 21 | 22 | // Component 23 | // ======================================================================== 24 | 25 | .hook-tooltip() { 26 | border-radius: 3px; 27 | text-shadow: 0 1px 0 @tooltip-text-shadow; 28 | } 29 | 30 | 31 | // Miscellaneous 32 | // ======================================================================== 33 | 34 | .hook-tooltip-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/accordion.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Accordion 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @accordion-title-margin-bottom: @global-margin; 11 | @accordion-title-padding-horizontal: @global-margin; 12 | @accordion-title-font-size: round((@global-font-size * 1.28)); // 18px / 20px 13 | @accordion-title-line-height: round((@accordion-title-font-size * 1.32)); // 24px / 26px 14 | 15 | 16 | // Component 17 | // ======================================================================== 18 | 19 | .hook-accordion() {} 20 | 21 | 22 | // Modifier: `uk-accordion-title` 23 | // ======================================================================== 24 | 25 | .hook-accordion-title() {} 26 | 27 | 28 | // Modifier: `uk-accordion-content` 29 | // ======================================================================== 30 | 31 | .hook-accordion-content() {} 32 | 33 | 34 | // Miscellaneous 35 | // ======================================================================== 36 | 37 | .hook-accordion-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/alert.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Alert 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @alert-margin-vertical: @global-margin; 11 | 12 | 13 | // Component 14 | // ======================================================================== 15 | 16 | .hook-alert() {} 17 | 18 | 19 | // Modifier: `uk-alert-success` 20 | // ======================================================================== 21 | 22 | .hook-alert-success() {} 23 | 24 | 25 | // Modifier: `uk-alert-warning` 26 | // ======================================================================== 27 | 28 | .hook-alert-warning() {} 29 | 30 | 31 | // Modifier: `uk-alert-danger` 32 | // ======================================================================== 33 | 34 | .hook-alert-danger() {} 35 | 36 | 37 | // Miscellaneous 38 | // ======================================================================== 39 | 40 | .hook-alert-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/autocomplete.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Autocomplete 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @nav-autocomplete-color: @global-color; 11 | @nav-autocomplete-active-background: @global-primary-background; 12 | @nav-autocomplete-active-color: @global-contrast-color; 13 | @nav-autocomplete-header-color: @global-muted-color; 14 | @nav-autocomplete-divider-border: @global-border; 15 | 16 | 17 | // Component 18 | // ======================================================================== 19 | 20 | .hook-nav-autocomplete() {} 21 | 22 | .hook-nav-autocomplete-active() {} 23 | 24 | .hook-nav-autocomplete-header() {} 25 | 26 | .hook-nav-autocomplete-divider() {} 27 | 28 | 29 | // Miscellaneous 30 | // ======================================================================== 31 | 32 | .hook-autocomplete-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/block.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Block 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @block-default-background: @global-background; 11 | 12 | 13 | // Component 14 | // ======================================================================== 15 | 16 | .hook-block() {} 17 | 18 | 19 | // Color modifier 20 | // ======================================================================== 21 | 22 | .hook-block-default() {} 23 | 24 | .hook-block-muted() {} 25 | 26 | .hook-block-secondary() {} 27 | 28 | .hook-block-primary() {} 29 | 30 | 31 | // Miscellaneous 32 | // ======================================================================== 33 | 34 | .hook-block-misc() { 35 | 36 | /* 37 | * Adjust padding between equal colored blocks 38 | */ 39 | 40 | .uk-block-default + .uk-block-default, 41 | .uk-block-muted + .uk-block-muted, 42 | .uk-block-primary + .uk-block-primary, 43 | .uk-block-secondary + .uk-block-secondary { padding-top: 0; } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/breadcrumb.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Breadcrumb 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @breadcrumb-disabled-color: @global-muted-color; 11 | 12 | 13 | // Component 14 | // ======================================================================== 15 | 16 | .hook-breadcrumb() {} 17 | 18 | 19 | // Items 20 | // ======================================================================== 21 | 22 | .hook-breadcrumb-divider() {} 23 | 24 | 25 | // Miscellaneous 26 | // ======================================================================== 27 | 28 | .hook-breadcrumb-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/close.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Close 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Component 8 | // ======================================================================== 9 | 10 | .hook-close() {} 11 | 12 | 13 | // Modifier: `uk-close-alt` 14 | // ======================================================================== 15 | 16 | .hook-close-alt() {} 17 | 18 | 19 | // Miscellaneous 20 | // ======================================================================== 21 | 22 | .hook-close-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/column.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Column 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @column-gutter: @global-grid-gutter; 11 | 12 | 13 | // Component 14 | // ======================================================================== 15 | 16 | .hook-column() {} 17 | 18 | 19 | // Miscellaneous 20 | // ======================================================================== 21 | 22 | .hook-column-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/description-list.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Description list 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @description-list-line-border: @global-border; 11 | @description-list-line-color: @global-muted-color; 12 | 13 | 14 | // Miscellaneous 15 | // ======================================================================== 16 | 17 | .hook-description-list-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/dotnav.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Dotnav 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | 11 | // Component 12 | // ======================================================================== 13 | 14 | .hook-dotnav-item() {} 15 | 16 | .hook-dotnav-item-hover() {} 17 | 18 | .hook-dotnav-item-onclick() {} 19 | 20 | .hook-dotnav-item-active() {} 21 | 22 | .hook-dotnav-contrast-item() {} 23 | 24 | .hook-dotnav-contrast-item-hover() {} 25 | 26 | .hook-dotnav-contrast-item-onclick() {} 27 | 28 | .hook-dotnav-contrast-item-active() {} 29 | 30 | 31 | // Miscellaneous 32 | // ======================================================================== 33 | 34 | .hook-dotnav-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/dropdown.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Dropdown 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @dropdown-z-index: @global-z-index + 20; 11 | @dropdown-color: @global-color; 12 | @dropdown-divider-border: @global-border; 13 | 14 | @dropdown-navbar-color: @global-color; 15 | 16 | 17 | // Component 18 | // ======================================================================== 19 | 20 | .hook-dropdown() {} 21 | 22 | 23 | // Modifier: `uk-dropdown-navbar` 24 | // ======================================================================== 25 | 26 | .hook-dropdown-navbar() {} 27 | 28 | 29 | // Sub-object: `uk-dropdown-overlay` 30 | // ======================================================================== 31 | 32 | .hook-dropdown-overlay() {} 33 | 34 | 35 | // Miscellaneous 36 | // ======================================================================== 37 | 38 | .hook-dropdown-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/form-advanced.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Form advanced 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Component 8 | // ======================================================================== 9 | 10 | .hook-form-advanced() {} 11 | 12 | .hook-form-advanced-checked() {} 13 | 14 | .hook-form-advanced-radio() {} 15 | 16 | .hook-form-advanced-checkbox() {} 17 | 18 | .hook-form-advanced-disabled() {} 19 | 20 | 21 | // Miscellaneous 22 | // ======================================================================== 23 | 24 | .hook-form-advanced-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/form-password.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Form password 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @form-password-font-size: @global-font-size - 1px; 11 | @form-password-line-height: @form-password-font-size; 12 | @form-password-color: @global-muted-color; 13 | @form-password-hover-color: @global-muted-color; 14 | 15 | 16 | // Miscellaneous 17 | // ======================================================================== 18 | 19 | .hook-form-password-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/grid.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Grid 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @grid-gutter-horizontal: @global-grid-gutter; 11 | @grid-gutter-vertical: @global-grid-gutter; 12 | 13 | @grid-gutter-large-horizontal: @global-grid-gutter-large; 14 | @grid-gutter-large-vertical: @global-grid-gutter-large; 15 | 16 | @grid-gutter-xlarge-horizontal: @global-grid-gutter-xlarge; 17 | @grid-gutter-xlarge-vertical: @global-grid-gutter-xlarge; 18 | 19 | @grid-divider-border: @global-border; 20 | 21 | 22 | // Miscellaneous 23 | // ======================================================================== 24 | 25 | .hook-grid-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/list.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: List 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @list-line-border: @global-border; 11 | 12 | 13 | // Modifier: `list-line` 14 | // ======================================================================== 15 | 16 | .hook-list-line() {} 17 | 18 | 19 | // Modifier: `list-striped` 20 | // ======================================================================== 21 | 22 | .hook-list-striped() {} 23 | 24 | 25 | // Miscellaneous 26 | // ======================================================================== 27 | 28 | .hook-list-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/nestable.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Nestable 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @nestable-dragged-z-index: @global-z-index + 50; 11 | 12 | @nestable-placeholder-border: @global-border; 13 | 14 | 15 | // Component 16 | // ======================================================================== 17 | 18 | .hook-nestable() {} 19 | 20 | .hook-nestable-item() {} 21 | 22 | .hook-nestable-dragged() {} 23 | 24 | .hook-nestable-placeholder() {} 25 | 26 | .hook-nestable-empty() {} 27 | 28 | .hook-nestable-handle() {} 29 | 30 | .hook-nestable-toggle() {} 31 | 32 | .hook-nestable-panel() {} 33 | 34 | 35 | // Miscellaneous 36 | // ======================================================================== 37 | 38 | .hook-nestable-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/notify.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Notify 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @notify-z-index: @global-z-index + 40; 11 | 12 | @notify-message-font-size: round((@global-font-size * 1.14)); // 16px / 18px 13 | @notify-message-line-height: round((@notify-message-font-size * 1.36)); // 22px / 24px 14 | 15 | 16 | // Component 17 | // ======================================================================== 18 | 19 | .hook-notify() {} 20 | 21 | .hook-notify-message() {} 22 | 23 | .hook-notify-message-primary() {} 24 | 25 | .hook-notify-message-success() {} 26 | 27 | .hook-notify-message-warning() {} 28 | 29 | .hook-notify-message-danger() {} 30 | 31 | 32 | // Miscellaneous 33 | // ======================================================================== 34 | 35 | .hook-notify-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/offcanvas.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Off-canvas 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @offcanvas-z-index: @global-z-index; 11 | 12 | 13 | // Component 14 | // ======================================================================== 15 | 16 | .hook-offcanvas() {} 17 | 18 | 19 | // Sub-object `uk-offcanvas-bar` 20 | // ======================================================================== 21 | 22 | .hook-offcanvas-bar() {} 23 | 24 | 25 | // Panel in offcanvas 26 | // ======================================================================== 27 | 28 | .hook-offcanvas-panel() {} 29 | 30 | 31 | // Miscellaneous 32 | // ======================================================================== 33 | 34 | .hook-offcanvas-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/overlay.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Overlay 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @overlay-panel-color: @global-contrast-color; 11 | 12 | @overlay-icon-color: @global-contrast-color; 13 | 14 | 15 | // Sub-object `uk-overlay-panel` 16 | // ======================================================================== 17 | 18 | .hook-overlay-panel() {} 19 | 20 | 21 | // Sub-object `uk-overlay-background` 22 | // ======================================================================== 23 | 24 | .hook-overlay-background() {} 25 | 26 | 27 | // Sub-object `uk-overlay-image` 28 | // ======================================================================== 29 | 30 | .hook-overlay-image() {} 31 | 32 | 33 | // Sub-object `uk-overlay-icon` 34 | // ======================================================================== 35 | 36 | .hook-overlay-icon() {} 37 | 38 | 39 | // Miscellaneous 40 | // ======================================================================== 41 | 42 | .hook-overlay-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/placeholder.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Placeholder 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @placeholder-margin-vertical: @global-margin; 11 | @placeholder-padding: @global-margin; 12 | @placeholder-border: @global-border; 13 | @placeholder-color: @global-color; 14 | 15 | 16 | // Component 17 | // ======================================================================== 18 | 19 | .hook-placeholder() {} 20 | 21 | .hook-placeholder-large() {} 22 | 23 | 24 | // Miscellaneous 25 | // ======================================================================== 26 | 27 | .hook-placeholder-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/slidenav.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Slidenav 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | 11 | // Component 12 | // ======================================================================== 13 | 14 | .hook-slidenav() {} 15 | 16 | .hook-slidenav-hover() {} 17 | 18 | .hook-slidenav-active() {} 19 | 20 | .hook-slidenav-contrast() {} 21 | 22 | .hook-slidenav-contrast-hover() {} 23 | 24 | .hook-slidenav-contrast-active() {} 25 | 26 | 27 | // Miscellaneous 28 | // ======================================================================== 29 | 30 | .hook-slidenav-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/sortable.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Sortable 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @sortable-dragged-z-index: @global-z-index + 50; 11 | 12 | 13 | // Component 14 | // ======================================================================== 15 | 16 | .hook-sortable() {} 17 | 18 | .hook-sortable-dragged() {} 19 | 20 | .hook-sortable-placeholder() {} 21 | 22 | .hook-sortable-over() {} 23 | 24 | 25 | // Miscellaneous 26 | // ======================================================================== 27 | 28 | .hook-sortable-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/sticky.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Sticky 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @sticky-z-index: @global-z-index - 20; 11 | 12 | 13 | // Miscellaneous 14 | // ======================================================================== 15 | 16 | .hook-sticky-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/tab.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Tab 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @tab-border: @global-border; 11 | @tab-color: @global-link-color; 12 | @tab-hover-color: @global-link-hover-color; 13 | @tab-active-border: @global-border; 14 | @tab-active-background: @global-background; 15 | @tab-active-color: @global-color; 16 | @tab-disabled-color: @global-muted-color; 17 | 18 | 19 | // Component 20 | // ======================================================================== 21 | 22 | // 23 | // Items 24 | // 25 | 26 | .hook-tab() {} 27 | 28 | // Hover 29 | .hook-tab-hover() {} 30 | 31 | // Active 32 | .hook-tab-active() {} 33 | 34 | // Disabled 35 | .hook-tab-disabled() {} 36 | 37 | 38 | // Miscellaneous 39 | // ======================================================================== 40 | 41 | .hook-tab-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/table.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Table 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @table-margin-vertical: @global-margin; 11 | 12 | @table-caption-color: @global-muted-color; 13 | @table-caption-font-size: round((@global-font-size * 0.85)); // 12px / 14px 14 | 15 | 16 | // Component 17 | // ======================================================================== 18 | 19 | .hook-table() {} 20 | 21 | .hook-table-active() {} 22 | 23 | .hook-table-striped() {} 24 | 25 | .hook-table-condensed() {} 26 | 27 | .hook-table-hover() {} 28 | 29 | 30 | // Miscellaneous 31 | // ======================================================================== 32 | 33 | .hook-table-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/text.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Text 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @text-small-font-size: round((@global-font-size * 0.78)); // 11px / 12px 11 | @text-small-line-height: round((@text-small-font-size * 1.49)); // 16px / 18px 12 | @text-large-font-size: round((@global-font-size * 1.28)); // 18px / 20px 13 | @text-large-line-height: round((@text-large-font-size * 1.32)); // 24px / 26px 14 | 15 | @text-muted-color: @global-muted-color; 16 | @text-contrast-color: @global-contrast-color; 17 | 18 | 19 | // Miscellaneous 20 | // ======================================================================== 21 | 22 | .hook-text-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/thumbnail.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Thumbnail 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @thumbnail-border: @global-border; 11 | @thumbnail-background: @global-background; 12 | @thumbnail-hover-border: darken(@global-border, 20%); 13 | @thumbnail-hover-background: @global-background; 14 | 15 | @thumbnail-caption-color: @global-color; 16 | 17 | 18 | // Component 19 | // ======================================================================== 20 | 21 | .hook-thumbnail() {} 22 | 23 | .hook-thumbnail-hover() {} 24 | 25 | 26 | // Caption 27 | // ======================================================================== 28 | 29 | .hook-thumbnail-caption() {} 30 | 31 | 32 | // Miscellaneous 33 | // ======================================================================== 34 | 35 | .hook-thumbnail-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/thumbnav.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Thumbnav 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Component 8 | // ======================================================================== 9 | 10 | .hook-thumbnav() {} 11 | 12 | 13 | // Miscellaneous 14 | // ======================================================================== 15 | 16 | .hook-thumbnav-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/default/tooltip.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Tooltip 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @tooltip-z-index: @global-z-index + 30; 11 | 12 | @tooltip-font-size: round((@global-font-size * 0.85)); // 12px / 14px 13 | @tooltip-line-height: round((@tooltip-font-size * 1.46)); // 18px / 20px 14 | 15 | 16 | // Component 17 | // ======================================================================== 18 | 19 | .hook-tooltip() {} 20 | 21 | 22 | // Miscellaneous 23 | // ======================================================================== 24 | 25 | .hook-tooltip-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/gradient/block.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Block 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @block-default-background: @global-background; 11 | 12 | 13 | // Component 14 | // ======================================================================== 15 | 16 | .hook-block() {} 17 | 18 | 19 | // Color modifier 20 | // ======================================================================== 21 | 22 | .hook-block-default() {} 23 | 24 | .hook-block-muted() {} 25 | 26 | .hook-block-secondary() {} 27 | 28 | .hook-block-primary() {} 29 | 30 | 31 | // Miscellaneous 32 | // ======================================================================== 33 | 34 | .hook-block-misc() { 35 | 36 | /* 37 | * Adjust padding between equal colored blocks 38 | */ 39 | 40 | .uk-block-default + .uk-block-default, 41 | .uk-block-muted + .uk-block-muted, 42 | .uk-block-primary + .uk-block-primary, 43 | .uk-block-secondary + .uk-block-secondary { padding-top: 0; } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/gradient/breadcrumb.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Breadcrumb 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @breadcrumb-disabled-color: @global-muted-color; 11 | 12 | 13 | // Component 14 | // ======================================================================== 15 | 16 | .hook-breadcrumb() {} 17 | 18 | 19 | // Items 20 | // ======================================================================== 21 | 22 | .hook-breadcrumb-divider() {} 23 | 24 | 25 | // Miscellaneous 26 | // ======================================================================== 27 | 28 | .hook-breadcrumb-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/gradient/close.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Close 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @close-alt-background: @global-background; 11 | 12 | 13 | // Component 14 | // ======================================================================== 15 | 16 | .hook-close() {} 17 | 18 | 19 | // Modifier: `uk-close-alt` 20 | // ======================================================================== 21 | 22 | .hook-close-alt() { 23 | box-shadow: 0 0 0 1px rgba(0,0,0,0.1), 24 | 0 0 6px rgba(0,0,0,0.3); 25 | } 26 | 27 | 28 | // Miscellaneous 29 | // ======================================================================== 30 | 31 | .hook-close-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/gradient/column.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Column 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @column-gutter: @global-grid-gutter; 11 | 12 | 13 | // Component 14 | // ======================================================================== 15 | 16 | .hook-column() {} 17 | 18 | 19 | // Miscellaneous 20 | // ======================================================================== 21 | 22 | .hook-column-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/gradient/description-list.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Description list 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @description-list-line-border: @global-border; 11 | @description-list-line-color: @global-muted-color; 12 | 13 | 14 | // Miscellaneous 15 | // ======================================================================== 16 | 17 | .hook-description-list-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/gradient/dotnav.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Dotnav 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | 11 | // Component 12 | // ======================================================================== 13 | 14 | .hook-dotnav-item() { 15 | -webkit-transition: all 0.2s ease-in-out; 16 | transition: all 0.2s ease-in-out; 17 | } 18 | 19 | .hook-dotnav-item-hover() {} 20 | 21 | .hook-dotnav-item-onclick() {} 22 | 23 | .hook-dotnav-item-active() { 24 | -webkit-transform: scale(1.3); 25 | transform: scale(1.3); 26 | } 27 | 28 | .hook-dotnav-contrast-item() {} 29 | 30 | .hook-dotnav-contrast-item-hover() {} 31 | 32 | .hook-dotnav-contrast-item-onclick() {} 33 | 34 | .hook-dotnav-contrast-item-active() {} 35 | 36 | 37 | // Miscellaneous 38 | // ======================================================================== 39 | 40 | .hook-dotnav-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/gradient/form-advanced.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Form advanced 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Component 8 | // ======================================================================== 9 | 10 | .hook-form-advanced() {} 11 | 12 | .hook-form-advanced-checked() {} 13 | 14 | .hook-form-advanced-radio() {} 15 | 16 | .hook-form-advanced-checkbox() {} 17 | 18 | .hook-form-advanced-disabled() {} 19 | 20 | 21 | // Miscellaneous 22 | // ======================================================================== 23 | 24 | .hook-form-advanced-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/gradient/form-password.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Form password 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @form-password-font-size: @global-font-size - 1px; 11 | @form-password-line-height: @form-password-font-size; 12 | @form-password-color: @global-muted-color; 13 | @form-password-hover-color: @global-muted-color; 14 | 15 | 16 | // Miscellaneous 17 | // ======================================================================== 18 | 19 | .hook-form-password-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/gradient/grid.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Grid 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @grid-gutter-horizontal: @global-grid-gutter; 11 | @grid-gutter-vertical: @global-grid-gutter; 12 | 13 | @grid-gutter-large-horizontal: @global-grid-gutter-large; 14 | @grid-gutter-large-vertical: @global-grid-gutter-large; 15 | 16 | @grid-gutter-xlarge-horizontal: @global-grid-gutter-xlarge; 17 | @grid-gutter-xlarge-vertical: @global-grid-gutter-xlarge; 18 | 19 | @grid-divider-border: @global-border; 20 | 21 | 22 | // Miscellaneous 23 | // ======================================================================== 24 | 25 | .hook-grid-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/gradient/list.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: List 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @list-line-border: @global-border; 11 | 12 | @list-striped-background: #fafafa; 13 | 14 | // 15 | // New 16 | // 17 | 18 | @list-striped-border: @global-border; 19 | 20 | 21 | // Modifier: `list-line` 22 | // ======================================================================== 23 | 24 | .hook-list-line() {} 25 | 26 | 27 | // Modifier: `list-striped` 28 | // ======================================================================== 29 | 30 | .hook-list-striped() { border-bottom: 1px solid @list-striped-border; } 31 | 32 | 33 | // Miscellaneous 34 | // ======================================================================== 35 | 36 | .hook-list-misc() { 37 | 38 | .uk-list-striped > li:first-child { border-top: 1px solid @list-striped-border; } 39 | 40 | } -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/gradient/overlay.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Overlay 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @overlay-panel-color: @global-contrast-color; 11 | 12 | @overlay-icon-color: @global-contrast-color; 13 | 14 | 15 | // Sub-object `uk-overlay-panel` 16 | // ======================================================================== 17 | 18 | .hook-overlay-panel() {} 19 | 20 | 21 | // Sub-object `uk-overlay-background` 22 | // ======================================================================== 23 | 24 | .hook-overlay-background() {} 25 | 26 | 27 | // Sub-object `uk-overlay-image` 28 | // ======================================================================== 29 | 30 | .hook-overlay-image() {} 31 | 32 | 33 | // Sub-object `uk-overlay-icon` 34 | // ======================================================================== 35 | 36 | .hook-overlay-icon() {} 37 | 38 | 39 | // Miscellaneous 40 | // ======================================================================== 41 | 42 | .hook-overlay-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/gradient/placeholder.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Placeholder 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @placeholder-margin-vertical: @global-margin; 11 | @placeholder-padding: @global-margin; 12 | @placeholder-border: @global-border; 13 | @placeholder-color: @global-color; 14 | 15 | 16 | // Component 17 | // ======================================================================== 18 | 19 | .hook-placeholder() {} 20 | 21 | .hook-placeholder-large() {} 22 | 23 | 24 | // Miscellaneous 25 | // ======================================================================== 26 | 27 | .hook-placeholder-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/gradient/slidenav.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Slidenav 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | 11 | // Component 12 | // ======================================================================== 13 | 14 | .hook-slidenav() {} 15 | 16 | .hook-slidenav-hover() {} 17 | 18 | .hook-slidenav-active() {} 19 | 20 | .hook-slidenav-contrast() {} 21 | 22 | .hook-slidenav-contrast-hover() {} 23 | 24 | .hook-slidenav-contrast-active() {} 25 | 26 | 27 | // Miscellaneous 28 | // ======================================================================== 29 | 30 | .hook-slidenav-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/gradient/sortable.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Sortable 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @sortable-dragged-z-index: @global-z-index + 50; 11 | 12 | 13 | // Component 14 | // ======================================================================== 15 | 16 | .hook-sortable() {} 17 | 18 | .hook-sortable-dragged() {} 19 | 20 | .hook-sortable-placeholder() {} 21 | 22 | .hook-sortable-over() {} 23 | 24 | 25 | // Miscellaneous 26 | // ======================================================================== 27 | 28 | .hook-sortable-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/gradient/sticky.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Sticky 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @sticky-z-index: @global-z-index - 20; 11 | 12 | 13 | // Miscellaneous 14 | // ======================================================================== 15 | 16 | .hook-sticky-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/gradient/table.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Table 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @table-margin-vertical: @global-margin; 11 | 12 | @table-caption-color: @global-muted-color; 13 | @table-caption-font-size: round((@global-font-size * 0.85)); // 12px / 14px 14 | 15 | @table-striped-background: #fafafa; 16 | 17 | @table-hover-background: darken(@table-striped-background, 4%); 18 | 19 | // 20 | // New 21 | // 22 | 23 | @table-border: @global-border; 24 | 25 | 26 | // Component 27 | // ======================================================================== 28 | 29 | .hook-table() { border-bottom: 1px solid @table-border; } 30 | 31 | .hook-table-active() {} 32 | 33 | .hook-table-striped() {} 34 | 35 | .hook-table-condensed() {} 36 | 37 | .hook-table-hover() {} 38 | 39 | 40 | // Miscellaneous 41 | // ======================================================================== 42 | 43 | .hook-table-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/gradient/text.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Text 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @text-small-font-size: round((@global-font-size * 0.78)); // 11px / 12px 11 | @text-small-line-height: round((@text-small-font-size * 1.49)); // 16px / 18px 12 | @text-large-font-size: round((@global-font-size * 1.28)); // 18px / 20px 13 | @text-large-line-height: round((@text-large-font-size * 1.32)); // 24px / 26px 14 | 15 | @text-muted-color: @global-muted-color; 16 | @text-contrast-color: @global-contrast-color; 17 | 18 | 19 | // Miscellaneous 20 | // ======================================================================== 21 | 22 | .hook-text-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/gradient/thumbnav.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Thumbnav 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Component 8 | // ======================================================================== 9 | 10 | .hook-thumbnav() {} 11 | 12 | 13 | // Miscellaneous 14 | // ======================================================================== 15 | 16 | .hook-thumbnav-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/static/less/uikit/themes/gradient/tooltip.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component: Tooltip 3 | // 4 | // ======================================================================== 5 | 6 | 7 | // Variables 8 | // ======================================================================== 9 | 10 | @tooltip-z-index: @global-z-index + 30; 11 | 12 | @tooltip-font-size: round((@global-font-size * 0.85)); // 12px / 14px 13 | @tooltip-line-height: round((@tooltip-font-size * 1.46)); // 18px / 20px 14 | 15 | // 16 | // New 17 | // 18 | 19 | @tooltip-text-shadow: rgba(0,0,0,0.5); 20 | 21 | 22 | // Component 23 | // ======================================================================== 24 | 25 | .hook-tooltip() { 26 | border-radius: 3px; 27 | text-shadow: 0 1px 0 @tooltip-text-shadow; 28 | } 29 | 30 | 31 | // Miscellaneous 32 | // ======================================================================== 33 | 34 | .hook-tooltip-misc() {} -------------------------------------------------------------------------------- /petstore/petstore-web/src/main/resources/templates/hello.html: -------------------------------------------------------------------------------- 1 | {% extends("_base") %} 2 | 3 | {% block title %} 4 | Hello {{ user.name }} 5 | {% endblock %} 6 | 7 | {% block main %} 8 |

Hello, {{ user.name }}!

9 |

ID: {{ user.id }}

10 |

Email: {{ user.email }}

11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /petstore/petstore-zipkin/src/main/java/com/feiyangedu/springcloud/petstore/zipkin/ZipkinServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.petstore.zipkin; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.sleuth.zipkin.stream.EnableZipkinStreamServer; 6 | 7 | @SpringBootApplication 8 | @EnableZipkinStreamServer 9 | public class ZipkinServerApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(ZipkinServerApplication.class, args); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /petstore/petstore-zipkin/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: zipkin 4 | profiles: 5 | active: ${PROFILES:native} 6 | cloud: 7 | config: 8 | uri: http://${CONFIG_IP:172.27.0.202}:8888 9 | fail-fast: true 10 | -------------------------------------------------------------------------------- /scheduler/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | 7 | com.itranswarp.springcloud 8 | parent 9 | 1.0-SNAPSHOT 10 | ../parent/pom.xml 11 | 12 | 13 | scheduler 14 | jar 15 | 16 | 17 | 18 | org.springframework.boot 19 | spring-boot-starter-web 20 | 21 | 22 | org.springframework.boot 23 | spring-boot-starter-actuator 24 | 25 | 26 | org.springframework.boot 27 | spring-boot-devtools 28 | true 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /scheduler/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: scheduler 4 | 5 | server: 6 | port: 9090 7 | -------------------------------------------------------------------------------- /security/src/main/java/com/itranswarp/springcloud/security/SecureApplication.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.security; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.ResponseBody; 7 | import org.springframework.web.bind.annotation.RestController; 8 | 9 | /** 10 | * Spring Boot Application. 11 | * 12 | * @author Michael Liao 13 | */ 14 | @SpringBootApplication 15 | @RestController 16 | public class SecureApplication { 17 | 18 | @GetMapping("/") 19 | @ResponseBody 20 | String home() { 21 | return "

Hello World!

"; 22 | } 23 | 24 | @GetMapping("/api") 25 | public String[] api() { 26 | return "Spring Boot Security".split(" "); 27 | } 28 | 29 | public static void main(String[] args) throws Exception { 30 | SpringApplication.run(SecureApplication.class, args); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /security/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: security 4 | 5 | security: 6 | user: 7 | name: admin 8 | password: password 9 | 10 | server: 11 | port: 9090 12 | -------------------------------------------------------------------------------- /sso-server/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | com.feiyangedu.springcloud 7 | petstore-parent 8 | 1.0-SNAPSHOT 9 | ../petstore-parent/pom.xml 10 | 11 | 12 | petstore-account 13 | jar 14 | petstore-account 15 | 16 | 17 | 18 | com.feiyangedu.springcloud 19 | petstore-common 20 | ${project.version} 21 | 22 | 23 | 24 | 25 | 26 | 27 | org.springframework.boot 28 | spring-boot-maven-plugin 29 | 30 | 31 | com.spotify 32 | docker-maven-plugin 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /sso-server/src/main/java/com/feiyangedu/springcloud/sso/domain/User.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.sso.domain; 2 | 3 | public class User { 4 | 5 | private String id; 6 | private String name; 7 | private String email; 8 | private String passwd; 9 | private String salt; 10 | 11 | public String getId() { 12 | return id; 13 | } 14 | 15 | public void setId(String id) { 16 | this.id = id; 17 | } 18 | 19 | public String getEmail() { 20 | return email; 21 | } 22 | 23 | public void setEmail(String email) { 24 | this.email = email; 25 | } 26 | 27 | public String getName() { 28 | return name; 29 | } 30 | 31 | public void setName(String name) { 32 | this.name = name; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /sso-server/src/main/java/com/feiyangedu/springcloud/sso/domain/UserController.java: -------------------------------------------------------------------------------- 1 | package com.feiyangedu.springcloud.sso.domain; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | import org.springframework.web.bind.annotation.PathVariable; 6 | import org.springframework.web.bind.annotation.RequestParam; 7 | import org.springframework.web.servlet.ModelAndView; 8 | 9 | @Controller 10 | public class UserController { 11 | 12 | @GetMapping("/") 13 | public ModelAndView index(@RequestParam(value = "name", defaultValue = "World") String name) { 14 | return new ModelAndView("index", "name", name); 15 | } 16 | 17 | @GetMapping("/hello/{name}") 18 | public ModelAndView hello(@PathVariable("name") String name) { 19 | User user = new User(); 20 | user.setId("u" + Math.abs(name.hashCode())); 21 | user.setName(name); 22 | user.setEmail(name + " <" + name.toLowerCase() + "@example.com>"); 23 | return new ModelAndView("hello", "user", user); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /sso-server/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: sso-server 4 | 5 | freemarker: 6 | suffix: .html 7 | # set to true in production mode: 8 | cache: false 9 | settings: 10 | output_format: HTMLOutputFormat 11 | 12 | server: 13 | port: 9999 14 | -------------------------------------------------------------------------------- /sso-server/src/main/resources/static/css/components/accordion.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Accordion 4 | ========================================================================== */ 5 | /* Sub-object: `uk-accordion-title` 6 | ========================================================================== */ 7 | .uk-accordion-title { 8 | margin-top: 0; 9 | margin-bottom: 15px; 10 | padding: 5px 15px; 11 | background: #eee; 12 | font-size: 18px; 13 | line-height: 24px; 14 | cursor: pointer; 15 | } 16 | /* Sub-object: `uk-accordion-content` 17 | ========================================================================== */ 18 | .uk-accordion-content { 19 | padding: 0 15px 15px 15px; 20 | } 21 | /* 22 | * Micro clearfix to make panels more robust 23 | */ 24 | .uk-accordion-content:before, 25 | .uk-accordion-content:after { 26 | content: ""; 27 | display: table; 28 | } 29 | .uk-accordion-content:after { 30 | clear: both; 31 | } 32 | /* 33 | * Remove margin from the last-child 34 | */ 35 | .uk-accordion-content > :last-child { 36 | margin-bottom: 0; 37 | } 38 | -------------------------------------------------------------------------------- /sso-server/src/main/resources/static/css/components/form-file.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Form file 4 | ========================================================================== */ 5 | /* 6 | * 1. Behave like form elements 7 | * 2. Create position context for dropdowns 8 | * 3. Clip content 9 | */ 10 | .uk-form-file { 11 | /* 1 */ 12 | display: inline-block; 13 | vertical-align: middle; 14 | /* 2 */ 15 | position: relative; 16 | /* 3 */ 17 | overflow: hidden; 18 | } 19 | /* 20 | * 1. Required for Firefox 21 | * 2. Expand height and required for the cursor 22 | */ 23 | .uk-form-file input[type="file"] { 24 | position: absolute; 25 | top: 0; 26 | z-index: 1; 27 | width: 100%; 28 | opacity: 0; 29 | cursor: pointer; 30 | /* 1 */ 31 | left: 0; 32 | /* 2 */ 33 | font-size: 500px; 34 | } 35 | -------------------------------------------------------------------------------- /sso-server/src/main/resources/static/css/components/form-password.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Form password 4 | ========================================================================== */ 5 | /* 6 | * 1. Container width fits its content 7 | * 2. Create position context 8 | * 3. Prevent `inline-block` consequences 9 | */ 10 | .uk-form-password { 11 | /* 1 */ 12 | display: inline-block; 13 | /* 2 */ 14 | position: relative; 15 | /* 3 */ 16 | max-width: 100%; 17 | } 18 | .uk-form-password-toggle { 19 | display: block; 20 | position: absolute; 21 | top: 50%; 22 | right: 10px; 23 | margin-top: -6px; 24 | font-size: 13px; 25 | line-height: 13px; 26 | color: #999; 27 | } 28 | .uk-form-password-toggle:hover { 29 | color: #999; 30 | text-decoration: none; 31 | } 32 | .uk-form-password > input { 33 | padding-right: 50px !important; 34 | } 35 | -------------------------------------------------------------------------------- /sso-server/src/main/resources/static/css/components/form-select.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Form select 4 | ========================================================================== */ 5 | /* 6 | * 1. Behave like form elements 7 | * 2. Create position context for dropdowns 8 | * 3. Clip content 9 | */ 10 | .uk-form-select { 11 | /* 1 */ 12 | display: inline-block; 13 | vertical-align: middle; 14 | /* 2 */ 15 | position: relative; 16 | /* 3 */ 17 | overflow: hidden; 18 | } 19 | /* 20 | * 1. Required for Firefox 21 | * 1. Required for Webkit to make `height` work 22 | */ 23 | .uk-form-select select { 24 | position: absolute; 25 | top: 0; 26 | z-index: 1; 27 | width: 100%; 28 | height: 100%; 29 | opacity: 0; 30 | cursor: pointer; 31 | /* 1 */ 32 | left: 0; 33 | /* 2 */ 34 | -webkit-appearance: none; 35 | } 36 | -------------------------------------------------------------------------------- /sso-server/src/main/resources/static/css/components/placeholder.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Placeholder 4 | ========================================================================== */ 5 | .uk-placeholder { 6 | margin-bottom: 15px; 7 | padding: 15px; 8 | border: 1px dashed #ddd; 9 | background: #fafafa; 10 | color: #444; 11 | } 12 | /* 13 | * Add margin if adjacent element 14 | */ 15 | * + .uk-placeholder { 16 | margin-top: 15px; 17 | } 18 | /* 19 | * Remove margin from the last-child 20 | */ 21 | .uk-placeholder > :last-child { 22 | margin-bottom: 0; 23 | } 24 | /* Modifier: `uk-placeholder-large` 25 | ========================================================================== */ 26 | .uk-placeholder-large { 27 | padding-top: 80px; 28 | padding-bottom: 80px; 29 | } 30 | -------------------------------------------------------------------------------- /sso-server/src/main/resources/static/css/components/sticky.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Sticky 4 | ========================================================================== */ 5 | /* 6 | * 1. More robust if padding and border are used 7 | * 2. Enable hardware acceleration for iOS browsers, resolves scrolling issue 8 | */ 9 | [data-uk-sticky].uk-active { 10 | z-index: 980; 11 | /* 1 */ 12 | box-sizing: border-box; 13 | /* 2 */ 14 | -webkit-backface-visibility: hidden; 15 | } 16 | /* 17 | * Faster animations 18 | */ 19 | [data-uk-sticky][class*='uk-animation-'] { 20 | -webkit-animation-duration: 0.2s; 21 | animation-duration: 0.2s; 22 | } 23 | [data-uk-sticky].uk-animation-reverse { 24 | -webkit-animation-duration: 0.2s; 25 | animation-duration: 0.2s; 26 | } 27 | -------------------------------------------------------------------------------- /sso-server/src/main/resources/static/css/components/upload.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Upload 4 | ========================================================================== */ 5 | /* 6 | * Create a box-shadow when dragging a file over the upload area 7 | */ 8 | .uk-dragover { 9 | box-shadow: 0 0 20px rgba(100, 100, 100, 0.3); 10 | } 11 | -------------------------------------------------------------------------------- /sso-server/src/main/resources/static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/sso-server/src/main/resources/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /sso-server/src/main/resources/static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/sso-server/src/main/resources/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /sso-server/src/main/resources/static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/sso-server/src/main/resources/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /sso-server/src/main/resources/static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/sso-server/src/main/resources/static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /sso-server/src/main/resources/templates/hello.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Freemarker App 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 | SpringCloud 15 | 19 |
20 |
21 |
22 |
23 |
24 |

Hello, ${user.name}!

25 |

ID: ${user.id}

26 |

Email: ${user.email}

27 |
28 |
29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /sso-server/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Freemarker App 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 | SpringCloud 15 | 19 |
20 |
21 |
22 |
23 |
24 |

Hello, ${name}!

25 |

Welcome to visit Spring Boot Freemarker App!

26 |
27 |
28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /view-freemarker/src/main/java/com/itranswarp/springcloud/freemarker/FreemarkerApplication.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.freemarker; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; 7 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 8 | 9 | /** 10 | * Spring Boot Application using Freemarker. 11 | * 12 | * @author Michael Liao 13 | */ 14 | @SpringBootApplication 15 | public class FreemarkerApplication { 16 | 17 | @Bean 18 | public WebMvcConfigurer webMvcConfigurer() { 19 | /** 20 | * Spring默认把静态资源文件/static/abc.js映射到/abc.js,不利于配置反向代理。配置为保留/static/前缀 21 | */ 22 | return new WebMvcConfigurer() { 23 | @Override 24 | public void addResourceHandlers(ResourceHandlerRegistry registry) { 25 | registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/"); 26 | } 27 | }; 28 | } 29 | 30 | public static void main(String[] args) throws Exception { 31 | SpringApplication.run(FreemarkerApplication.class, args); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /view-freemarker/src/main/java/com/itranswarp/springcloud/freemarker/mvc/User.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.freemarker.mvc; 2 | 3 | public class User { 4 | 5 | private String id; 6 | private String email; 7 | private String name; 8 | 9 | public String getId() { 10 | return id; 11 | } 12 | 13 | public void setId(String id) { 14 | this.id = id; 15 | } 16 | 17 | public String getEmail() { 18 | return email; 19 | } 20 | 21 | public void setEmail(String email) { 22 | this.email = email; 23 | } 24 | 25 | public String getName() { 26 | return name; 27 | } 28 | 29 | public void setName(String name) { 30 | this.name = name; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /view-freemarker/src/main/java/com/itranswarp/springcloud/freemarker/mvc/UserController.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.freemarker.mvc; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | import org.springframework.web.bind.annotation.PathVariable; 6 | import org.springframework.web.bind.annotation.RequestParam; 7 | import org.springframework.web.servlet.ModelAndView; 8 | 9 | @Controller 10 | public class UserController { 11 | 12 | @GetMapping("/") 13 | public ModelAndView index(@RequestParam(value = "name", defaultValue = "World") String name) { 14 | return new ModelAndView("index", "name", name); 15 | } 16 | 17 | @GetMapping("/hello/{name}") 18 | public ModelAndView hello(@PathVariable("name") String name) { 19 | User user = new User(); 20 | user.setId("u" + Math.abs(name.hashCode())); 21 | user.setName(name); 22 | user.setEmail(name + " <" + name.toLowerCase() + "@example.com>"); 23 | return new ModelAndView("hello", "user", user); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /view-freemarker/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: freemarker 4 | 5 | freemarker: 6 | suffix: .html 7 | # set to true in production mode: 8 | cache: false 9 | settings: 10 | output_format: HTMLOutputFormat 11 | 12 | server: 13 | port: 9090 14 | -------------------------------------------------------------------------------- /view-freemarker/src/main/resources/static/css/components/accordion.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Accordion 4 | ========================================================================== */ 5 | /* Sub-object: `uk-accordion-title` 6 | ========================================================================== */ 7 | .uk-accordion-title { 8 | margin-top: 0; 9 | margin-bottom: 15px; 10 | padding: 5px 15px; 11 | background: #eee; 12 | font-size: 18px; 13 | line-height: 24px; 14 | cursor: pointer; 15 | } 16 | /* Sub-object: `uk-accordion-content` 17 | ========================================================================== */ 18 | .uk-accordion-content { 19 | padding: 0 15px 15px 15px; 20 | } 21 | /* 22 | * Micro clearfix to make panels more robust 23 | */ 24 | .uk-accordion-content:before, 25 | .uk-accordion-content:after { 26 | content: ""; 27 | display: table; 28 | } 29 | .uk-accordion-content:after { 30 | clear: both; 31 | } 32 | /* 33 | * Remove margin from the last-child 34 | */ 35 | .uk-accordion-content > :last-child { 36 | margin-bottom: 0; 37 | } 38 | -------------------------------------------------------------------------------- /view-freemarker/src/main/resources/static/css/components/form-file.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Form file 4 | ========================================================================== */ 5 | /* 6 | * 1. Behave like form elements 7 | * 2. Create position context for dropdowns 8 | * 3. Clip content 9 | */ 10 | .uk-form-file { 11 | /* 1 */ 12 | display: inline-block; 13 | vertical-align: middle; 14 | /* 2 */ 15 | position: relative; 16 | /* 3 */ 17 | overflow: hidden; 18 | } 19 | /* 20 | * 1. Required for Firefox 21 | * 2. Expand height and required for the cursor 22 | */ 23 | .uk-form-file input[type="file"] { 24 | position: absolute; 25 | top: 0; 26 | z-index: 1; 27 | width: 100%; 28 | opacity: 0; 29 | cursor: pointer; 30 | /* 1 */ 31 | left: 0; 32 | /* 2 */ 33 | font-size: 500px; 34 | } 35 | -------------------------------------------------------------------------------- /view-freemarker/src/main/resources/static/css/components/form-password.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Form password 4 | ========================================================================== */ 5 | /* 6 | * 1. Container width fits its content 7 | * 2. Create position context 8 | * 3. Prevent `inline-block` consequences 9 | */ 10 | .uk-form-password { 11 | /* 1 */ 12 | display: inline-block; 13 | /* 2 */ 14 | position: relative; 15 | /* 3 */ 16 | max-width: 100%; 17 | } 18 | .uk-form-password-toggle { 19 | display: block; 20 | position: absolute; 21 | top: 50%; 22 | right: 10px; 23 | margin-top: -6px; 24 | font-size: 13px; 25 | line-height: 13px; 26 | color: #999; 27 | } 28 | .uk-form-password-toggle:hover { 29 | color: #999; 30 | text-decoration: none; 31 | } 32 | .uk-form-password > input { 33 | padding-right: 50px !important; 34 | } 35 | -------------------------------------------------------------------------------- /view-freemarker/src/main/resources/static/css/components/form-select.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Form select 4 | ========================================================================== */ 5 | /* 6 | * 1. Behave like form elements 7 | * 2. Create position context for dropdowns 8 | * 3. Clip content 9 | */ 10 | .uk-form-select { 11 | /* 1 */ 12 | display: inline-block; 13 | vertical-align: middle; 14 | /* 2 */ 15 | position: relative; 16 | /* 3 */ 17 | overflow: hidden; 18 | } 19 | /* 20 | * 1. Required for Firefox 21 | * 1. Required for Webkit to make `height` work 22 | */ 23 | .uk-form-select select { 24 | position: absolute; 25 | top: 0; 26 | z-index: 1; 27 | width: 100%; 28 | height: 100%; 29 | opacity: 0; 30 | cursor: pointer; 31 | /* 1 */ 32 | left: 0; 33 | /* 2 */ 34 | -webkit-appearance: none; 35 | } 36 | -------------------------------------------------------------------------------- /view-freemarker/src/main/resources/static/css/components/placeholder.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Placeholder 4 | ========================================================================== */ 5 | .uk-placeholder { 6 | margin-bottom: 15px; 7 | padding: 15px; 8 | border: 1px dashed #ddd; 9 | background: #fafafa; 10 | color: #444; 11 | } 12 | /* 13 | * Add margin if adjacent element 14 | */ 15 | * + .uk-placeholder { 16 | margin-top: 15px; 17 | } 18 | /* 19 | * Remove margin from the last-child 20 | */ 21 | .uk-placeholder > :last-child { 22 | margin-bottom: 0; 23 | } 24 | /* Modifier: `uk-placeholder-large` 25 | ========================================================================== */ 26 | .uk-placeholder-large { 27 | padding-top: 80px; 28 | padding-bottom: 80px; 29 | } 30 | -------------------------------------------------------------------------------- /view-freemarker/src/main/resources/static/css/components/sticky.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Sticky 4 | ========================================================================== */ 5 | /* 6 | * 1. More robust if padding and border are used 7 | * 2. Enable hardware acceleration for iOS browsers, resolves scrolling issue 8 | */ 9 | [data-uk-sticky].uk-active { 10 | z-index: 980; 11 | /* 1 */ 12 | box-sizing: border-box; 13 | /* 2 */ 14 | -webkit-backface-visibility: hidden; 15 | } 16 | /* 17 | * Faster animations 18 | */ 19 | [data-uk-sticky][class*='uk-animation-'] { 20 | -webkit-animation-duration: 0.2s; 21 | animation-duration: 0.2s; 22 | } 23 | [data-uk-sticky].uk-animation-reverse { 24 | -webkit-animation-duration: 0.2s; 25 | animation-duration: 0.2s; 26 | } 27 | -------------------------------------------------------------------------------- /view-freemarker/src/main/resources/static/css/components/upload.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Upload 4 | ========================================================================== */ 5 | /* 6 | * Create a box-shadow when dragging a file over the upload area 7 | */ 8 | .uk-dragover { 9 | box-shadow: 0 0 20px rgba(100, 100, 100, 0.3); 10 | } 11 | -------------------------------------------------------------------------------- /view-freemarker/src/main/resources/static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/view-freemarker/src/main/resources/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /view-freemarker/src/main/resources/static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/view-freemarker/src/main/resources/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /view-freemarker/src/main/resources/static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/view-freemarker/src/main/resources/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /view-freemarker/src/main/resources/static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/view-freemarker/src/main/resources/static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /view-freemarker/src/main/resources/templates/hello.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Freemarker App 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 | SpringCloud 15 | 19 |
20 |
21 |
22 |
23 |
24 |

Hello, ${user.name}!

25 |

ID: ${user.id}

26 |

Email: ${user.email}

27 |
28 |
29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /view-freemarker/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Freemarker App 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 | SpringCloud 15 | 19 |
20 |
21 |
22 |
23 |
24 |

Hello, ${name}!

25 |

Welcome to visit Spring Boot Freemarker App!

26 |
27 |
28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /view-pebble/src/main/java/com/itranswarp/springcloud/pebble/mvc/User.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.pebble.mvc; 2 | 3 | public class User { 4 | 5 | private String id; 6 | private String email; 7 | private String name; 8 | 9 | public String getId() { 10 | return id; 11 | } 12 | 13 | public void setId(String id) { 14 | this.id = id; 15 | } 16 | 17 | public String getEmail() { 18 | return email; 19 | } 20 | 21 | public void setEmail(String email) { 22 | this.email = email; 23 | } 24 | 25 | public String getName() { 26 | return name; 27 | } 28 | 29 | public void setName(String name) { 30 | this.name = name; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /view-pebble/src/main/java/com/itranswarp/springcloud/pebble/mvc/UserController.java: -------------------------------------------------------------------------------- 1 | package com.itranswarp.springcloud.pebble.mvc; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | import org.springframework.web.bind.annotation.PathVariable; 6 | import org.springframework.web.bind.annotation.RequestParam; 7 | import org.springframework.web.servlet.ModelAndView; 8 | 9 | @Controller 10 | public class UserController { 11 | 12 | @GetMapping("/") 13 | public ModelAndView index(@RequestParam(value = "name", defaultValue = "World") String name) { 14 | return new ModelAndView("index", "name", name); 15 | } 16 | 17 | @GetMapping("/hello/{name}") 18 | public ModelAndView hello(@PathVariable("name") String name) { 19 | User user = new User(); 20 | user.setId("u" + Math.abs(name.hashCode())); 21 | user.setName(name); 22 | user.setEmail(name + " <" + name.toLowerCase() + "@example.com>"); 23 | return new ModelAndView("hello", "user", user); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /view-pebble/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: pebble 4 | 5 | pebble: 6 | cache: false 7 | 8 | server: 9 | port: 9090 10 | -------------------------------------------------------------------------------- /view-pebble/src/main/resources/static/css/components/accordion.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Accordion 4 | ========================================================================== */ 5 | /* Sub-object: `uk-accordion-title` 6 | ========================================================================== */ 7 | .uk-accordion-title { 8 | margin-top: 0; 9 | margin-bottom: 15px; 10 | padding: 5px 15px; 11 | background: #eee; 12 | font-size: 18px; 13 | line-height: 24px; 14 | cursor: pointer; 15 | } 16 | /* Sub-object: `uk-accordion-content` 17 | ========================================================================== */ 18 | .uk-accordion-content { 19 | padding: 0 15px 15px 15px; 20 | } 21 | /* 22 | * Micro clearfix to make panels more robust 23 | */ 24 | .uk-accordion-content:before, 25 | .uk-accordion-content:after { 26 | content: ""; 27 | display: table; 28 | } 29 | .uk-accordion-content:after { 30 | clear: both; 31 | } 32 | /* 33 | * Remove margin from the last-child 34 | */ 35 | .uk-accordion-content > :last-child { 36 | margin-bottom: 0; 37 | } 38 | -------------------------------------------------------------------------------- /view-pebble/src/main/resources/static/css/components/form-file.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Form file 4 | ========================================================================== */ 5 | /* 6 | * 1. Behave like form elements 7 | * 2. Create position context for dropdowns 8 | * 3. Clip content 9 | */ 10 | .uk-form-file { 11 | /* 1 */ 12 | display: inline-block; 13 | vertical-align: middle; 14 | /* 2 */ 15 | position: relative; 16 | /* 3 */ 17 | overflow: hidden; 18 | } 19 | /* 20 | * 1. Required for Firefox 21 | * 2. Expand height and required for the cursor 22 | */ 23 | .uk-form-file input[type="file"] { 24 | position: absolute; 25 | top: 0; 26 | z-index: 1; 27 | width: 100%; 28 | opacity: 0; 29 | cursor: pointer; 30 | /* 1 */ 31 | left: 0; 32 | /* 2 */ 33 | font-size: 500px; 34 | } 35 | -------------------------------------------------------------------------------- /view-pebble/src/main/resources/static/css/components/form-password.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Form password 4 | ========================================================================== */ 5 | /* 6 | * 1. Container width fits its content 7 | * 2. Create position context 8 | * 3. Prevent `inline-block` consequences 9 | */ 10 | .uk-form-password { 11 | /* 1 */ 12 | display: inline-block; 13 | /* 2 */ 14 | position: relative; 15 | /* 3 */ 16 | max-width: 100%; 17 | } 18 | .uk-form-password-toggle { 19 | display: block; 20 | position: absolute; 21 | top: 50%; 22 | right: 10px; 23 | margin-top: -6px; 24 | font-size: 13px; 25 | line-height: 13px; 26 | color: #999; 27 | } 28 | .uk-form-password-toggle:hover { 29 | color: #999; 30 | text-decoration: none; 31 | } 32 | .uk-form-password > input { 33 | padding-right: 50px !important; 34 | } 35 | -------------------------------------------------------------------------------- /view-pebble/src/main/resources/static/css/components/form-select.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Form select 4 | ========================================================================== */ 5 | /* 6 | * 1. Behave like form elements 7 | * 2. Create position context for dropdowns 8 | * 3. Clip content 9 | */ 10 | .uk-form-select { 11 | /* 1 */ 12 | display: inline-block; 13 | vertical-align: middle; 14 | /* 2 */ 15 | position: relative; 16 | /* 3 */ 17 | overflow: hidden; 18 | } 19 | /* 20 | * 1. Required for Firefox 21 | * 1. Required for Webkit to make `height` work 22 | */ 23 | .uk-form-select select { 24 | position: absolute; 25 | top: 0; 26 | z-index: 1; 27 | width: 100%; 28 | height: 100%; 29 | opacity: 0; 30 | cursor: pointer; 31 | /* 1 */ 32 | left: 0; 33 | /* 2 */ 34 | -webkit-appearance: none; 35 | } 36 | -------------------------------------------------------------------------------- /view-pebble/src/main/resources/static/css/components/placeholder.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Placeholder 4 | ========================================================================== */ 5 | .uk-placeholder { 6 | margin-bottom: 15px; 7 | padding: 15px; 8 | border: 1px dashed #ddd; 9 | background: #fafafa; 10 | color: #444; 11 | } 12 | /* 13 | * Add margin if adjacent element 14 | */ 15 | * + .uk-placeholder { 16 | margin-top: 15px; 17 | } 18 | /* 19 | * Remove margin from the last-child 20 | */ 21 | .uk-placeholder > :last-child { 22 | margin-bottom: 0; 23 | } 24 | /* Modifier: `uk-placeholder-large` 25 | ========================================================================== */ 26 | .uk-placeholder-large { 27 | padding-top: 80px; 28 | padding-bottom: 80px; 29 | } 30 | -------------------------------------------------------------------------------- /view-pebble/src/main/resources/static/css/components/sticky.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Sticky 4 | ========================================================================== */ 5 | /* 6 | * 1. More robust if padding and border are used 7 | * 2. Enable hardware acceleration for iOS browsers, resolves scrolling issue 8 | */ 9 | [data-uk-sticky].uk-active { 10 | z-index: 980; 11 | /* 1 */ 12 | box-sizing: border-box; 13 | /* 2 */ 14 | -webkit-backface-visibility: hidden; 15 | } 16 | /* 17 | * Faster animations 18 | */ 19 | [data-uk-sticky][class*='uk-animation-'] { 20 | -webkit-animation-duration: 0.2s; 21 | animation-duration: 0.2s; 22 | } 23 | [data-uk-sticky].uk-animation-reverse { 24 | -webkit-animation-duration: 0.2s; 25 | animation-duration: 0.2s; 26 | } 27 | -------------------------------------------------------------------------------- /view-pebble/src/main/resources/static/css/components/upload.css: -------------------------------------------------------------------------------- 1 | /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ 2 | /* ======================================================================== 3 | Component: Upload 4 | ========================================================================== */ 5 | /* 6 | * Create a box-shadow when dragging a file over the upload area 7 | */ 8 | .uk-dragover { 9 | box-shadow: 0 0 20px rgba(100, 100, 100, 0.3); 10 | } 11 | -------------------------------------------------------------------------------- /view-pebble/src/main/resources/static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/view-pebble/src/main/resources/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /view-pebble/src/main/resources/static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/view-pebble/src/main/resources/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /view-pebble/src/main/resources/static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/view-pebble/src/main/resources/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /view-pebble/src/main/resources/static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelliao/springcloud/bdcd5b963fd9cc4e9b87791bc71a47ba9409917f/view-pebble/src/main/resources/static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /view-pebble/src/main/resources/templates/_base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {% block title %} TITLE {% endblock %} 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 | SpringCloud 15 | 19 |
20 |
21 |
22 |
23 |
24 | {% block main %} 25 | MAIN 26 | {% endblock %} 27 |
28 |
29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /view-pebble/src/main/resources/templates/hello.html: -------------------------------------------------------------------------------- 1 | {% extends("_base") %} 2 | 3 | {% block title %} 4 | Hello {{ user.name }} 5 | {% endblock %} 6 | 7 | {% block main %} 8 |

Hello, {{ user.name }}!

9 |

ID: {{ user.id }}

10 |

Email: {{ user.email }}

11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /view-pebble/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends("_base") %} 2 | 3 | {% block title %} 4 | Index 5 | {% endblock %} 6 | 7 | {% block main %} 8 |

Hello, {{ name }}!

9 |

Welcome to visit Spring Boot Pebble App!

10 | {% endblock %} 11 | --------------------------------------------------------------------------------