How to override micronaut config in src code?

Most of the stuff is declared in resources/application.properties or via env vars But, is there some way to set them in app src? Like
Map<String, Object> reconfig = Map.of(
"micronaut.server.port", 4242
);
Micronaut.run(reconfig);
Map<String, Object> reconfig = Map.of(
"micronaut.server.port", 4242
);
Micronaut.run(reconfig);
3 Replies
JavaBot
JavaBot7mo ago
This post has been reserved for your question.
Hey @Dskd! Please use /close or the Close 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.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
ayylmao123xdd
ayylmao123xdd7mo ago
i guess you could try to use some code that sets the properties in the app idk if thats what u want tho theres also the environment add property source but thats what you dont want i assume
JavaBot
JavaBot7mo ago
Post Closed
This post has been closed by <@997160896457625610>.

Did you find this page helpful?