Here is a simple way to get RESTEasy links to resolve UEL variable as
Spring beans (supposing there is only one Spring ApplicationContext) :

public class SpringELProvider implements ELProvider,
ApplicationContextAware {

    private static ApplicationContext applicationContext;

    public ELContext getContext(final ELContext ctx) {
        final SimpleSpringBeanELResolver elr = new
        return new ELContext() {

            public VariableMapper getVariableMapper() {
                return ctx.getVariableMapper();

            public FunctionMapper getFunctionMapper() {
                return ctx.getFunctionMapper();

            public ELResolver getELResolver() {
                CompositeELResolver cer = new CompositeELResolver();
                return cer;

    public void setApplicationContext(ApplicationContext
applicationContext) throws BeansException {
        SpringELProvider.applicationContext = applicationContext;


Also add a <bean class=" " /> in the
Spring application-context to initialize the ELProvider static variable.

Maybe it could be added to documentation (Extending the UEL context - as
the Seam sample) ?
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
Resteasy-users mailing list

Reply via email to