【发布时间】:2017-10-09 19:28:47
【问题描述】:
我想在 jHipster 应用程序启动后执行一个方法。我应该把我的方法放在哪里?
我尝试在MyApp.java 方法中运行我的方法:
@PostConstruct
public void initApplication()
但我得到了错误:
Invocation of init method failed; nested exception is org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: xxx.xxx.xxx
xxx.xxx.xxx.cars, could not initialize proxy - no Session
【问题讨论】: