Groovy

1. Introduction

     Groovy is a Java-based scripting language and the most commonly used scripting language in XWorker. Groovy official website: https://groovy-lang.org/.

2. Design ideas

  • Action
    Groovy is a scripting language encapsulated into an action model.
      
  • Real-time compilation and loading
    Groovy supports compilation into Java Class. The Groovy model will detect whether there are changes during execution. If there are changes, it will be recompiled and loaded.  

 3.Example

<?xml version='1.0' encoding='utf-8'?>

<GroovyAction name="GroovyAction" descriptors="xworker.groovy.GroovyAction" code="println &quot;hello world&quot;;"/>

  

Copyright ©  2007-2019 XWorker.org  版权所有  沪ICP备08000575号