惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
A
About on SuperTechFans
Apple Machine Learning Research
Apple Machine Learning Research
The Register - Security
The Register - Security
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
人人都是产品经理
人人都是产品经理
MyScale Blog
MyScale Blog
云风的 BLOG
云风的 BLOG
博客园_首页
U
Unit 42
T
Tailwind CSS Blog
G
GRAHAM CLULEY
F
Full Disclosure
V
Vulnerabilities – Threatpost
T
Tenable Blog
月光博客
月光博客
P
Privacy & Cybersecurity Law Blog
P
Privacy International News Feed
K
Kaspersky official blog
Scott Helme
Scott Helme
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
N
News and Events Feed by Topic
T
The Exploit Database - CXSecurity.com
N
News and Events Feed by Topic
有赞技术团队
有赞技术团队
Recent Commits to openclaw:main
Recent Commits to openclaw:main
L
LINUX DO - 最新话题
Recorded Future
Recorded Future
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Help Net Security
Help Net Security
The GitHub Blog
The GitHub Blog
Cisco Talos Blog
Cisco Talos Blog
SecWiki News
SecWiki News
P
Proofpoint News Feed
Security Latest
Security Latest
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
罗磊的独立博客
S
Security Affairs
M
MIT News - Artificial intelligence
L
LINUX DO - 热门话题
美团技术团队
Simon Willison's Weblog
Simon Willison's Weblog
T
Threat Research - Cisco Blogs
Stack Overflow Blog
Stack Overflow Blog
Forbes - Security
Forbes - Security
Hugging Face - Blog
Hugging Face - Blog
博客园 - Franky
V
Visual Studio Blog

博客园 - 朕也就是个普通人

毕业快11年了,我仍是程序猿 平凡的生活~ 反思亲子相处~ cxf RESTful service client Python + sqlalchemy + Pandas + Mysql 实现自动创建表,插入数据 cucumber 加油 重新学习python爬虫 python 网址 《高兴》 贾平凹 摘抄 funny python ML 算法 tensorflow 机器学习(Machine Learning) 最近的日子-2019/8/12 工作上的态度 保持运动 对心情很重要 读《Linux命令行与shell脚本编程大全.第3版》 我的老妈挺可爱 看看书
Eureka 注册中心 和 Config中心 配置
朕也就是个普通人 · 2019-08-12 · via 博客园 - 朕也就是个普通人

Eureka config:

1 import spring-cloud-starter-netflix-eureka-client jar in pom.xml

<dependency>
   <groupId>org.springframework.cloud</groupId>
   <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>

2 add @EnableDiscoveryClient in startup class “application.java”

3 add configuration in yml.

eureka:

  client:

    service-url:

      defaultZone: http://hostname:port/eureka # eureka server

 Config中心:

1 import spring-cloud-starter-config jar in pom.xml

<dependency>

   <groupId>org.springframework.cloud</groupId>

   <artifactId>spring-cloud-starter-config</artifactId>

</dependency>

2 add configuration in bootstrap.yml

spring:

  application:

    name: apexa-fx-data-grabber

  cloud:

    config:

      uri: http://hostname:port/ # config server

      name: fx-cient # application name

3 add configuration files in git repo assigned by config server 

4 do not need to restart server to change configuration

First, add spring-boot-starter-actuator jar in pom.xml.

<dependency>
     <groupId>org.springframework.boot</groupId>
     <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

Then, add configuration in bootstrap.yml

management:

  endpoints:

    web:

      exposure:

        include: refresh

and add Annotate Your configuration beans and beans where annotation Value is used with annotation @RefreshScope

after changing configuration, need to post http://[instance host]:[port]/actuator/refresh to valid it.