}
[/code]I have tried examples of vaadin spring integration, but nothing works fine. I tried SpringBoot with vaadin its working. but I need only spring. I attached MyUI and Normal Class, Plaese Have a look.[code] @UIScope @Configuration @EnableVaadin
public class Hello {
@Bean
public String sayHello() {
return "Hello from bean ";
}
}
[/code]I am getting
java.lang.NullPointerException. Am I missing anything?
Actually I am new to Spring vaadin integration. I tried this example
https://spring.io/guides/gs/crud-with-vaadin/ . It is in spring boot and working. I removed boot part and used Xml file and application context to get that Xml. Normally in boot we run the main class and then piont to the localhost. But what about in spring, what is the process? Do I need Xml Main class and which class should I run? Its little bit confusing.
When I run UI class error is “BeanFactory not initialized or already closed - call ‘refresh’ before accessing beans via the ApplicationContext”.
Here is my xml and main class where boot part is there. I replaced it with followin code.
Well classical Spring is usually built as a WAR and then deployed to some servlet container. Although, you can build spring-boot project as a WAR too. Out of curiosity, which part of the spring-boot makes it uncomfortable for you to be used?
We are already working with vaadin and jpa container, due to some performance issues we tought to shift to vaadin spring without boot. If we use boot we may need to change a lot of code in existing project.
And I din’t find anything in this link
https://github.com/johannesh2/vaadin-spring-noboot .
In the project I linked I had copied the code from https://github.com/spring-guides/gs-crud-with-vaadin and implemented that without boot. Only thing it is missing is jar packaging and the main method loading test data into database. Is that main method the crucial part or what part you are missing from the crud integration?