Spring Cloud 学习案例,服务发现、服务治理、链路追踪、服务监控等

Overview

Spring Cloud Examples

Spring Cloud 使用的各种示例,以最简单、最实用为标准

Spring Cloud 中文索引  |   Spring Boot学习示例代码  |   参与贡献

English  |   github地址  |   码云地址

推荐程序员都关注的一个漫画公众号

关注后,回复:java 获取超过 10万 人领取的 Java 知识体系/面试必看资料。

Spring Cloud 使用的各种示例,以最简单、最实用为标准

Spring Boot 2.0 最全使用教程

学习系列:

综合篇:

如果大家想了解关于springcloud的其它方面应用,也可以以issues的形式反馈给我,我后续来完善。

关注公众号:纯洁的微笑,回复"springboot"进群交流

Comments
  • 启动springboot-admin后台总是异常

    启动springboot-admin后台总是异常

    https://github.com/ityouknow/spring-cloud-examples/tree/master/spring-boot-admin-eureka

    讲版本升级到了2.0.x

    能正常启动 但是总是后台总是定时打印这些异常

    2018-06-26 10:20:09.197 ERROR 27180 --- [nio-8000-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] threw exception
    
    java.io.IOException: 你的主机中的软件中止了一个已建立的连接。
    	at sun.nio.ch.SocketDispatcher.write0(Native Method) ~[na:1.8.0_40]
    	at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51) ~[na:1.8.0_40]
    	at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) ~[na:1.8.0_40]
    	at sun.nio.ch.IOUtil.write(IOUtil.java:65) ~[na:1.8.0_40]
    	at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471) ~[na:1.8.0_40]
    	at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    	at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    	at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:157) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    	at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doWrite(NioEndpoint.java:1276) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    	at org.apache.tomcat.util.net.SocketWrapperBase.doWrite(SocketWrapperBase.java:670) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    	at org.apache.tomcat.util.net.SocketWrapperBase.flushBlocking(SocketWrapperBase.java:607) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    	at org.apache.tomcat.util.net.SocketWrapperBase.flush(SocketWrapperBase.java:597) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    	at org.apache.coyote.http11.Http11OutputBuffer$SocketOutputBuffer.flush(Http11OutputBuffer.java:646) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    	at org.apache.coyote.http11.filters.ChunkedOutputFilter.flush(ChunkedOutputFilter.java:169) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    	at org.apache.coyote.http11.Http11OutputBuffer.flush(Http11OutputBuffer.java:252) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    	at org.apache.coyote.http11.Http11Processor.flush(Http11Processor.java:1564) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    	at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:352) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    	at org.apache.coyote.Response.action(Response.java:173) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    	at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:317) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    	at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:284) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    	at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:118) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    	at org.springframework.security.web.util.OnCommittedResponseWrapper$SaveContextServletOutputStream.flush(OnCommittedResponseWrapper.java:514) ~[spring-security-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    	at org.springframework.security.web.util.OnCommittedResponseWrapper$SaveContextServletOutputStream.flush(OnCommittedResponseWrapper.java:514) ~[spring-security-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    	at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:297) ~[na:1.8.0_40]
    	at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141) ~[na:1.8.0_40]
    	at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229) ~[na:1.8.0_40]
    	at org.springframework.util.StreamUtils.copy(StreamUtils.java:121) ~[spring-core-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    	at org.springframework.http.converter.StringHttpMessageConverter.writeInternal(StringHttpMessageConverter.java:103) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    	at org.springframework.http.converter.StringHttpMessageConverter.writeInternal(StringHttpMessageConverter.java:43) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    	at org.springframework.http.converter.AbstractHttpMessageConverter.write(AbstractHttpMessageConverter.java:224) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    	at org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitterReturnValueHandler$HttpMessageConvertingHandler.sendInternal(ResponseBodyEmitterReturnValueHandler.java:199) ~[spring-webmvc-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    	at org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitterReturnValueHandler$HttpMessageConvertingHandler.send(ResponseBodyEmitterReturnValueHandler.java:189) ~[spring-webmvc-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    	at org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitter.sendInternal(ResponseBodyEmitter.java:189) ~[spring-webmvc-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    	at org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitter.send(ResponseBodyEmitter.java:183) ~[spring-webmvc-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    	at org.springframework.web.servlet.mvc.method.annotation.SseEmitter.send(SseEmitter.java:133) ~[spring-webmvc-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    	at org.springframework.web.servlet.mvc.method.annotation.ReactiveTypeHandler$SseEmitterSubscriber.send(ReactiveTypeHandler.java:341) ~[spring-webmvc-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    	at org.springframework.web.servlet.mvc.method.annotation.ReactiveTypeHandler$AbstractEmitterSubscriber.run(ReactiveTypeHandler.java:283) ~[spring-webmvc-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40]
    
    2018-06-26 10:20:09.202 ERROR 27180 --- [nio-8000-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception
    

    项目地址: https://github.com/springseries/springboot-admin-demo/tree/master/bootadmin

    不知道你开发过程中遇到这个问题没有?

    opened by maskleo 2
  • spring-cloud-eureka-two项目报错启动报错

    spring-cloud-eureka-two项目报错启动报错

    按照http://www.ityouknow.com/springcloud/2017/05/10/springcloud-eureka.html 进行操作 win 10,jdk 1.8 apache-maven-3.5.3 spring-cloud-eureka-0.0.1-SNAPSHOT.jar文件在target文件夹下面 java -jar spring-cloud-eureka-0.0.1-SNAPSHOT.jar --spring.profiles.active=peer1 运行之后报错 spring-cloud-eureka-two项目报错Error: Unable to access jarfile spring-cloud-eureka-0.0.1-SNAPSHOT.jar

    opened by edidada 2
  • zuul高级篇疑问

    zuul高级篇疑问

    你好,看了你的博客: http://www.ityouknow.com/springcloud/2018/01/20/spring-cloud-zuul.html 发现不能使用github登录,没法儿留言,所以在此提问。

    将源码dow下来,修改了一下属性 试了一下,发现有这样的一个问题: retry 只能retry到同一个实例,如果达到retry阈值后,还是会返回The service is unavailable. 期待的效果是 同一个服务 A实例 睡眠时长超过熔断时长,能retry到B实例,并返回数据.

    属性配置: ribbon.MaxAutoRetries=0 ribbon.MaxAutoRetriesNextServer=1

    opened by seeusagain 2
  • zipkin 页面打不开

    zipkin 页面打不开

    大神你好,我按照你spring-cloud-sleuth-zipkin 进行测试时候,发现zipkin页面打不开 地址:http://localhost:9000/zipkin/ 错误信息: Whitelabel Error Page

    This application has no explicit mapping for /error, so you are seeing this as a fallback.

    Mon Jun 11 19:39:45 CST 2018 There was an unexpected error (type=Internal Server Error, status=500). class path resource [zipkin-ui/index.html] cannot be resolved to URL because it does not exist

    帮忙看下是什么问题,谢谢

    opened by kuafuliu 1
  • 调用Hystric异常,Hystric什么情况下会进入fallback

    调用Hystric异常,Hystric什么情况下会进入fallback

    项目由eureka server, eureka client. Hystric+Feigh 三个boot组成,eureka client作为服务,调用本地exe程序,直接通过client的端口访问,调用正常;但是通过Hystric+Feigh 转发到eureka client去调用本地exe程序,当exe在执行的时候,Hystric马上进入fallback状态,已经设置Hystric execution.timeout.enabled:false, 想了解Hystric什么情况下会进入fallback

    opened by gxianch 1
Owner
纯洁的微笑
Open source is a spirit, I enjoy it.
纯洁的微笑
一个涵盖六个专栏:Spring Boot 2.X、Spring Cloud、Spring Cloud Alibaba、Dubbo、分布式消息队列、分布式事务的仓库。希望胖友小手一抖,右上角来个 Star,感恩 1024

友情提示:因为提供了 50000+ 行示例代码,所以艿艿默认注释了所有 Maven Module。 胖友可以根据自己的需要,修改 pom.xml 即可。 一个涵盖六个主流技术栈的正经仓库: 《Spring Boot 专栏》 《Spring Cloud Alibaba 专栏》 《Spring Clou

芋道源码 15.6k Dec 7, 2022
Demo microservice architecture with Spring ,Spring Cloud Gateway , Spring Cloud config server , Eureuka , keycloak and Docker.

spring-microservice Demo microservice architecture with Spring ,Spring Cloud Gateway , Spring Cloud config server , Eureuka , keycloak and Docker. Arc

null 4 Sep 13, 2022
A high availability shopping(ecommerce) system using SpringBoot, Spring Cloud, Eureka Server, Spring Cloud Gateway, resillience4j, Kafka, Redis and MySQL.

High-availability-shopping-system A high availability shopping(ecommerce) system using SpringBoot, Spring Cloud, Eureka Server, Spring Cloud Gateway,

LeiH 1 Oct 26, 2022
A spring cloud infrastructure provides various of commonly used cloud components and auto-configurations for high project consistency

A spring cloud infrastructure provides various of commonly used cloud components and auto-configurations for high project consistency.

Project-Hephaestus 2 Feb 8, 2022
一套涵盖大部分核心组件使用的Spring Cloud教程,包括Spring Cloud Alibaba及分布式事务Seata,基于Spring Cloud Greenwich及SpringBoot 2.1.7。22篇文章,篇篇精华,32个Demo,涵盖大部分应用场景。

springcloud-learning 简介 一套涵盖大部分核心组件使用的Spring Cloud教程,包括Spring Cloud Alibaba及分布式事务Seata,基于Spring Cloud Greenwich及SpringBoot 2.1.7。22篇文章,篇篇精华,32个Demo,涵盖

macro 5.5k Dec 3, 2022
mall-swarm是一套微服务商城系统,采用了 Spring Cloud Hoxton & Alibaba、Spring Boot 2.3、Oauth2、MyBatis、Docker、Elasticsearch、Kubernetes等核心技术,同时提供了基于Vue的管理后台方便快速搭建系统。mall-swarm在电商业务的基础集成了注册中心、配置中心、监控中心、网关等系统功能。文档齐全,附带全套Spring Cloud教程。

mall-swarm 友情提示 快速体验项目:在线访问地址。 全套学习教程:《mall学习教程》。 Spring Cloud全套教程:《SpringCloud学习教程》。 专属学习路线:学习不走弯路,整理了套非常不错的《mall专属学习路线》。 项目交流:想要加群交流项目的朋友,可以加入mall项目

macro 9.6k Nov 29, 2022
芋道 mall 商城,基于微服务的思想,构建在 B2C 电商场景下的项目实战。核心技术栈,是 Spring Boot + Dubbo 。未来,会重构成 Spring Cloud Alibaba 。

[toc] 友情提示:近期在升级和优化该项目,建议先 Star 本项目。主要在做几个事情: 1、微服务技术选型以 Spring Cloud Alibaba 为中心。 2、修改项目分层,并合并部分服务,简化整体服务的复杂性。 3、将管理后台从 React 重构到 Vue 框架。 交流群:传送门 前言

芋道源码 6.8k Dec 1, 2022
An integration solution for Spring Cloud and Tencent middleware - Spring Cloud和腾讯中间件的集成方案

Spring Cloud Tencent English | 简体中文 Introduction Spring Cloud Tencent contains components distributed micro-service applications need during developin

Tencent 2.6k Dec 4, 2022
Spring boot microservice example with Eureka Server + Eureka Client + Spring Cloud API Gateway + OAuth2.0 + Circuit Breaker + Resilience4J + FeignClient + RestTemplate

Spring boot microservice example Spring boot microservice example with Eureka Server + Eureka Client + Spring Cloud API Gateway + OAuth2.0 + Circuit B

Subhash Lamba 45 Nov 7, 2022
Microservice Architecture with Spring Boot, Spring Cloud and Docker

Piggy Metrics Piggy Metrics is a simple financial advisor app built to demonstrate the Microservice Architecture Pattern using Spring Boot, Spring Clo

Alexander Lukyanchikov 12k Nov 30, 2022
Spring Boot microservices app with Spring Cloud, Robust and resilient backend managing e-Commerce app

e-Commerce-boot μServices Important Note: This project's new milestone is to move The whole system to work on Kubernetes, so stay tuned. Introduction

Selim Horri 60 Nov 25, 2022
Sample Spring-Cloud-Api-Gateway Project of Spring Boot

Sample-Spring-Cloud-Api-Gateway Sample Spring-Cloud-Api-Gateway Project of Spring Boot Proejct Stack Spring Webflux Spring Cloud Gateway Spring Data R

Seokhyun 2 Jan 17, 2022
该仓库中主要是 Spring Boot 的入门学习教程以及一些常用的 Spring Boot 实战项目教程,包括 Spring Boot 使用的各种示例代码,同时也包括一些实战项目的项目源码和效果展示,实战项目包括基本的 web 开发以及目前大家普遍使用的线上博客项目/企业大型商城系统/前后端分离实践项目等,摆脱各种 hello world 入门案例的束缚,真正的掌握 Spring Boot 开发。

Spring Boot Projects 该仓库中主要是 Spring Boot 的入门学习教程以及一些常用的 Spring Boot 实战项目教程,包括 Spring Boot 使用的各种示例代码,同时也包括一些实战项目的项目源码和效果展示,实战项目包括基本的 web 开发以及目前大家普遍使用的前

十三 4.4k Nov 30, 2022
SpringBlade 是一个由商业级项目升级优化而来的SpringCloud分布式微服务架构、SpringBoot单体式微服务架构并存的综合型项目,采用Java8 API重构了业务代码,完全遵循阿里巴巴编码规范。采用Spring Boot 2.4 、Spring Cloud 2020 、Mybatis 等核心技术,同时提供基于React和Vue的两个前端框架用于快速搭建企业级的SaaS多租户微服务平台。

SpringBlade微服务开发平台 采用前后端分离的模式,前端开源两个框架:Sword (基于 React、Ant Design)、Saber (基于 Vue、Element-UI) 后端采用SpringCloud全家桶,并同时对其基础组件做了高度的封装,单独开源出一个框架:BladeTool B

Chill 5.8k Dec 7, 2022
Tuya 36 Nov 17, 2022
End to End project for Kafka Streams using Spring Cloud Kafka streams

Spring Kafka Streams using Spring Cloud Streams End to End example Endpoint http://localhost:8080/domain/lookup/facebook - to pull all facebook relate

TechPrimers 42 Nov 8, 2022
企业级 Spring Cloud Alibaba 微服务脚手架,nacos 配置中心、Oauth2认证与鉴权、Docker 容器化部署,开发环境一键式脚本安装,10分钟即可构建

云龙 Cloud Dragon 适合于企业级别的微服务开发脚手架,功能齐全,开箱即用,部署快捷 目前项目处于开发阶段,部分功能已经可以使用,后续会逐步完成其他规划内容,并完善项目文档,如果你在使用过程中遇到任何问题,可以通过 QQ 群聊联系我,请戳这里 加入群聊。 ?? 项目介绍 Cloud Dra

chenxiaolong 16 Sep 27, 2022
The project aim at easier to start a spring boot/cloud project.

easy-starters 是一个公共 starter 集合,旨在帮助 java 开发者快速构建 Springboot 与 Spring Cloud 项目. lx-starters的环境要求 JDK requirement: JDK 1.8+ Spring booter 2.x,+ 如何引用lx-s

null 3 Jul 11, 2022
Spring Cloud Netflix Hystrix Dashboard template resolution vulnerability CVE-2021-22053

CVE-2021-22053: Spring Cloud Netflix Hystrix Dashboard template resolution vulnerability Severity High Vendor Spring by VMware Description Application

SCSL 37 Nov 9, 2022