Plugins 为什么Play 1和Play 2之间的'plugin'基类如此不同?

Plugins 为什么Play 1和Play 2之间的'plugin'基类如此不同?,plugins,playframework,playframework-2.0,Plugins,Playframework,Playframework 2.0,1中的插件基类是play.PlayPlugin,它有很多方法(字段): 为什么它们如此不同?我认为Play 1插件类中的方法被定义为扩展点,Play 2不再需要它们了吗?Play 2.0区分了全局设置和插件 特定于应用程序,并允许自定义框架的某些行为(例如,如果找不到请求的操作,则应执行哪些操作)。实际上,Play1.x插件的大多数扩展点现在都在Play2.x全局设置中 是可能需要了解应用程序生命周期以执行初始化/清理操作的模块 index : int onLoad() compileSourc

1中的插件基类是
play.PlayPlugin
,它有很多方法(字段):

为什么它们如此不同?我认为Play 1插件类中的方法被定义为扩展点,Play 2不再需要它们了吗?

Play 2.0区分了全局设置和插件

特定于应用程序,并允许自定义框架的某些行为(例如,如果找不到请求的操作,则应执行哪些操作)。实际上,Play1.x插件的大多数扩展点现在都在Play2.x全局设置中

是可能需要了解应用程序生命周期以执行初始化/清理操作的模块

index : int
onLoad()
compileSources()
runTest(Class<BaseTest>)
bind(String, Class, Type, Annotation[], Map<String, String[]>)
bind(RootParamNode, String, Class<?>, Type, Annotation[])
bind(String, Object, Map<String, String[]>)
bindBean(RootParamNode, String, Object)
unBind(Object, String)
getMessage(String, Object, Object...)
getStatus()
getJsonStatus()
enhance(ApplicationClass)
onTemplateCompilation(Template)
rawInvocation(Request, Response)
serveStatic(VirtualFile, Request, Response)
beforeDetectingChanges()
loadTemplate(VirtualFile)
detectChange()
detectClassesChange()
onApplicationStart()
afterApplicationStart()
onApplicationStop()
beforeInvocation()
afterInvocation()
onInvocationException(Throwable)
invocationFinally()
beforeActionInvocation(Method)
onActionInvocationResult(Result)
onInvocationSuccess()
onRequestRouting(Route)
afterActionInvocation()
onConfigurationRead()
onRoutesLoaded()
onEvent(String, Object)
onClassesChange(List<ApplicationClass>)
addTemplateExtensions()
addMimeTypes()
compileAll(List<ApplicationClass>)
routeRequest(Request)
modelFactory(Class<? extends Model>)
afterFixtureLoad()
postEvent(String, Object)
onApplicationReady()
compareTo(PlayPlugin)
overrideTemplateSource(BaseTemplate, String)
willBeValidated(Object)
onStart(): Unit
onStop(): Unit
enabled: Boolean