@Id in PolymerTemplate Injects subtype to Field

Good Morning,

I’ve had this problem a few times and have just worked out that my PolymerTemplate class has a Div field annotated with @Id(“content”) and is being injected with a Bean that extends Div. See below for mockup.

public class MyComp extends PolymerTemplate<TemplateModel> {

	Div content;


public class ComplexComponent extends Div {


When the TemplateInitializer runs it injects a ComplexComponent with UIScope to my field “content” in my PolymerTemplate class MyComp.
The SpringInstansiator is only finding the the ComplexComponent and not the superclass Div.

Thanks for your help.



Thanks for your feedback. I created an issue regarding the behavior you described: https://github.com/vaadin/spring/issues/344

If you have any additional information or corrections, please add a comment on the issue.

Best regards,