Hi! I want to add a event listener for an application created.But "ApplicationReadyEvent" similar not work

Thank you for any advices!

You will need to give more details on what you exactly mean by "not work " and why you are listening to this event.

Yes!I add an event listener to my XWiki of version 10.4 by Writing an Event Listener,It is nice and work were when I creating or updating a page. So I change the event to “ApplicationReadyEvent()” in method getEvents ,it is the Method body code:

{{groovy}}
import org.xwiki.bridge.event.*

xcontext.method.output.value = [new ApplicationReadyEvent()]
{{/groovy}}

then I change the method onEvent to this,I want XWiki add a new page auto when I create a new application:

{{velocity}}
#set ($newDoc = $xwiki.getDocument('wgkTest.page3'))
#set ($discard = $newDoc.setContent("page333"))
#set ($discard = $newDoc.save())
{{/velocity}}

it is my object picture:
image
but when I create a new application , I can see the result of method “onEvent” execute.
I don’t know why is it.And I do it because I want to add a new page to the application auto when user create a new Application.

The ApplicationReadyEvent has nothing to do with creating applications on top of XWiki (e.g. by using App Within Minutes). See https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-bridge/src/main/java/org/xwiki/bridge/event/ApplicationReadyEvent.java#L25 . There’s no dedicated event triggered when an application is created (with App Within Minutes). There are a bunch of document / page related events triggered so you need to look at those and try to determine if an application was created or nor. For instance you could listen to DocumentCreatedEvent and check if the document has an object of type AppWithinMinutes.LiveTableClass

Oh!Good idea.I will take a try follow this.
Thank you very much.