title: spring boot fails to run - IllegalAccessError on startup
body: <p>I have a strange issue and that I have not been able to resolve.  I am trying to use the sample JPA sprint boot (v0.5.0-M6) project as a starting point for an application I am writing.  I grabbed the JPA sample and got that to run locally.  I then proceeded to add my code into that project.  I imported into eclipse and run as spring-boot.   Then I get this error:</p>
  
  <pre><code>Exception in thread "main" java.lang.IllegalAccessError: tried to access class org.springframework.core.io.DefaultResourceLoader$ClassPathContextResource from class org.springframework.boot.context.embedded.EmbeddedWebApplicationContext
  at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getResourceByPath(EmbeddedWebApplicationContext.java:386)
  at org.springframework.core.io.DefaultResourceLoader.getResource(DefaultResourceLoader.java:100)
  at org.springframework.context.support.GenericApplicationContext.getResource(GenericApplicationContext.java:211)
  at org.springframework.boot.context.initializer.ConfigFileApplicationContextInitializer.load(ConfigFileApplicationContextInitializer.java:192)
  at org.springframework.boot.context.initializer.ConfigFileApplicationContextInitializer.load(ConfigFileApplicationContextInitializer.java:134)
  at org.springframework.boot.context.initializer.ConfigFileApplicationContextInitializer.initialize(ConfigFileApplicationContextInitializer.java:121)
  at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:403)
  at org.springframework.boot.SpringApplication.run(SpringApplication.java:287)
  at org.springframework.boot.SpringApplication.run(SpringApplication.java:749)
  at org.springframework.boot.SpringApplication.run(SpringApplication.java:738)
  </code></pre>
  
  <p>From what I can tell, this is the wrong application context, since I am not using XML configuration but annotations to drive the configuration.    Spring boot is automatically selecting this one and I need to tell it not to use the above.  At least that is what I think I need to do.</p>
  
  <p>I did search here and in the spring.io forums but no one seems to have the same issue.</p>
  
  <p>Question: What drives the selection of an application context with the auto configuration?</p>
  
  <p>What should I be looking at to resolve the above issue?   What else do I need to provide to here help debug the auto configuration issue?</p>
  
  <p>TIA,</p>
  
  <p>Scott</p>