{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/5776","repository_url":"https://api.github.com/repos/spring-projects/spring-boot","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/5776/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/5776/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/5776/events","html_url":"https://github.com/spring-projects/spring-boot/issues/5776","id":150555970,"number":5776,"title":"@JsonTest does not load ApplicaitonContext correctly.","user":{"login":"hantsy","id":854520,"avatar_url":"https://avatars.githubusercontent.com/u/854520?v=3","gravatar_id":"","url":"https://api.github.com/users/hantsy","html_url":"https://github.com/hantsy","followers_url":"https://api.github.com/users/hantsy/followers","following_url":"https://api.github.com/users/hantsy/following{/other_user}","gists_url":"https://api.github.com/users/hantsy/gists{/gist_id}","starred_url":"https://api.github.com/users/hantsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hantsy/subscriptions","organizations_url":"https://api.github.com/users/hantsy/orgs","repos_url":"https://api.github.com/users/hantsy/repos","events_url":"https://api.github.com/users/hantsy/events{/privacy}","received_events_url":"https://api.github.com/users/hantsy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/invalid","name":"invalid","color":"e6e6e6"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-23T13:33:40Z","updated_at":"2016-04-23T14:56:58Z","closed_at":"2016-04-23T14:10:31Z","body":"I am trying to use`@JsonTest` to the `@JsonComponent`, but it seems there are some ApplicationContext loading problem existed.\r\n\r\nThe sample is hosted on my github, there is a **1.4-upgrade** branch to taste Spring Boot 1.4.0M2.\r\n\r\n [https://github.com/hantsy/angularjs-springmvc-sample-boot/](https://github.com/hantsy/angularjs-springmvc-sample-boot/).\r\n\r\nThe test codes:\r\n\r\n[LocalDateTimeJsonComponentTest](https://github.com/hantsy/angularjs-springmvc-sample-boot/blob/1.4-upgrade/src/test/java/com/hantsylabs/restexample/springmvc/test/LocalDateTimeJsonComponentTest.java)\r\n\r\nIf I used `@JsonTest` instead of `@SpringBootTest`, it will report the `ApplicationSecurity` constructor injection failure. The following is the logging details.\r\n\r\n\r\n\torg.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.hantsylabs.restexample.springmvc.Application$ApplicationSecurity': Unsatisfied dependency expressed through constructor parameter 0: No qualifying bean of type [com.hantsylabs.restexample.springmvc.repository.UserRepository] found for dependency [com.hantsylabs.restexample.springmvc.repository.UserRepository]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.hantsylabs.restexample.springmvc.repository.UserRepository] found for dependency [com.hantsylabs.restexample.springmvc.repository.UserRepository]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}\r\n\t\tat org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1143) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:775) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:841) ~[spring-context-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:540) ~[spring-context-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:765) ~[spring-boot-1.4.0.M2.jar:1.4.0.M2]\r\n\t\tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) ~[spring-boot-1.4.0.M2.jar:1.4.0.M2]\r\n\t\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:314) ~[spring-boot-1.4.0.M2.jar:1.4.0.M2]\r\n\t\tat org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:104) [spring-boot-test-1.4.0.M2.jar:1.4.0.M2]\r\n\t\tat org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98) [spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116) [spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83) [spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.boot.test.autoconfigure.AutoConfigureReportTestExecutionListener.prepareTestInstance(AutoConfigureReportTestExecutionListener.java:49) [spring-boot-test-autoconfigure-1.4.0.M2.jar:1.4.0.M2]\r\n\t\tat org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:230) [spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:228) [spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:287) [spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.12.jar:4.12]\r\n\t\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:289) [spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:247) [spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94) [spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) [junit-4.12.jar:4.12]\r\n\t\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) [junit-4.12.jar:4.12]\r\n\t\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) [junit-4.12.jar:4.12]\r\n\t\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) [junit-4.12.jar:4.12]\r\n\t\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) [junit-4.12.jar:4.12]\r\n\t\tat org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) [spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) [spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.junit.runners.ParentRunner.run(ParentRunner.java:363) [junit-4.12.jar:4.12]\r\n\t\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191) [spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283) [surefire-junit4-2.18.1.jar:2.18.1]\r\n\t\tat org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173) [surefire-junit4-2.18.1.jar:2.18.1]\r\n\t\tat org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) [surefire-junit4-2.18.1.jar:2.18.1]\r\n\t\tat org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128) [surefire-junit4-2.18.1.jar:2.18.1]\r\n\t\tat org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203) [surefire-booter-2.18.1.jar:2.18.1]\r\n\t\tat org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155) [surefire-booter-2.18.1.jar:2.18.1]\r\n\t\tat org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) [surefire-booter-2.18.1.jar:2.18.1]\r\n\tCaused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.hantsylabs.restexample.springmvc.repository.UserRepository] found for dependency [com.hantsylabs.restexample.springmvc.repository.UserRepository]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}\r\n\t\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1398) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1051) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1018) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:834) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\t... 43 common frames omitted\r\n\r\n\t2016-04-23 21:31:09.879 ERROR 5944 --- [main] o.s.test.context.TestContextManager      : Caught exception while allowing TestExecutionListener [org.springframework.boot.test.autoconfigure.AutoConfigureReportTestExecutionListener@6580cfdd] to prepare test instance [com.hantsylabs.restexample.springmvc.test.LocalDateTimeJsonComponentTest@31c88ec8]\r\n\r\n\tjava.lang.IllegalStateException: Failed to load ApplicationContext\r\n\t\tat org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124) ~[spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83) ~[spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.boot.test.autoconfigure.AutoConfigureReportTestExecutionListener.prepareTestInstance(AutoConfigureReportTestExecutionListener.java:49) ~[spring-boot-test-autoconfigure-1.4.0.M2.jar:1.4.0.M2]\r\n\t\tat org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:230) ~[spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:228) [spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:287) [spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.12.jar:4.12]\r\n\t\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:289) [spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:247) [spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94) [spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) [junit-4.12.jar:4.12]\r\n\t\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) [junit-4.12.jar:4.12]\r\n\t\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) [junit-4.12.jar:4.12]\r\n\t\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) [junit-4.12.jar:4.12]\r\n\t\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) [junit-4.12.jar:4.12]\r\n\t\tat org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) [spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) [spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.junit.runners.ParentRunner.run(ParentRunner.java:363) [junit-4.12.jar:4.12]\r\n\t\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191) [spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283) [surefire-junit4-2.18.1.jar:2.18.1]\r\n\t\tat org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173) [surefire-junit4-2.18.1.jar:2.18.1]\r\n\t\tat org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) [surefire-junit4-2.18.1.jar:2.18.1]\r\n\t\tat org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128) [surefire-junit4-2.18.1.jar:2.18.1]\r\n\t\tat org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203) [surefire-booter-2.18.1.jar:2.18.1]\r\n\t\tat org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155) [surefire-booter-2.18.1.jar:2.18.1]\r\n\t\tat org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) [surefire-booter-2.18.1.jar:2.18.1]\r\n\tCaused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.hantsylabs.restexample.springmvc.Application$ApplicationSecurity': Unsatisfied dependency expressed through constructor parameter 0: No qualifying bean of type [com.hantsylabs.restexample.springmvc.repository.UserRepository] found for dependency [com.hantsylabs.restexample.springmvc.repository.UserRepository]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.hantsylabs.restexample.springmvc.repository.UserRepository] found for dependency [com.hantsylabs.restexample.springmvc.repository.UserRepository]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}\r\n\t\tat org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1143) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:775) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:841) ~[spring-context-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:540) ~[spring-context-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:765) ~[spring-boot-1.4.0.M2.jar:1.4.0.M2]\r\n\t\tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) ~[spring-boot-1.4.0.M2.jar:1.4.0.M2]\r\n\t\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:314) ~[spring-boot-1.4.0.M2.jar:1.4.0.M2]\r\n\t\tat org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:104) ~[spring-boot-test-1.4.0.M2.jar:1.4.0.M2]\r\n\t\tat org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98) ~[spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116) ~[spring-test-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\t... 25 common frames omitted\r\n\tCaused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.hantsylabs.restexample.springmvc.repository.UserRepository] found for dependency [com.hantsylabs.restexample.springmvc.repository.UserRepository]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}\r\n\t\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1398) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1051) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1018) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:834) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\tat org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) ~[spring-beans-4.3.0.RC1.jar:4.3.0.RC1]\r\n\t\t... 43 common frames omitted\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/213753228","html_url":"https://github.com/spring-projects/spring-boot/issues/5776#issuecomment-213753228","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/5776","id":213753228,"user":{"login":"hantsy","id":854520,"avatar_url":"https://avatars.githubusercontent.com/u/854520?v=3","gravatar_id":"","url":"https://api.github.com/users/hantsy","html_url":"https://github.com/hantsy","followers_url":"https://api.github.com/users/hantsy/followers","following_url":"https://api.github.com/users/hantsy/following{/other_user}","gists_url":"https://api.github.com/users/hantsy/gists{/gist_id}","starred_url":"https://api.github.com/users/hantsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hantsy/subscriptions","organizations_url":"https://api.github.com/users/hantsy/orgs","repos_url":"https://api.github.com/users/hantsy/repos","events_url":"https://api.github.com/users/hantsy/events{/privacy}","received_events_url":"https://api.github.com/users/hantsy/received_events","type":"User","site_admin":false},"created_at":"2016-04-23T14:56:57Z","updated_at":"2016-04-23T14:56:57Z","body":"@snicoll \r\n\r\n`UserRepository` is a Spring Data JPA interface. I have to disable JPA in projects to  user `@JsonTest`?\r\n\r\nI found `@DataJpaTest`, `@WebMvcTest` have the same problems, they do not load ApplicationContext as the `@SpringBootTest`, I really do not know the design purpose of the  `@JsonTest`, `@DataJpaTest`, `@WebMvcTest` if they can not be used freely."}}