百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

configserver

> 编程语言
开源

配置服务器示例 注意: 此项目需要在本地机器上运行 rabbitmq。将此项目作为 Spring Boot 应用程序运行,例如导入到 IDE 中…

388 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

配置服务器示例 注意: 此项目需要在本地机器上运行 rabbitmq。将此项目作为 Spring Boot 应用程序运行,例如导入到 IDE 中…

Config Server Sample

NOTE: This project requires rabbitmq running on localhost.

Run this project as a Spring Boot app, e.g. import into IDE and run main method, or use Maven:

$ ./mvnw spring-boot:run

or

$ ./mvnw package
$ java -jar target/*.jar

It will start up on port 8888 and serve configuration data from "https://github.com/spring-cloud-samples/config-repo":

Pre-requisites

You need to be running rabbitmq locally (there is a docker-compose.yml if you would like to use that). This is to support broadcast of config changes to client apps via Spring Cloud Stream. If you want to play and don't need that feature just comment out the monitor and rabbitmq dependencies.

Resources

Path Description
/{app}/{profile} Configuration data for app in Spring profile (comma-separated).
/{app}/{profile}/{label} Add a git label
/{app}/{profile}{label}/{path} An environment-specific plain text config file (at "path")

Security

The server is not secure by default. You can add HTTP Basic authentication by including an extra dependency on Spring Security (e.g. via spring-boot-starter-security). The user name is "user" and the password is printed on the console on startup (standard Spring Boot approach), e.g.

2014-10-23 08:55:01.579  INFO 8185 --- [           main] b.a.s.AuthenticationManagerConfiguration :

Using default security password: 83805c57-8c76-4940-ae17-299359888177

There is also a password stored in a keystore in the jar file if you want to use that for a more realistic simulation of a real system. To unlock the password you need the full strength JCE extensions (download from Oracle and unpack the zip then copy the jar files to /jre/lib/security), and the keystore password ("foobar" stored in plain text in this README for the purposes of a demo, but in a real system you would keep it secret and only expose via environment variables). The password is bound to the app from the Spring environment key keystore.password (so an OS environment variable KEYSTORE_PASSWORD works). E.g.

$ KEYSTORE_PASSWORD=foobar java -jar target/*.jar

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Java

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言