简体   繁体   English

是否有真实的Spring和Hibernate示例的来源?

[英]Is there a source for real-world Spring and Hibernate examples?

I have looked through a number of Spring and Hibernate tips and have not found a real-world example in 'tutorial' form. 我查看了许多Spring和Hibernate技巧,并没有找到“教程”形式的实际示例。 By real-world I mean (for example): 通过现实世界我的意思是(例如):

  1. A search is used to retrieve a Person object. 搜索用于检索Person对象。 That object detail is then displayed. 然后显示该对象细节。 A field of the object is then modified by the user and the form is submitted and the object is saved. 然后,用户修改对象的字段,并提交表单并保存对象。 Most examples perform retrieval and save in the same method, which is identical to the example on the Spring website. 大多数示例以相同的方法执行检索和保存,这与Spring网站上的示例相同。
  2. An object has more than 3 or 4 fields, including fields that normally would not be on the form (eg createdDate, createdBy, lastModifiedDate, lastModifiedBy). 一个对象有超过3或4个字段,包括通常不在表单上的字段(例如createdDate,createdBy,lastModifiedDate,lastModifiedBy)。
  3. A command object is associated with the form. 命令对象与表单相关联。 So we have person.jsp, PersonForm.java, and PersonController.java. 所以我们有person.jsp,PersonForm.java和PersonController.java。

Pointers to the three examples mentioned above would be appreciated. 指出上述三个例子的指针将不胜感激。

One good example application using the technologies you are interested in (and that is not a toy application) is petclinic . 使用您感兴趣的技术(而不是玩具应用程序)的一个很好的示例应用程序是petclinic

A real world site that is powered by the latest Java and Spring tech is spring.io ! 由最新的Java和Spring技术驱动的真实世界站点是spring.io Check out the github repository here . 在这里查看github存储库。 A series of blog posts on the development of that site can be found here 有关该网站开发的一系列博客文章可以在这里找到

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

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