The primary role of the Mock Customer component is to provide the CustomerService interface.
模拟Customer组件的主要作用是提供CustomerService接口。
For example, let´s consider the original LinkedList-based CustomerService implementation listed above.
例如,让我们考虑上面列出的基于原始linkedlist的CustomerService实现。
Create a library called MyLibrary, which contains a CustomerService interface with three functions, as shown in Listing 1.
创建一个名为MyLibrary的库,其中包含一个带有三个函数的CustomerService接口,如清单1所示。
The CustomerService bean is a utility class that implements methods to access the database for adding, updating, removing, and retrieving customer information.
CustomerService bean是个工具类,它实现了访问数据库以增加、更新、删除和查询用户信息的方法。
Per the CDI specification, whenever the ManageCustomer bean instance is instantiated by a container, the CustomerService bean instance will be auto injected in it.
通过CDI规范,无论ManageCustomer bean实例何时由容器实例化,CustomerService bean实例将会自动注入。