Extend/Inherit java class - how to?
I have a repo with some kind of config in the style of a YAML file... As an example its something like this:
I wanted to extend it to deal with different system:
Its just an example, doesn't make sense necessarily.
Now in Java, in another repo, I want to account for this indentation/nested change...
How do I correct myself now? A lot of code and test use BirdProperty, but now theres two "systems" of them and I need to somehow also indent/nest my java code with some inheritentance or something.
Keep in mind the above Java and YAML code is probably wrong in itself, but this is sort of what the code and yaml change was from memory.
4 Replies
⌛
This post has been reserved for your question.
Hey @Steadhaven! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
Or another example
The above is the new addition. Before it was only something like:
Adding the system property at top level, allows the yaml config repo to have different values for each system.
Then in my java code, I can call the correct system to setup my website with the correct stuff in it.
What do I do with this java code, now that it is indented/nested inside "system" in the YAML file.
wazaaaaaaaaaaaaaaaaaaap
so
if you wanna grab the properties
you can use the
let me grab it
annotation
on your classes
however
with your example
i would swap it to
something like this
if you want that
or
you could do it how you want it
with a dependency
that lets you scan the yaml file
i think jackson can let you read yaml
in a method or wherever you want
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.