简体   繁体   English

使用休眠+球衣ws进行CRUD操作

[英]CRUD operation using hibernate + jersey ws

I have generated a model and dao with hibernate tools. 我已经使用休眠工具生成了一个模型和模型。

Now I would like to use the model and dao to make a query on a database using a restful web service with jersey. 现在,我想使用该模型和dao使用带有jersey的平稳Web服务在数据库上进行查询。

Is it possible? 可能吗?

Yes, it is possible. 对的,这是可能的。 Check this question: REST with Java (JAX-RS) using Jersey . 检查以下问题: 使用Jersey的REST with Java(JAX-RS)

Generally, there are a lot of solutions, you have to search some. 通常,有很多解决方案,您必须搜索一些。 I think that most efficient for start is this one: 我认为最有效的启动方法是:

http://www.vogella.com/tutorials/REST/article.html http://www.vogella.com/tutorials/REST/article.html

In that example you have a lot of information for creating everything including CRUD with Jersey in general. 在该示例中,您具有很多信息来创建所有内容,包括通常使用Jersey的CRUD。

After that you can check this: 之后,您可以检查以下内容:

http://persistentdesigns.com/wp/jersey-spring-and-jpa/ http://persistentdesigns.com/wp/jersey-spring-and-jpa/

There is explained process of integrating Jersey and JPA in spring. 春季将说明将Jersey和JPA集成的过程。

I hope that helps. 希望对您有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM