hilla
hilla copied to clipboard
Fusion endpoint js file should be generated by maven plugin
I've added this class to my example project (generated from start.vaadin.com):
@Endpoint
@AnonymousAllowed
public class AboutEndpoint {
public String getVersion() {
return "1234";
}
}
I'd expect mvn clean package (or running the vaadin:prepare-frontend goal) to generate the frontend/generated/AboutEndpoint.ts file, however the file is only generated after I run the app for the first time.
Minimal reproducible example
- Download new TypeScript+HTML Vaadin 18 project from start.vaadin.com
- Add the
AboutEndpointjava class right next to theApplicationclass - Run
mvn -C clean package
Expected behavior
The frontend/generated/AboutEndpoint.ts file is generated, and I can start using it immediately in my views.
Actual behavior
I need to run the app once in dev mode, in order for VaadinServlet to generate the ts endpoint files.
Versions:
- Vaadin / Flow version: 18.0.2/5.0.2