flow-and-components-documentation icon indicating copy to clipboard operation
flow-and-components-documentation copied to clipboard

VaadinServiceInitListener page: mention that META-INF/services doesn't work with spring

Open mvysny opened this issue 4 years ago • 1 comments
trafficstars

https://vaadin.com/docs/flow/advanced/tutorial-service-init-listener.html

Would be good to mention that the lookup via META-INF/services/ doesn't work with Spring.

mvysny avatar Nov 23 '20 10:11 mvysny

META-INF/services is supposed to work also when using Spring. There's code in SpringInstantiator to explicilty combine the results from the super implementation (which uses META-INF/services) with listeners found through Spring: https://github.com/vaadin/spring/blob/014ba2bcfaa995a94083fa65d3b753c1a7b75d5b/vaadin-spring/src/main/java/com/vaadin/flow/spring/SpringInstantiator.java#L64

Legioth avatar Nov 23 '20 16:11 Legioth