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://www.codercto.com/soft/d/15657.html

The Haskell School of Music

The Haskell School of Music

Paul Hudak、Donya Quick / Cambridge University Press / 2018-10-4 / GBP 42.99

This book teaches functional programming through creative applications in music and sound synthesis. Readers will learn the Haskell programming language and explore numerous ways to create music and d......一起来看看 《The Haskell School of Music》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

在线进制转换器
在线进制转换器

各进制数互转换器

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具