Hi Guys
I tried connecting the view to the backend. I followed the tutorial https://vaadin.com/docs/latest/tutorial/database-access
And the starter project from the tutorial works fine. But when I try to implement the same logic in my school project I get the error:
APPLICATION FAILED TO START
Description:
Parameter 0 of constructor in com.cryptoportfoliotracker.logic.AssetManager required a bean named ‘entityManagerFactory’ that could not be found.
Action:
Consider defining a bean named ‘entityManagerFactory’ in your configuration.
I researched a lot in the last few days and all the solutions that I read about aren’t working for me.
What am I missing?
I also tried defining the bean ‘entityManagerFactory’ in my main method.
@Bean(name="entityManagerFactory")
public LocalSessionFactoryBean sessionFactory() {
LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
return sessionFactory;
}
after that I get slightly other error also about the bean creation error. https://gist.github.com/noaboa97/f6429e0f4a725185fa90042dead88ebd
My code is here: https://github.com/noaboa97/cryptoportfoliotracker/tree/dev_connect_view_tobackend/src/main/java/com/cryptoportfoliotracker
Any help would be appreciated. Thanks