springcloud框架怎么搭建( 二 )




5Zuul网关组件,供给智能路由、拜候过滤等功能 。
<depency>
   <groupId>org.springframework.cloud</groupId>
   <artifactId>spring-cloud-starter-zuul</artifactId>
</depency>
zuul也需要零丁起一个办事 。 而且zuul需要注册到Eureka,zuul的设置装备摆设如下:

springcloud框架怎么搭建



6别的,利用SpringCloud的这些组件,需要在启动类中添加如下的设置装备摆设:
【springcloud框架怎么搭建】@EnableDiscoveryClient
@EnableScheduling
@EnableCircuitBreaker
@SpringBootApplication
springcloud框架怎么搭建



注重事项SpringCloud的每个组件整合都需要零丁的篇幅去介绍,后续再为大师讲解 。

以上内容就是springcloud框架怎么搭建的内容啦,希望对你有所帮助哦!

猜你喜欢