try (InputStream fxmlStream = SpringFXMLLoader.class.getResourceAsStream(url)) {
FXMLLoader loader = new FXMLLoader();
loader.setControllerFactory(aClass -> APPLICATION_CONTEXT.getBean(aClass));
Node view = loader.load(fxmlStream);
Controller controller = loader.getController();
controller.setView(view);
return controller;
} catch (IOException e) {
LOGGER.error("Can't load resource", e);
throw new RuntimeException(e);