兼容性问题spring-beans,hibernate-core,spring-boot

时间:2018-03-21 11:54:50

标签: hibernate spring-boot

关于兼容性已经存在很多问题。我认为即使在春季启动之后,这仍然会浪费很多开发人员的时间。不幸的是,今天我被困,因为我在春季启动时也是新手。这是我的问题: 我使用的是spring-boot的1.4.2.RELEASE,它有hibernate-core-5.0.11.Final.jar org.hibernate.Session接口具有以下签名:

time <- Sys.time()
rwunderground::set_api_key("0d5f3d47ea78fa83")
history(set_location(zip_code = "90210"), "20170101")
Sys.time() - time

所以我不能使用session.getCriteriaBuilder()方法。 经过一些调查后,我发现这将适用于hibernate-core-5.2.12.Final.jar,因为它有这个签名:

public interface Session extends SharedSessionContract, java.io.Closeable {...

显然我需要升级后的休眠版本,因此需要spring-boot。我选择2.0.0.RELEASE,但是我无法解决这个异常:

public interface Session extends SharedSessionContract, EntityManager, HibernateEntityManager, AutoCloseable...

添加pic以获得更清晰,(有一点我可以注意到图片中jar图标与其他jar图标不同可能有助于快速识别问题)扩展jar后我可以看到该类。请帮助我我被卡住了。

enter image description here enter image description here

我试过以下,请在答案中排除这些: 1.使用以前版本的spring-boot 1.4.2.RELEASE,不能使用以前版本的hibernate-core-5.2.11.Final.jar。 2.明确地将piber中的hibernate-version命名为5.2.11.Final,它可能会产生其他jar的问题,并且单独使用spring-boot本身就会失败。

0 个答案:

没有答案