Skip to content

Commit

Permalink
feat: Mention vaadin.whitelisted-packages as a possible cause of miss…
Browse files Browse the repository at this point in the history
…ing template file (#12310)

* Mention vaadin.whitelisted-packages as a possible cause of missing template file

* Fix formatting
  • Loading branch information
tarekoraby committed Nov 9, 2021
1 parent e4e6771 commit 5a40c0e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
Expand Up @@ -133,11 +133,14 @@ public TemplateData getTemplateContent(Class<? extends LitTemplate> clazz,
getLogger().info("Couldn't find the "
+ "definition of the element with tag '{}' "
+ "in any lit template file declared using '@{}' annotations. "
+ "Check the availability of the template files in your WAR "
+ "file or provide alternative implementation of the "
+ "method LitTemplateParser.getTemplateContent() which should return an element "
+ "representing the content of the template file", tag,
JsModule.class.getSimpleName());
+ "In a Spring Boot project, please ensure that the template's "
+ "groupId is added to the vaadin.whitelisted-packages "
+ "property. Otherwise, please Check the availability of the "
+ "template files in your WAR file or provide alternative "
+ "implementation of the method "
+ "LitTemplateParser.getTemplateContent() which should return "
+ "an element representing the content of the template file",
tag, JsModule.class.getSimpleName());

return null;
}
Expand Down
Expand Up @@ -139,11 +139,13 @@ public TemplateData getTemplateContent(
throw new IllegalStateException(String.format("Couldn't find the "
+ "definition of the element with tag '%s' "
+ "in any template file declared using '@%s' annotations. "
+ "Check the availability of the template files in your WAR "
+ "file or provide alternative implementation of the "
+ "method getTemplateContent() which should return an element "
+ "representing the content of the template file", tag,
JsModule.class.getSimpleName()));
+ "In a Spring Boot project, please ensure that the template's "
+ "groupId is added to the vaadin.whitelisted-packages "
+ "property. Otherwise, please Check the availability of the "
+ "template files in your WAR file or provide alternative "
+ "implementation of the method getTemplateContent() which "
+ "should return an element representing the content of the "
+ "template file", tag, JsModule.class.getSimpleName()));
}

/**
Expand Down

0 comments on commit 5a40c0e

Please sign in to comment.