Spring-Cloud configuration server ignores configuration properties file

大憨熊 提交于 2019-11-28 10:20:02

By default, the config server serves properties from git. You will need to set the profile to native using --spring.profiles.active=native for the configserver to serve the spring environment. The spring.config.name for the config server is programmatically set to spring.config.name=configserver so your properties file will need to be configserver.properties.

The "/admin/env" endpoint in a config server only serves the local configuration of the server itself. The server is usually just a regular Spring Boot app, so it gets its configuration from "application.properties". If you want to pick it up from "config-server.properties" you need to set "spring.config.name" or "spring.config.location" (just like a normal Boot app).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!