| 程序包 | 说明 |
|---|---|
| com.jfinal.config | |
| com.jfinal.core |
| 限定符和类型 | 方法和说明 |
|---|---|
ControllerFactory |
Constants.getControllerFactory() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
Constants.setControllerFactory(ControllerFactory controllerFactory)
设置自定义的 ControllerFactory 用于创建 Controller 对象
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
FastControllerFactory
FastControllerFactory 用于回收使用 Controller 对象,提升性能
由于 Controller 会被回收利用,所以使用之前一定要确保 controller
对象中的属性值没有线程安全问题
警告:如果用户自己的 Controller 或者 BaseController 之中声明了属性,
并且这些属性不能被多线程共享,则不能直接使用 FastControllerFactory,
否则会有线程安全问题
jfinal 3.5 版本可以通过覆盖 Controller.
|
| 限定符和类型 | 字段和说明 |
|---|---|
protected ControllerFactory |
ActionHandler.controllerFactory |
static ControllerFactory |
Const.DEFAULT_CONTROLLER_FACTORY |
Copyright © 2022. All rights reserved.