In this webinar, you’ll learn how to build a Vaadin 10 based UI for a Spring Boot application. Stéphane Nicoll from Pivotal and Matti Tahvonen from Vaadin will discuss various options you have, how to bootstrap your application and give you some tips on how to be more productive with these tools.
Webinar takes place on Tuesday August 14, 2018 @ 3PM CEST
My maven is not properly setup. I need a proper settings.xml
Getting errors like
ERROR] /E:/sts-bundle/vaadin/VaadinSpringBoot-LDAP/src/main/java/hello/CustomerRepository.java:[3,47]
package org.springframework.data.jpa.repository does not exist
[ERROR]
/E:/sts-bundle/vaadin/VaadinSpringBoot-LDAP/src/main/java/hello/CustomerRepository.java:[7,45]
cannot find symbol
symbol: class JpaRepository
[ERROR]
/E:/sts-bundle/vaadin/VaadinSpringBoot-LDAP/src/main/java/hello/Customer.java:[3,25]
package javax.persistence does not exist
[ERROR]
/E:/sts-bundle/vaadin/VaadinSpringBoot-LDAP/src/main/java/hello/Customer.java:[4,25]
package javax.persistence does not exist
[ERROR]
/E:/sts-bundle/vaadin/VaadinSpringBoot-LDAP/src/main/java/hello/Customer.java:[5,25]
package javax.persistence does not exist
Tiziano: Bit out of scope, but in general Vaadin shouldn’t bring anything special to the table on this topic. I’ll keep the topic in our backlog though.
Umit: I couldn’t find yet any free competitor for Vaadin Charts, but I’d expect them to appear. For older Vaadin versions there was a dozen of those.
Jeevan: Does any Maven project for you? Looks like some spring data related stuff is not properly on the classpath. Maybe you are behind a firewall and should use some proxy that should be configured to your settings.xml? You could try removing your ~/.m2/repository if there are some broken jars/poms in your local maven cache.
Thank you.
Had missed adding “spring-boot-starter-data-jpa” to the project pom.
After that was added it compiled smoothly.
But still facing issues in trying to execute it as a Spring-Boot-App.
Will post those issues ASAP but first I am trying to resolve them myself, first, reading https://spring.io/guides/gs/crud-with-vaadin.
Tiziano: Bit out of scope, but in general Vaadin shouldn’t bring anything special to the table on this topic. I’ll keep the topic in our backlog though.
Umit: I couldn’t find yet any free competitor for Vaadin Charts, but I’d expect them to appear. For older Vaadin versions there was a dozen of those.
Jeevan: Does any Maven project for you? Looks like some spring data related stuff is not properly on the classpath. Maybe you are behind a firewall and should use some proxy that should be configured to your settings.xml? You could try removing your ~/.m2/repository if there are some broken jars/poms in your local maven cache.
cheers,
matti
Thanks for the reply =) … i will check add-ons regularly
Got it to compile without errors (a Test case fails however) but cannot execute it.
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘org.springframework.boot.autoconfigure.web.servlet.DispatcherServletPath’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
Jeevan, you are probably using an incompatible versions. There was a backwards incompatible change, so that you can’t currently use latest Spring Boot with latest Vaadin 10. Go with Spring Boot 2.0.2 for a while or use a snapshot version of Vaadin 10 (10.0-SNAPSHOT + vaadin snapshot repository). The compatibility fix for latest Vaadin should arrive soon.
Vaadin has supported Spring Roo 1.4 code generator. Now Roo 2.0 is out. Is there any chance for a Vaadin 10 addon for perfect Spring / Vaadin starter code?
In the Application class, what is the use of the beans
public CommandLineRunner loadData(CustomerRepository repository) as in that we are just hard coding data into the CustomerRepository object.
In the main() method SpringBoot initializes/ loads up - but how does it know how to goto/ show the MainView.java when http://locahost:8080 is opened in the browser.
I am attempting to modify the Spring+Vaadin sample, to show data from a LDAP server (I have written a sample which interacts with Springs embedded LDAP server and lodas data from a LDIF file - so I have a LDIFRepository, PersonRepository and GroupsRepository etc.)
In the Application class, what is the use of the beans
public CommandLineRunner loadData(CustomerRepository repository) as in that we are just hard coding data into the CustomerRepository object.
It’s not hardcoding data. It’s using the repository to save data in the in-memory store. If you take the demo that Matti has already shared, it uses Flyway to initialize the database so hopefully that should make things more clear.
In the main() method SpringBoot initializes/ loads up - but how does it know how to goto/ show the MainView.java when http://locahost:8080 is opened in the browser.
The MainView has a “listCustomers” method and this method takes care of setting items in the Grid (the table). You could reuse that method and fetch data from LDAP instead.
public MainView(CustomerRepository repo, CustomerEditor editor) = 2 parameters
public MainView(LDIFRepository repo) = 1 parameter
I am getting
There was an exception while trying to navigate to '' with the exception message 'Error creating bean with name 'hello.MainView': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'hello.LDIFRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}'
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'hello.MainView': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'hello.LDIFRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:729)