OGM 与mongodb

来源:互联网 发布:淘宝助理5.5在哪下载 编辑:程序博客网 时间:2024/06/05 01:06

1.利用hibernate ogm提供的example:

使用eclipse导入example。

2.maven会下载依赖包,以下是相关的依赖包


3.main类

添加jvm运行的参数,原因是

The other implementation, TwoStacksPlainDatagramSocketImpl, does implement setTimeToLive() and should be used. This can be done in 2 ways:
Force use of IPv4: -Djava.net.preferIPv4Stack=true
Use the impl.prefix system property to pick the TwoStacksPlainDatagramSocketImpl implementation, e.g. -Dimpl.prefix=TwoStacksPlain

4.如果breed类显示如下的报错


如下修改即可































0 0