Open mtbadi39 opened 6 years ago
This is true. This annotation includes (as you see in the code) at the moment only the @Component annotation, to 'component scan' it as a Spring Bean. We "invented" this annotation to a) have a bit of semantic b) be safe in the future to add some fields there.
Feel free to implement a convention for 'auto detecting' a controller from a bean. (In fact we haven't done this, because we could not agree on whether this should be called XYZController or XYZPresenter) ;-)
Without setting
fx:controller="someController"
in the .fxml file, the initialize method never called ! So what the utility of the@FXMLController
annotation.