- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
S2Container指南
快速上手 最初的一 更 S2Container指南 需要作成的文件 S2Container的定 S2Container的生成 SingletonS2ContainerFactory的使用 S2ContainerFactory的使用 Dependency Injection的方式 构造函数注入 方法函数注入 S2Container定 名称空 实例管理 生存周期 自 组件中利用S2Container S2ContainerServlet app.dicon的角色 AOP的适用范 META数据 Request的自 组件的自动登陆 Aspect的自 Meta的自 Hotswap S2Container标签指南 DOCTYPE components标签 include标签 component标签 arg标签 property标签 meta标签 initMethod标签 destroyMethod标签 aspect标签 interType标签 description标签 OGNL式 S2Container(Annotation本篇翻)指南 Component Binding备注码 Aspect备注码 InterType备注码 InitMethod备注码 DestroyMethod备注码 DIContainer练习 快速上手 S2Container,就是Dependency Injection(注:依——译者)(以后略称为DI)的一个DI,就是Interface和Interface来会 最初的一 让我们赶快试一试吧。登场人物如下。 问候语类 返回 问候客户端类 从(字符串)并 问候语应用主类 启 Greeting.java 问侯语的Interface。 package examples.di; public interface Greeting { String greet(); } GreetingImpl.java package examples.di.impl; import examples.di.Greeting; public class GreetingImpl implements Greeting { public String greet() { return Hello World!; } } GreetingClient.java 使用Interface。 package examples.di; public interface GreetingClient { void execute(); } GreetingClientImpl.java 使用GreetngImpl(实装),而是通Greeting(Interface)来 package examples.di.impl; import examples.di.Greeting; import examples.di.GreetingClient; public class GreetingClientImpl implements GreetingClient { private Greeting greeting; public void setGreeting(Greeting greeting) { this.greeting = greeting; } public void execute() { System.out.println(greeting.greet()); } } 机能提供端和使用端的准备都完成了。下面我们就执行一下试试吧。 GreetingMain.java package examples.di.main; import examples.di.Greeting; import examples.di.impl.GreetingClientImpl; import examples.di.impl.GreetingImpl; public class GreetingMain { public static void main(String[] args) { Greeting greeting = new GreetingImpl(); GreetingClientImpl greetingClient = new GreetingClientImpl(); greetingClient.setGreeting(greeting); greetingClient.execute(); }
您可能关注的文档
- The Truth about the Environment练习刘自知.doc
- 专业词汇表-景观旅游.doc
- 软件建模论文.doc
- 大学英语5 单元5答案 与翻译.doc
- 【翻译】四川大学建校110周年校长谢和平的致辞翻译.doc
- 服务营销英文案例2.doc
- ”Greet Civilization”文明外院计划策划.doc
- 英文国际金融练习卷Chapter_2.doc
- 雅思Linking words.doc
- 自修英语复习,大二.doc
- 2012七年级英语(上)预备篇教案.doc
- lesson4 what do they like to do 英文教案.doc
- 题目2正反方:This house believes that everyone should attend college.doc
- 仁爱英语八年级作文.doc
- 1A Unit 1牛津英语1A教案.doc
- 第二单元周检测(二).doc
- 江苏省永丰初级中学八年级英语下册《Unit 8 A green world》检测题 (新版)牛津版.doc
- unit4My-name’s-Gina教案.doc
- 人教版七年级英语上册教案之My name’s Gina教案.doc
- 牛津英语7B七年级期末试卷.doc
文档评论(0)