这篇文章主要介绍了Spring案例打印机的实现过程详解,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
目录:
1.applicationContext.xml配置文件
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://.spring.print.printer.Printer"> <!--将墨盒纸张组合起来--> <property name="paper" ref="b5Paper"></property> <property name="ink" ref="colorInk"></property> </bean></beans>2.墨盒接口Ink
3.黑白墨盒实现类BlackWhiteInk
4.彩色墨盒实现类ColorInk
5.纸张接口Paper
6. A4纸张实现类 A4Paper
7. B5纸张实现类B5Paper
8. 打印机类 Printer
9. 测试类PrintTest
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。