I want to put a Java class in a Maven artifact that uses the Vaadin @Endpoint
annotation (from com.vaadin.flow.server.connect.Endpoint
), to use this class in multiple Vaadin projects.
Here is a simple example of such a class:
import com.vaadin.flow.server.connect.Endpoint;
import lombok.RequiredArgsConstructor;
import java.util.Optional;
@Endpoint
@RequiredArgsConstructor
public class SupportInfoEndpoint {
public Optional<String> getSupportInfo(){
return Optional.of("mailto:support@my.corp");
}
}
The Maven artifact includes the source code of the class. What do I have to do so this class is scanned in the using project, by the Vaadin build process, so that
Is it possible at all?
Unfortunately it is not currently possible, but it will be once #9010 is implemented.
It is my understanding that it is one of the highest priority features to implement for the Fusion team.