Problem accessing the variable "spring" in Groovy interceptor

15 views
Skip to first unread message

mats....@yahoo.com

unread,
May 2, 2017, 4:55:29 AM5/2/17
to membrane-monitor
Hi,

I'm trying to access a spring bean in the context of a Groovy interceptor script, but it doesn't work. I get error message in the log file:

groovy.lang.MissingPropertyException: No such property: spring

Note: I'm on Membrane version 4.0. The script is basically the same as in the examples/groovy/proxies.xml provided with Membrane version 4.3 package:

<groovy>
def value = spring.getBean('mySpringBean')
exc.response.header.add("X-Groovy", value)
</groovy>

Grateful for any advice!

Thanks,
Mats

mats....@yahoo.com

unread,
May 4, 2017, 6:53:15 AM5/4/17
to membrane-monitor
Update: Ok, upgraded to version 4.3, and now it works. 
Reply all
Reply to author
Forward
0 new messages