Spring Value annotation not working everywhere

Switching to my phone :3
3 Replies
JavaBot
JavaBot4mo ago
This post has been reserved for your question.
Hey @MdS! 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 closed 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.
MdS
MdSOP4mo ago
Hi! So I have combined my Discord JDA project with a Spring Boot app for REST functionality (not going to discuss it, as I’m a newbie with JDA). Now I switched from config.json which was loaded via my singleton ConfigLoader class to the Spring properties file. The problem I have now is that the app doesn’t load the Values everywhere. I have a Component class for my bot, which accesses a property, but it comes back as null. I have a AppConfig class defining a Bean for RestTemplate, which uses a Value for debug reasons annotated as Configuration. The Configuration prints the value of the variable, the Component doesn’t. Any ideas?
JavaBot
JavaBot4mo ago
Post Closed
This post has been closed by <@1109895685102374974>.
Want results from more Discord servers?
Add your server