Groovy pre-compiled to speed up running

Precompiled scripts are obtained from the cache (j2cache is required to implement, otherwise some nodes cannot obtain the created Script objects when there are multiple nodes), if they are not obtained, they will be compiled once in real time and put into the cache (according to the sha256 value of the script as the cache key ), if the class cannot be found, compile the class in real time (appears when the application is restarted or starts a new cluster node), and call the method declared in the third line of the script comment to execute the script. The parameter is fixed as Map<String, Object> and only one parameter.

Guess you like

Origin blog.csdn.net/guofangsky/article/details/131335425