Skip to content
Advertisement

Problem in running application with Vaadin and Spring (MySQL DB)

I am trying to connect a Vaadin project to a MySQL database following the instructions I found here: https://dzone.com/articles/how-to-connect-a-mysql-database-to-a-vaadin-applic

I downloaded the ready project in the article (also available here: https://github.com/Liskokuningas/databasemysqlexample)

I, then, created the dummy data schema in MySQL Workbench and tried to run the application via the Windows 10 Command line like this: mvn clean install -U /*all is fine here, build is successful*/ and then mvn spring-boot:run

Then I get an error:

JavaScript

Though the build appears to be successful I cannot open the application in the browser getting a 404 error:The requested resource [/] is not available.

Any ideas about that? Anyone can tell me how to connect a Vaadin to a MySQL database?

Thanks in advance!

Advertisement

Answer

In the stacktrace you can see the following advice

JavaScript

So you have to create an AppShellConfigurator implementation and move @PWA annotation from MainView to that new class.

Here’s the link to documentation: https://vaadin.com/docs/v20/flow/advanced/modifying-the-bootstrap-page/#customizing-the-application-shell-during-runtime

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement