Wednesday, August 10, 2016


In the Spring Java framework, referencing autowired beans with session or request scope requires CGLIB proxies, e.g.:

@Scope(value = "request", proxyMode = ScopedProxyMode.TARGET_CLASS)

This in turn requires that unit and integration tests (e.g. JUnit or Spock) use
@WebAppConfiguration in their class declarations.