Apache Unomi 1.x - Documentationassociated with this action will also be deleted. HELLO WORLD! In this short example, we’re going to create a Groovy Action that will be adding “Hello world!” to the logs whenever a new view event is first step consists in creating the groovy script on your filesystem, start by creating the file hello- world.groovy: @Action(id = "helloWorldGroovyAction", actionExecutor = "groovy:helloWorldAction" [@Parameter(id = "location", type = "string", multivalued = false)]) def execute() { logger.info("Hello {}", action.getParameterValues().get("location")) EventService.NO_CHANGE } As the last instruction0 码力 | 158 页 | 3.65 MB | 1 年前3
Apache Unomi 2.x - Documentationassociated with this action will also be deleted. HELLO WORLD! In this short example, we’re going to create a Groovy Action that will be adding “Hello world!” to the logs whenever a new view event is first step consists in creating the groovy script on your filesystem, start by creating the file hello-world.groovy : As the last instruction of the script is EventService.NO_CHANGE , data will not be persisted. Once the action has been created you need to submit it to Unomi (from the same folder as hello-world.groovy ). curl -X POST 'http://localhost:8181/cxs/groovyActions' \ --user karaf:karaf \ --form0 码力 | 117 页 | 4.78 MB | 1 年前3
共 2 条
- 1
相关搜索词













