我对生成的应用程序有几个问题。我还没有进入它,但我评论了他@EnableScheduling 并且它运行了。好像是春天的问题。
Caused by: java.lang.NoSuchMethodError: org.springframework.scheduling.annotation.SchedulingConfiguration.setBeanFactory(Lorg/springframework/beans/factory/BeanFactory;)V
at org.springframework.scheduling.annotation.SchedulingConfiguration$$EnhancerByCGLIB$$180fc4ed.setBeanFactory(<generated>)
at org.springframework.context.annotation.ConfigurationClassPostProcessor$EnhancedConfigurationBeanPostProcessor.postProcessPropertyValues(ConfigurationClassPostProcessor.java:442)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1185)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
... 65 more
接下来,应用程序配置文件中有错误的类:.conf。引起了问题。应该是.config。
hibernate.cache.region.factory_class: com.mycompany.hipster.conf.hazelcast.HazelcastCacheRegionFactory
代替
hibernate.cache.region.factory_class: com.mycompany.hipster.config.hazelcast.HazelcastCacheRegionFactory
最后,至少对于 Postgres,数据库信息没有正确设置。缺少 URL 和用户名。如果您可以更新安装文档以涵盖该内容,或者将其默认为 localhost。在 dev 中运行时可能会吐出配置信息。
另一件事是来自休眠的警告:
[WARN] org.hibernate.ejb.HibernatePersistence - HHH015016: Encountered a deprecated javax.persistence.spi.PersistenceProvider [org.hibernate.ejb.HibernatePersistence]; use [org.hibernate.jpa.HibernatePersistenceProvider] instead.
非常酷的设置。谢谢!