Git Product home page Git Product logo

summer's Introduction

summer

Spring-Cloud Spirng boot code Project (Practice)

jj-eureka

在测试的时候比较每次都要用工具去启动Eureka 比较操蛋.将其打成jar包, 将jar包拷到固定位置方便以后多个jar 一起好找(本人就将其和zuul的项目放在一起)。 跑其他在开发的程序也方便。 cmd 或是直接写bat脚本 java -jar X:xxx/xxx/jj-eureka.jar

jj-eureka-ha

Eureka 的HA: 通过类似于zookeeper 集群的形式相互发现,三个不一起启动的时候会报错,单依然可用 配置文件中的 jie1 jie2 jie3 均为系统的host名称 对应的ip 127.0.0.1

jj-session-share

该项目为我做测试spring-session和redis做 session共享的测试项目。

jj-gateway-zuul

该项目为网关入口。配置文件中要注意: zuul: add-host-header: true sensitive-headers:  (这里一定要不填写) 默认源码里是这样写的:
private Set sensitiveHeaders = new LinkedHashSet<>( Arrays.asList("Cookie", "Set-Cookie", "Authorization")); 也就是说默认不写这里面就是 "Cookie", "Set-Cookie", "Authorization" Cookie和权限都被拦截。 这里不要填写,然后将子包需要用到Session共享的request 都得添加spring-session-data-redis 和 spring-boot-starter-data-redis 然后 配置redis的信息。

 子包的启动主类必须加上 @EnableRedisHttpSession 标签 才可扫描并由spring-session接管request中的session。

 如何验证session 共享成功? 你访问接口时,如果sessionid 是不变的  与 zuul上的测试sessionid 一致说明共享成功。 feign中的session 共享也匹配成功。

jj-rabbitmq

RabbitMQ的服务端,用springboot 写的,比较方便,比传统的配置XML文件形式舒服很多

jj-rabbit-client

RabbitMQ的客户端,用例很简单。 本人测试用例运行在Windows 10上 1个服务端8万数据的发送,差不多5分钟,启了3个接收端差不多10分钟内完成,速度还是可以接受。

关于 Ribbon 的项目暂时不想写

个人觉得不是特殊的项目需要运用到其他方式的负责均衡用feign就可以了。参考了很多国外的高手写的微服务,大多都直接上feign。

关于 Hystrix的项目 没有整合好 hystrix-turbine-mq

如有其他问题或是关于技术的讨论可通过本人的邮箱联系 可能提Issues会比较慢回复。

本人邮箱[email protected]

summer's People

Contributors

jiangjie714 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.