I am trying to create a Spring Cloud configuration server which reads the configuration data from the properties file and not a github. The server starts, but does not serve
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).