spring cloud 集成的源码
来源:互联网 发布:换手率软件使用说明 编辑:程序博客网 时间:2024/06/17 06:47
https://github.com/wangxinforme/sc
sc 介绍
它是一个基于SpringCloud的分布式服务示例项目、集成有eureka、ribbon、feign、hystrix组件等,消费端有JSP、freemarker、thymeleaf三个版本,同时集成了shiro、swagger2等,后面会接着完善
包含工程有:
sc-commons:用于放common公共相关类的工程,所有工程都可以引用。
sc-eureka:Netflix Eureka云端负载均衡,一个基于REST的服务,用于定位服务,以实现云端的负载均衡和中间层服务器的故障转移。
sc-eureka-consumer-freemarker:client端,即consumer服务消费者,前端采用的是freemarker,集成了shiro。
sc-eureka-consumer-jsp:client端,即consumer服务消费者,前端采用的是jsp,集成了shiro。
sc-eureka-consumer-thymeleaf:client端,即consumer服务消费者,前端采用的是thymeleaf,集成了shiro。
sc-eureka-hystrix:集成hystrix的示例
sc-eureka-provider:server端,即provider服务提供端,端口是随机分配的,可以启动多个服务对ribbon验证服务负载,当中集成了swagger2
sc-feign:SpringCloud Netflix Feign,声明的接口。
示例启动
初始化数据库,将sc/ddl/mysql_test.sql脚本初始化在默认数据库当中
按顺序依次启动项目工程: sc-eureka、sc-eureka-provider、sc-eureka-consumer-freemarker、sc-eureka-consumer-jsp、sc-eureka-consumer-thymeleaf
启动方式,运行: com.wangxin.Application.main(String[]) 方法
访问 sc-eureka
浏览器访问
http://localhost:1111,Application表格当中可以看到注册上来的server与client,表明启动都成功了
访问 sc-eureka-provider
浏览器访问
http://localhost:2000/msg,看到“来自于server ...”则证明访问成功
浏览器访问
http://localhost:2000,进入swagger2 ui页面
访问 sc-eureka-consumer-freemarker
浏览器访问
http://localhost:3000,会看到登录页面
访问 sc-eureka-consumer-jsp
浏览器访问
http://localhost:4000,会看到登录页面
访问 sc-eureka-consumer-thymeleaf
浏览器访问
http://localhost:5000,会看到登录页面
- spring cloud 集成的源码
- Spring Cloud 集成 kafka
- spring 集成 spring cloud config 的相关知识
- Spring Cloud脚手架源码
- Spring Cloud(九)高可用的分布式配置中心 Spring Cloud Config 集成 Eureka 服务
- spring-cloud-feign集成feign的几个注意事项
- Cloud Foundry samples学习笔记7:Cloud Foundry上的Spring Integration应用集成
- spring boot项目集成spring cloud/docker
- Spring Cloud源码分析Ribbon
- Spring cloud系列十一 @Feign集成的Hystrix进行个性化配置及集成原理
- Spring cloud oauth2.0的源码解析与实践Demo
- Spring Cloud(十一)高可用的分布式配置中心 Spring Cloud Bus 消息总线集成(RabbitMQ)
- Spring Cloud Sleuth (2)-与ELK集成
- Spring Cloud Bus 消息总线集成Kafka
- Spring cloud系列七 为@Feign中集成的Ribbon进行个性化配置
- Spring Cloud源码分析(二)Ribbon
- Spring Cloud源码分析(一)Eureka
- Spring Cloud源码分析(一)Eureka
- js图片上传预览
- JAVA重要知识!反射!
- 用户拒绝的不是广告,而是主动的信息浏览权限
- Oracle行转列函数wm_concat
- Raspberrypi 3 系统备份还原, 基于最小系统镜像实现
- spring cloud 集成的源码
- NiceLabel教程—创建连续数据变量
- pip安装报错:is not a supported wheel on this platform
- 下厨房-网易python(去重)
- Java普通for和增强for探究
- git
- mysql 常用命令
- OneNET与第三方平台对接(最简单方式)
- IllegalStateException: This Activity already has an action bar supplied by the window decor.