Example usage for org.springframework.beans.factory.support DefaultListableBeanFactory registerScope

List of usage examples for org.springframework.beans.factory.support DefaultListableBeanFactory registerScope

Introduction

In this page you can find the example usage for org.springframework.beans.factory.support DefaultListableBeanFactory registerScope.

Prototype

@Override
    public void registerScope(String scopeName, Scope scope) 

Source Link

Usage

From source file:de.forsthaus.testutils.BackendGenericXmlContextLoader.java

@Override
protected void customizeBeanFactory(DefaultListableBeanFactory factory) {
    factory.registerScope("session", new SessionScope());
    factory.registerScope("request", new RequestScope());

    final MockHttpServletRequest request = new MockHttpServletRequest();
    ServletRequestAttributes attributes;
    attributes = new ServletRequestAttributes(request);
    RequestContextHolder.setRequestAttributes(attributes);

    super.customizeBeanFactory(factory);
}