You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Instantiator class is used as SPI.
It makes possible to register custom classes to use them inside Flow.
E.g. VaadinServiceInitListener should be registered in a specific way (not via API) (see docs about the way).
Normally the standard Java SPI mechanism is used for this.
It's possible to use another way to register SPI in Spring (DI : asking beans from application context/autowiring ).
We should extend the way for Spring to register those classes.
Default behavior should be kept since it's still possible to use this way. But it also should be possible to register a bean (e.g. via @Component annotation) and extends VaadinServiceInitListener.
Then such class becomes available for DI and it should be registered as a listener.
Please note that Instantiator itself is registered via standard Java SPI. It's an open question: should we extend VaadinServletService in our Spring add-on to load the instantiator via Spring mechanisms or should we keep standard Java SPI mechanism in this case.
The text was updated successfully, but these errors were encountered:
Also extract all UI and IT test classes into a separate module (test-jar) and use it in both WAR and Spring Boot application projects tpo avoid code duplication.
Fixes#2596
…2626)
* Add Spring vaadin servlet, service and implement Spring instantiator
Also extract all UI and IT test classes into a separate module (test-jar) and use it in both WAR and Spring Boot application projects tpo avoid code duplication.
Fixes#2596
* Correct @route classes instantiation.
IT test for Spring managed routing.
* JUnit tests for autoconfiguration: instantiator and vaadin servlet service.
* Trying to understand the build failure.
* Javadoc corrections
* Revert failing test back
* Add javadoc to bean production method
* -
* -
* Code review corrections
* Merge branch 'master' into 2596-spring-instantiator
* Merge branch 'master' into 2596-spring-instantiator
The
Instantiator
class is used as SPI.It makes possible to register custom classes to use them inside Flow.
E.g.
VaadinServiceInitListener
should be registered in a specific way (not via API) (see docs about the way).Normally the standard Java SPI mechanism is used for this.
It's possible to use another way to register SPI in Spring (DI : asking beans from application context/autowiring ).
We should extend the way for Spring to register those classes.
Default behavior should be kept since it's still possible to use this way. But it also should be possible to register a bean (e.g. via
@Component
annotation) and extends VaadinServiceInitListener.Then such class becomes available for DI and it should be registered as a listener.
Please note that
Instantiator
itself is registered via standard Java SPI. It's an open question: should we extendVaadinServletService
in our Spring add-on to load the instantiator via Spring mechanisms or should we keep standard Java SPI mechanism in this case.The text was updated successfully, but these errors were encountered: