Struts2+Spring2+Hibernate3 web应用示例(三)
2008-05-18 10:09
253 查看
五、
业务逻辑层
在业务逻辑层需要认真思考每个业务逻辑所能用到的持久层对象和DAO。DAO层之上是业务逻辑层,DAO类可以有很多个,但业务逻辑类应该只有一个,可以在业务逻辑类中调用各个DAO类进行操作。
1、创建服务接口类IBookService
1、 创建服务接口类IBookService
package com.sterning.books.services.iface;
import java.util.List;
import com.sterning.books.model.Books;
com.sterning.books.services.iface.IBookService.java
2、实现此接口类:BookService:
package com.sterning.books.services;
import java.util.List;
import com.sterning.books.dao.iface.BooksDao;
import com.sterning.books.model.Books;
import com.sterning.books.services.iface.IBooksService;
com.sterning.books.services.BookService.java
未完待续 。。。。。。
业务逻辑层
在业务逻辑层需要认真思考每个业务逻辑所能用到的持久层对象和DAO。DAO层之上是业务逻辑层,DAO类可以有很多个,但业务逻辑类应该只有一个,可以在业务逻辑类中调用各个DAO类进行操作。
1、创建服务接口类IBookService
1、 创建服务接口类IBookService
package com.sterning.books.services.iface;
import java.util.List;
import com.sterning.books.model.Books;
com.sterning.books.services.iface.IBookService.java
2、实现此接口类:BookService:
package com.sterning.books.services;
import java.util.List;
import com.sterning.books.dao.iface.BooksDao;
import com.sterning.books.model.Books;
import com.sterning.books.services.iface.IBooksService;
com.sterning.books.services.BookService.java
未完待续 。。。。。。
相关文章推荐
- Struts2+Spring2+Hibernate3 web应用示例(一)
- Struts2+Spring2+Hibernate3 web应用示例(四)
- Struts2+Spring2+Hibernate3 web应用示例(六)
- Struts2+Spring2+Hibernate3 web应用示例(六)
- Struts2+Spring2+Hibernate3 web应用示例------源代码
- Struts2+Spring2+Hibernate3 web应用示例(一)
- Struts2+Spring2+Hibernate3 web应用示例(一)
- Struts2+Spring2+Hibernate3 web应用示例(四)
- Struts2+Spring2+Hibernate3 web应用示例(七)
- Struts2+Spring2+Hibernate3 web应用示例(一)
- Struts2+Spring2+Hibernate3 web应用示例(六)
- Struts2+Spring2+Hibernate3 web应用示例(一)
- Struts2+Spring2+Hibernate3 web应用示例(二)
- Struts2+Spring2+Hibernate3 web应用示例(四)
- Struts2+Spring2+Hibernate3 web应用示例(七)
- Struts2+Spring2+Hibernate3 web应用示例(二)
- Struts2+Spring2+Hibernate3 web应用示例(三)
- Struts2+Spring2+Hibernate3 web应用示例(二)
- Struts2+Spring2+Hibernate3 web应用示例(五)
- Struts2+Spring2+Hibernate3 web应用示例(七)