Comments (3)
Hi @yadavan88 , currently we don't support reading from HOCON format.
If you mean you're moving away from HOCON, then yes that's the right way to do it. You could also have .withPrefix("mongo.")
and .withPrefix("postgres.")
and then after they're composed together, put a .withPrefix("database.")
on the outside, but that depends on how you structure your config code. Whichever way works best for you is the one you should choose.
from clear-config.
from clear-config.
@japgolly I came to know about this library and it is really awesome :) Thanks
Regarding the hocon format, if I currently have a config format as:
database {
mongo {
username = "mongoUser"
password = "pass1"
}
postgres {
username = "pgUser"
password = "pass2"
}
}
I should re-write them as and use .withPrefix("database.mongo.")
and withPrefix("database.postgres.")
database.mongo.username = "mongoUser"
database.mongo.password = "pass1"
database.postgres.username = "pgUser"
database.postgres.password = "pass2"
Is this correct, or am I missing something?
from clear-config.
Related Issues (20)
- Feedback: Transformation / upgrades. HOT 3
- ConsumerFn defaults don't appear in the report HOT 1
- Export Report HOT 1
- Add ConfigValueParser for regex
- Rename `valueDisplay0`
- Add `ConfigValueParser[UUID]`
- Add `ConfigValueParser[URI]` HOT 1
- `.option` is too intense
- Default values are rendered as `(_: A).toString` instead of the string value
- Exclude unused from report with a boolean
- Reduce common boilerplate
- Create `ConfigDef[Unit]` from `logback.xml`
- ConfigParser should just take a String
- Config report doesn't connect name-adjusted keys together
- Clarify in report that obfuscated values are obfuscated
- Migrate to cats by default
- Support running from node and reading env
- Add ConfigValueParser.oneOf[A](f: (String, A)*) HOT 1
- Add ConfigValueParsers for UR{I,L} HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clear-config.