using-polymorphism-insteadof-ifs:如何在 Spring Framework 中创建运行时注入的简单示例-源码

上传者: 42139871 | 上传时间: 2021-06-22 19:20:35 | 文件大小: 76KB | 文件类型: ZIP
使用多态而不是 ifs 如何在 Spring Framework 中创建运行时注入的简单示例 这是什么 我们需要根据用户上下文使用不同的服务实现。 我已经创建了基于 spring ProxyFactoryBean 的简单机制。 在运行时调用服务的方法时,我们正在做出我想要使用的决策女巫实现。 这张图片或多或少地描述了概念: 主要条件 使用多态而不是 IFS 我的朋友 尽可能简单地使用 在运行时选择实现——运行时注入

文件下载

资源详情

[{"title":"( 26 个子文件 76KB ) using-polymorphism-insteadof-ifs:如何在 Spring Framework 中创建运行时注入的简单示例-源码","children":[{"title":"using-polymorphism-insteadof-ifs-master","children":[{"title":"src","children":[{"title":"main","children":[{"title":"wro","children":[{"title":"wro.properties <span style='color:#111;'> 102B </span>","children":null,"spread":false},{"title":"wro.xml <span style='color:#111;'> 415B </span>","children":null,"spread":false},{"title":"main.less <span style='color:#111;'> 0B </span>","children":null,"spread":false}],"spread":true},{"title":"resources","children":[{"title":"com","children":[{"title":"mt","children":[{"title":"hybris","children":[{"title":"config","children":[{"title":"aop-benas-config.xml <span style='color:#111;'> 585B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"static","children":[{"title":"index.html <span style='color:#111;'> 572B </span>","children":null,"spread":false},{"title":"js","children":[{"title":"hello.js <span style='color:#111;'> 156B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"application.yml <span style='color:#111;'> 40B </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"com","children":[{"title":"mt","children":[{"title":"hybris","children":[{"title":"services","children":[{"title":"Interfaces.jpg <span style='color:#111;'> 70.91KB </span>","children":null,"spread":false},{"title":"GeolocationExampleService.java <span style='color:#111;'> 107B </span>","children":null,"spread":false},{"title":"ServiceOnlyForBaseStore.java <span style='color:#111;'> 285B </span>","children":null,"spread":false},{"title":"ServiceOnlyForSapMarkets.java <span style='color:#111;'> 80B </span>","children":null,"spread":false},{"title":"impl","children":[{"title":"GeolocationExampleServiceImpl.java <span style='color:#111;'> 342B </span>","children":null,"spread":false},{"title":"GeolocationExampleServiceForUKStoreImpl.java <span style='color:#111;'> 440B </span>","children":null,"spread":false},{"title":"GeolocationExampleServiceForSapMarketsImpl.java <span style='color:#111;'> 358B </span>","children":null,"spread":false},{"title":"GeolocationExampleServiceForNonSapMarketsImpl.java <span style='color:#111;'> 415B </span>","children":null,"spread":false}],"spread":false},{"title":"ServiceOnlyForNonSapMarkets.java <span style='color:#111;'> 83B </span>","children":null,"spread":false},{"title":"Interfaces.ucls <span style='color:#111;'> 7.61KB </span>","children":null,"spread":false}],"spread":true},{"title":"controller","children":[{"title":"MainController.java <span style='color:#111;'> 1.15KB </span>","children":null,"spread":false}],"spread":true},{"title":"config","children":[{"title":"StoreUuidAndServiceKey.java <span style='color:#111;'> 1.20KB </span>","children":null,"spread":false},{"title":"PolymorphicInterceptorForServices.java <span style='color:#111;'> 5.42KB </span>","children":null,"spread":false},{"title":"Application.java <span style='color:#111;'> 705B </span>","children":null,"spread":false}],"spread":true},{"title":"context","children":[{"title":"Context.java <span style='color:#111;'> 178B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"LICENSE <span style='color:#111;'> 11.06KB </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 743B </span>","children":null,"spread":false},{"title":"pom.xml <span style='color:#111;'> 3.81KB </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 226B </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明