Skip to content


krosenvold edited this page Sep 13, 2010 · 11 revisions
Clone this wiki locally

Spring context analyzer analyses spring contexts looking for errors.

Usage (in a spring-aware unit test):

SpringContextAnalyzer springContextAnalyzer = new SpringContextAnalyzer(applicationContext); List<Problem> problems = springContextAnalyzer.analyzeCurrentSpringContext(); assertEquals(springContextAnalyzer.describe( problems), 0, problems.size());

The analyzer currently understands two different errors:
Any field in a singleton bean that us NULL upon complete bean initialization is an error.
Any singleton bean using a session/request scoped bean without a scope proxy is an error.

The analyzer also contains a list of known exceptions to the NULL rule. This list is still in its very early phases.

git clone  git:// spring-context-analyzer
cd spring-context-analyzer
mvn install


Something went wrong with that request. Please try again.