Skip to content

Add auto scan for "org.vaadin" #620

@stefanuebe

Description

@stefanuebe

A customer of us had the following problem: he added an addon from our directory to his Spring Boot application as maven dependency. After preparing the frontend and starting the application he got a lot of JS errors, which told him in short that the client side stuff of this addon is simply not there.

Adding "org.vaadin" as a package to scan to the @SpringBootApplication did not help. Rebuilding and restarting the application still showed the same issue.

After adding @EnableVaadin({"com.vaadin", "org.vaadin", ... }) it worked.

To be honest I by myself stumbled over this issue in the past, too and I guess it will happen to others, too, since it is not really clear from the documentation, that @EnableVaadin has to be used, too, to use addons.

Long text, short request:

Since most addons are in package "org.vaadin" (at least from what I've seen), we should add this package beside "com.vaadin" and the application package to the auto scan for custom components, so that the above mentioned @EnableVaadin arguments combo is not needed.

I'm not sure if that is technically possible, but I guess it would prevent such issues for most addons out of the box.

Also maybe extending the docs regarding this issue would be a good thing, too :)

Small, but maybe interesting side node: When testing the customer's project on my machine with NodeJS 10.x, it worked with the given SpringBootApplication annotation. The customer with NodeJS 12.x had issues.

Used Spring Boot 2.1.7 and Vaadin 14.1.27.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions