spring - 如何在新的 Spring Boot 2.4 中迁移 kubernetes 配置
问题描述
我按照这个例子在 kubernetes 中加载更多的配置映射,所以我在我的项目中创建了 bootstrap.properties。但是,spring boot 2.4 现在不再支持 bootstrap,但我找不到如何在doc中替换它
现在我的属性看起来像:
引导程序:
spring:
application:
name: @appname@
cloud:
kubernetes:
config:
sources:
- name: "@appname@"
- name: "@appname@-db"
reload:
enabled: true
和应用程序 Kubernetes:
spring:
mvc:
servlet:
path: /mypath/
server:
servlet:
context-path: "@default.context.path@"
port: 8080
management:
server.port: 8081
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
probes:
enabled: true
shutdown:
enabled:
true
metrics:
export:
prometheus.enabled: true
health:
livenessstate:
enabled: true
readinessstate:
enabled: true
捕捉新的弹簧靴功能的正确方法是什么?
更新
在这里,我在应用程序属性中找到了配置源无法通过的另一个链接
解决方案
推荐阅读
- java - 更新查询游标 - 无法从 CursorWindow 读取第 0 行,列 -1
- python-3.x - 与 Pandas GroupBy 的第一个区别不起作用:“SeriesGroupBy”对象不可调用错误
- python - Pyparsing 缩进和去缩进
- unixodbc - Linux 上的普遍 v10 ODBC 安装
- php - 高级自定义归档获取字段的条款不起作用
- python - 两个 python 列表之间的部分匹配,一个列表完全存在于另一个列表中,而 Python 中的附加字符很少
- typescript - 如何使用 TypeScript 中编码的 CloudFunction 将 admin.firestore.FieldValue.serverTimestamp() 传递给 update() 方法
- android - Exoplayer/Android 媒体播放器不使用 AC3 音频播放视频
- reactjs - 单击 react-bootstrap-table 2 中的单元格时显示 react Bootstrap Popover
- dji-sdk - DJI SDK Android - 时间线任务中 GoToAction 上不需要的偏航运动