Page History
...
Code Block | ||
---|---|---|
| ||
spring.profiles.active=native, development-tools spring.cloud.config.server.bootstrap=true spring.cloud.config.server.native.searchLocations=file:${spring.config.location:.} |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
java -Dspring.profiles.active="native,cmis-client,comments-sql-store,customerdata-sql-store,dashboard,development-tools,managementservice-client,process-sql-store,publisher-client,reporting-sql-store,trace-sql-store" -Dspring.config.location="%~dp0/Runtime/Java/conf/" -jar Runtime/Java/bin/blueriq-runtime-standalone.jar
|
File System Backend
There is also a "native" profile in the Config Server that doesn’t use Git, but just loads the config files from the local classpath or file system (any static URL you want to point to with "spring.cloud.config.server.native.searchLocations"). To use the native profile just launch the Config Server with "spring.profiles.active=native".
Remember to use the "file:" prefix for file resources (the default without a prefix is usually the classpath). Just as with any Spring Boot configuration you can embed ${}-style environment placeholders, but remember that absolute paths in Windows require an extra "/", e.g. file:///${user.home}/config-repo
The Config Server runs best as a standalone application, but if you need to you can embed it in another application. Just use the @EnableConfigServer annotation. An optional property that can be useful in this case is spring.cloud.config.server.bootstrap which is a flag to indicate that the server should configure itself from its own remote repository. The flag is off by default because it can delay startup, but when embedded in another application it makes sense to initialize the same way as any other application.
If you want to read the configuration for an application directly from the backend repository (instead of from the config server) that’s basically an embedded config server with no endpoints. You can switch off the endpoints entirely if you don’t use the @EnableConfigServer annotation (just set spring.cloud.config.server.bootstrap=true).
...
Further reading
Children Display |
---|
- Spring Cloud Config [editor]
- Reading properties from file system [editor]
http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html
http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html