package springexample.creditcardaccount;
import springexample.creditlinking.CreditLinkingInterface;
import springexample.creditrating.CreditRatingInterface;
import springexample.domain.ICustomer;
import springexample.email.EmailInterface;
public class CreateCreditCardAccount implements CreateCreditCardAccountInterface {
private CreditLinkingInterface creditLinkingInterface;
private CreditRatingInterface creditRatingInterface;
private EmailInterface emailInterface;
public CreditLinkingInterface getCreditLinkingInterface() {
return creditLinkingInterface;
}
public void setCreditLinkingInterface(
CreditLinkingInterface creditLinkingInterface) {
this.creditLinkingInterface = creditLinkingInterface;
}
public CreditRatingInterface getCreditRatingInterface() {
return creditRatingInterface;
}
public void setCreditRatingInterface(CreditRatingInterface creditRatingInterface) {
this.creditRatingInterface = creditRatingInterface;
}
public EmailInterface getEmailInterface() {
return emailInterface;
}
public void setEmailInterface(EmailInterface emailInterface) {
this.emailInterface = emailInterface;
}
public void createCreditCardAccount(ICustomer icustomer) throws Exception{
boolean crediRating = getCreditRatingInterface().getUserCreditHistoryInformation(icustomer);
icustomer.setCreditRating(crediRating);
//Good Rating
if(crediRating){
getCreditLinkingInterface().linkCreditBankAccount(icustomer);
}
getEmailInterface().sendEmail(icustomer);
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
Spring 是一个开源框架,是为了解决企业应用程序开发复杂性而创建的。框架的主要优势之一就是其分层架构,分层架构允许您选择使用哪一个组件,同时为 J2EE 应用程序开发提供集成的框架。 在这篇由三部分组成的 Spring 系列 的第 1 部分中,我将介绍 Spring 框架。我先从框架底层模型的角度描述该框架的功能,然后将讨论两个最有趣的模块:Spring 面向方面编程(AOP)和控制反转 (IOC) 容器。接着将使用几个示例演示 IOC 容器在典型应用程序用例场景中的应用情况。这些示例还将成为本系列后面部分进行的展开式讨论的基础,在本文的后面部分,将介绍 Spring 框架通过 Spring AOP 实现 AOP 构造的方式。
资源推荐
资源详情
资源评论
收起资源包目录
wa-spring1-SpringProject.zip (16个子文件)
SpringProject
src
springexample
creditcardaccount
CreateCreditCardAccount.java 2KB
CreateCreditCardAccountInterface.java 809B
client
CreateCreditAccountClient.java 1KB
domain
Customer.java 1KB
IAddress.java 534B
Address.java 1KB
ICustomer.java 708B
email
Email.java 951B
EmailInterface.java 495B
creditlinking
CreditLinking.java 539B
CreditLinkingInterface.java 275B
creditrating
CreditRatingInterface.java 203B
CreditRating.java 251B
spring
springexample-creditaccount.xml 1KB
build
build.xml 2KB
lib
pathsetup.cmd 113B
共 16 条
- 1
资源评论
- comman1232017-02-28不错,挺好的,值得学习和研究。
无极去围绕太阳
- 粉丝: 1
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功