I used a template for a spring boot starter project, and I edited it to try import vaadin. When I try use vaadin components, though, it gives an error. The code I used to import vaadin in the pom.xml file is starter code that I generated with a spring boot package in vscode. How do I fix this so I can use vaadin components without error?
JavaSpring - Replit
Hi! Creator of that template here. I took a look at your Repl and ran it without issues. Could you maybe attach some logs from when it breaks? Thanks!
what do you mean by attach some logs?
Could you send logs? It seemed to run fine for me.
Oh, sorry, the program runs fine, it doesn’t break, but in src>main>java>com>example>demo>views>MainView.java, I get the error with the red lines under the code for when I am mentioning vaadin components. Also, the output says Whitelabel Error Page, which would not be shown if vaadin was working.
Okay, I fixed the vaadin code showing syntax errors by updating the gradle dependencies, but the output is still WhiteLabel Error Page, which should have been solved since there is an
@Route("") in the MainView.java file.
I did some research and was able to get everything working.
Hey @LegoWizardCode. It’s great to hear that you’ve fixed your problem, but please provide an explanation to how you did, so that other people who have the same problem know the solution.
@Firepup650 I don’t know if I can give a very good explanation, but I will try and I will also put a link to my code.
I wasn’t able to get gradle to work, so I used this template instead, because it uses maven, then I went and replaced the majority of the files with code generated from vscode, and edited the values in the .replit file to match the file paths in my project. Here is the end result: https://replit.com/@LegoWizardCode/Spring-Boot-Vaadin?v=1. The one error that occurs is that if you have the webview tab open in replit, the output will say cookies is disabled, but if you open it in a new tab, it works fine.
I’m glad you got it working!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.