《一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频+实战项目源码》,点击传送门,即可获取!
client:
service-url:
defaultZone: http://localhost:10086/eureka
fetch-registry: true #是否拉取服务,默认为true
registry-fetch-interval-seconds: 5 #拉取服务的间隔时间
service-provider:
ribbon:
NFLoadBalancerRuleClassName: com.netflix.loadbalancer.RandomRule
hystrix:
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 6000 #设置hystrix的超时时间为6000ms
feign:
hystrix:
enabled: true #开启Feign的熔断功能
Eureka服务注册中心:
server:
port: 10086
spring:
application:
name: ly-eureka #将来会作为微服务名称注入到eureka容器
eureka:
client:
service-url:
defaultZone: http://localhost:${server.port}/eureka
#server:
#eviction-interval-timer-in-ms: 5000 #失效剔除时间,单位毫秒
#enable-self-preservation: false #关闭自我保护状态
Zuul网关:
server:
port: 10010
spring:
application:
name: ly-zuul
#zuul: #路由配置方式1
#routes:
#service-provider:
#path: /service-provider/**
#url: http://localhost:8081
#zuul: #路由配置方式2
#routes:
#service-provider:
#path: /service-provider/**
#serviceId: service-provider
zuul: #路由配置方式3,推荐
routes:
service-provider: /provider/**
service-consumer: /consumer/**
prefix: /api
eureka:
client:
service-url:
defaultZone: http://localhost:10086/eureka
启动器相关:
org.springframework.boot
spring-boot-starter-web
org.mybatis.spring.boot
mybatis-spring-boot-starter
2.1.4
tk.mybatis
mapper-spring-boot-starter
2.0.4
mysql
mysql-connector-java
8.0.11
runtime
org.springframework.boot
spring-boot-starter-jdbc
org.springframework.boot
spring-boot-starter-actuator
org.springframework.cloud
spring-cloud-starter-netflix-eureka-server
org.springframework.cloud
spring-cloud-starter-netflix-eureka-client
2.0.0.RELEASE
org.springframework.cloud
spring-cloud-starter-netflix-zuul
org.springframework.cloud
spring-cloud-starter-netflix-hystrix
com.github.pagehelper
pagehelper-spring-boot-starter
org.springframework.cloud
spring-cloud-starter-openfeign
分享
这次面试我也做了一些总结,确实还有很多要学的东西。相关面试题也做了整理,可以分享给大家,了解一下面试真题,想进大厂的或者想跳槽的小伙伴不妨好好利用时间来学习。学习的脚步一定不能停止!
Spring Cloud实战
Spring Boot实战
面试题整理(性能优化+微服务+并发编程+开源框架+分布式)
《一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频+实战项目源码》,点击传送门,即可获取!
来学习。学习的脚步一定不能停止!
[外链图片转存中…(img-4IPZ3CUR-1714672147444)]
Spring Cloud实战
[外链图片转存中…(img-bWByGufA-1714672147444)]
Spring Boot实战
[外链图片转存中…(img-sxcKbKAN-1714672147445)]
面试题整理(性能优化+微服务+并发编程+开源框架+分布式)
《一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频+实战项目源码》,点击传送门,即可获取!