# spring-cloud-demo **Repository Path**: ablozhou/spring-cloud-demo ## Basic Information - **Project Name**: spring-cloud-demo - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-06-08 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Getting Started ``` mvn install mvn clean package ``` # run order 1. EurekaApplication.java -- 服务注册中心 2. ConfigApplication.java -- 服务配置中心 3. AdminApplication.java -- 系统管理模块,包含断路器sentinel 4. AuthApplication.java -- 授权模块 5. GatewayApplication.java -- Gateway网关 跟踪器和spring boot admin没有添加和测试 # 测试: - localhost:8080 eureka - localhost:8888 config, 运行起来后在浏览器访问 http://localhost:8888/application-admin/dev - localhost:9002 admin localhost:9002/hello/xxxx 会echo xxxx。xxxx为任意字符。 - localhost:9003 auth localhost:9003/hello/xxxx 会通过admin响应,echo xxxx。由于有断路器,可以关闭admin,看到fallback - localhost:9004 gateway localhost:9003/hello/xxxx 会通过auth,再远程调用admin响应,echo xxxx。 ### Reference Documentation For further reference, please consider the following sections: * [Demo](https://tycoding.cn/2019/05/30/cloud/cloud-template-api/) * [Official Apache Maven documentation](https://maven.apache.org/guides/index.html) * [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.3.0.RELEASE/maven-plugin/reference/html/) * [Create an OCI image](https://docs.spring.io/spring-boot/docs/2.3.0.RELEASE/maven-plugin/reference/html/#build-image) * [Spring Configuration Processor](https://docs.spring.io/spring-boot/docs/2.3.0.RELEASE/reference/htmlsingle/#configuration-metadata-annotation-processor) * [Spring Boot Admin (Client)](https://codecentric.github.io/spring-boot-admin/current/#getting-started) * [MyBatis Framework](https://mybatis.org/spring-boot-starter/mybatis-spring-boot-autoconfigure/) * [Resilience4J](https://cloud.spring.io/spring-cloud-static/spring-cloud-circuitbreaker/current/reference/html) * [Spring Web](https://docs.spring.io/spring-boot/docs/2.3.0.RELEASE/reference/htmlsingle/#boot-features-developing-web-applications) * [Spring Boot Admin (Server)](https://codecentric.github.io/spring-boot-admin/current/#getting-started) * [Spring Boot DevTools](https://docs.spring.io/spring-boot/docs/2.3.0.RELEASE/reference/htmlsingle/#using-boot-devtools) ### Guides The following guides illustrate how to use some features concretely: * [Centralized Configuration](https://spring.io/guides/gs/centralized-configuration/) * [MyBatis Quick Start](https://github.com/mybatis/spring-boot-starter/wiki/Quick-Start) * [Service Registration and Discovery](https://spring.io/guides/gs/service-registration-and-discovery/) * [Routing and Filtering](https://spring.io/guides/gs/routing-and-filtering/) * [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/) * [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/) * [Building REST services with Spring](https://spring.io/guides/tutorials/bookmarks/) * [Accessing data with MySQL](https://spring.io/guides/gs/accessing-data-mysql/)