vaadin / base-starter-flow-quarkus

A project base/example for using Vaadin with Quarkus
The Unlicense
37 stars 20 forks source link

Issue with adding a specific `I18NProvider` implementation #133

Closed nikbucher closed 6 months ago

nikbucher commented 6 months ago

Hi,

I tried to add my specific I18NProvider implementation, but it doesn't work as expected. Even defining the I18n Provider Property doesn't help, even worse, a ClassNotFoundException is thrown.

Screenshot 2024-02-29 at 16 26 54

I've provided a sample here https://github.com/nikbucher/base-starter-flow-quarkus/tree/v24-i18n.

Interestingly, I discovered that when I inject the I18NProvider in e.g. the GreetService or the MainView then it works correctly, even I don't use the injected I18nProvider.

Do I miss something? Thanks in advance.

Best regards - Nik

mcollovati commented 6 months ago

Vaadin Quarkus add-on is doing a programmatic lookup. You have to mark your implementation as @Unremovable, otherwise Quarkus will remove the bean because it considers it unused.

mcollovati commented 6 months ago

Here's a link to a related issue https://github.com/vaadin/quarkus/issues/147

nikbucher commented 6 months ago

Thanks a lot! It works now as expected