IoC框架 OfficeFloor

码农软件 · 软件分类 · 面向方面AOP/IoC · 2019-09-29 13:12:06

软件介绍

OfficeFloor 是一个 IoC 2.0 的实现,主要是聚焦于方法的依赖注入而不是对象。OfficeFloor 还拥有一个基于Eclipse的图形化配置插件,如下图所示:

Example graphical configuration of WoOF.

示例代码:

// OfficeFloor source to create an inline HTTP Server (useful for testing a single web page).
// Note that applications would be configured using the WoOF graphical configuration.
HttpServerAutoWireOfficeFloorSource server = new HttpServerAutoWireOfficeFloorSource();
 
// Add a dynamic web page (ExampleBean provides the page logic and is just a POJO)
server.addHttpTemplate("example.html", ExampleBean.class);
 
// Add configured DataSource for dependency injection
server.addManagedObject(DataSourceManagedObjectSource.class, null, DataSource.class).loadProperties("datasource.properties");
 
// Assign Team (specific thread pool) responsible for executing the methods with a DataSource dependency
server.assignTeam(LeaderFollowerTeamSource.class, DataSource.class).addProperty("size", "10");
 
// Start the HTTP Server
server.openOfficeFloor();

本文地址:https://codercto.com/soft/d/15657.html

Python 3网络爬虫开发实战

Python 3网络爬虫开发实战

崔庆才 / 人民邮电出版社 / 2018-4 / 99

本书介绍了如何利用Python 3开发网络爬虫,书中首先介绍了环境配置和基础知识,然后讨论了urllib、requests、正则表达式、Beautiful Soup、XPath、pyquery、数据存储、Ajax数据爬取等内容,接着通过多个案例介绍了不同场景下如何实现数据爬取,后介绍了pyspider框架、Scrapy框架和分布式爬虫。 本书适合Python程序员阅读。一起来看看 《Python 3网络爬虫开发实战》 这本书的介绍吧!

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具