简体   繁体   English

Hybris中的商业外观范围

[英]scope of commerce facade in hybris

why is the scope of commerce facades marked prototype by default ? 为什么默认情况下将商务外观的范围标记为原型? Is it that we always need a new instance of the requested facade every time we refer it or am I missing something here while understanding the concept of commerce facades in hybris ? 是我们每次引用它时总是需要一个所请求的外观的新实例吗?还是我在理解hybris中的商业外观的概念时在这里遗漏了什么?

In commercefacades-spring.xml only some populators and some POJOs are marked prototype. commercefacades-spring.xml中,只有一些填充器和一些POJO被标记为原型。

The facades are still singletons since they are noting but special services. 外墙仍然是单例,因为它们只是特殊的服务。

Hybris v5.x Hybris v5.x
Facades are singleton scoped beans by default. 外观默认情况下是单例作用域的bean。 There is no need to create a new instance of facade object on every request. 无需在每个请求上创建一个Facade对象的新实例。

Facades in Hybris are the implementation of Facade Design Pattern. Hybris中的Facades是Facade Design Pattern的实现。 To understand them deeply follow the links: 要深入了解它们,请遵循以下链接:
https://wiki.hybris.com/display/release5/Using+Facades+and+DTOs+-+Best+Practice https://wiki.hybris.com/display/release5/使用+外观+和+ DTOs +-+最佳实践
https://en.wikipedia.org/wiki/Facade_pattern https://zh.wikipedia.org/wiki/Facade_pattern

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM