---
title: "Groovy+Tapestry5+Spring2.5+Hibernate3.2实现CRUD"
author: "JohnnyJian"
date: "2008-09-03T23:32:03Z"
tags: ["Bean", "DAO", "Groovy", "Hibernate", "Spring"]
categories: ["编程语言"]
slug: "groovy-tapestry5-spring2-5-hibernate3-2-crud"
draft: false
lastmod: "2010-08-20T13:50:26Z"
id: 236355
url: "https://johnnyjian.iteye.com/blog/236355"
---

最近在研究Tapestry5，觉得不错，所以就尝试与Spring和Hibernate整合，并使用Groovy编写，实现简单的CRUD操作。
此整合的特点：
1. 因为使用了Groovy，所以并没有为Service和DAO层建立接口，一切都靠方法签名的约定
2. 尽量使用annotation，Spring中的依赖注入使用了JSR-250的@Resource，按照bean名字注入
3. 配置很少，我把需要修改的部分都集中在hibernate.cfg.xml中，即只有与数据库相关的部分有可能需要修改