Spring FXMLLoader injection fails
Closed this issue · 1 comments
palexdev commented
I have set up a little project to learn DI in JavaFX, I decided to try with Spring
I gave a look at the example provided but made it a little more complex/organized.
When I start the app the FXMLLoader instance is not injected and I get a NullPointerException.
The project is here: AddressApp
palexdev commented
Solved, silly me to get the MainView instance in the start method it's necessary to use the context, context.getInstance(MainView.class)