Skip to content

Load Micronaut application-*.yml files without instantiating beans #5975

Answered by osscontributor
Patanouk asked this question in Q&A
Discussion options

You must be logged in to vote

Run some code using these properties before the Micronaut application starts

If you want to load config files (or do anything else) before Micronaut gets involved, the best way to do that is to invoke that code from your main method before starting Micronaut.

Depending on what it is you are going to do with the config values, there may be a better thing to do that doesn't require you doing anything before engaging Micronaut.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Patanouk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants