{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2791","repository_url":"https://api.github.com/repos/spring-projects/spring-boot","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2791/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2791/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2791/events","html_url":"https://github.com/spring-projects/spring-boot/issues/2791","id":67194144,"node_id":"MDU6SXNzdWU2NzE5NDE0NA==","number":2791,"title":"Could not autowire field: private javax.sql.DataSource org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.dataSource","user":{"login":"sanbumani","id":11858944,"node_id":"MDQ6VXNlcjExODU4OTQ0","avatar_url":"https://avatars0.githubusercontent.com/u/11858944?v=4","gravatar_id":"","url":"https://api.github.com/users/sanbumani","html_url":"https://github.com/sanbumani","followers_url":"https://api.github.com/users/sanbumani/followers","following_url":"https://api.github.com/users/sanbumani/following{/other_user}","gists_url":"https://api.github.com/users/sanbumani/gists{/gist_id}","starred_url":"https://api.github.com/users/sanbumani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanbumani/subscriptions","organizations_url":"https://api.github.com/users/sanbumani/orgs","repos_url":"https://api.github.com/users/sanbumani/repos","events_url":"https://api.github.com/users/sanbumani/events{/privacy}","received_events_url":"https://api.github.com/users/sanbumani/received_events","type":"User","site_admin":false},"labels":[{"id":131738784,"node_id":"MDU6TGFiZWwxMzE3Mzg3ODQ=","url":"https://api.github.com/repos/spring-projects/spring-boot/labels/for:%20stackoverflow","name":"for: stackoverflow","color":"c5def5","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2015-04-08T18:49:56Z","updated_at":"2018-07-07T12:55:01Z","closed_at":"2015-04-08T19:50:54Z","author_association":"NONE","body":"I followed the spring boot with jpa tutorial \nhttps://github.com/spring-projects/spring-data-jpa-examples/tree/master/spring-data-jpa-example\n\nBut i am getting this exception. Please advise\n\nCould not autowire field: private javax.sql.DataSource org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.dataSource\n## Application\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\n\n@SpringBootApplication\npublic class Application {\n\n```\npublic static void main(String[] args) {\n    SpringApplication.run(Application.class, args);\n}\n```\n\n}\n## Repository Class\n\nimport org.springframework.data.repository.Repository;\n\npublic interface UserDao extends Repository<Person, Long>{\n\n```\npublic Person findByUserId(Long id);\n```\n\n}\n## Domain\n\nimport javax.persistence.Entity;\nimport javax.persistence.NamedQueries;\nimport javax.persistence.NamedQuery;\nimport javax.persistence.Table;\n\n@NamedQueries({\n    @NamedQuery(name=\"Person.findByUserId\",\n            query=\"from Person where userId = ?\"),\n@NamedQuery(name=\"Person.fetchPersons\",\n            query=\"from Person order by name asc\"),\n}) \n@Entity\n@Table(name = \"person\")\npublic class Person extends GenericDataObject{\n\n```\nprivate String name;\n\nprivate String email;\n\npublic String getName() {\n    return name;\n}\n\npublic void setName(String name) {\n    this.name = name;\n}\n\npublic String getEmail() {\n    return email;\n}\n\npublic void setEmail(String email) {\n    this.email = email;\n}\n```\n\n}\n## Service Class\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Component;\nimport org.springframework.transaction.annotation.Transactional;\n\n@Component(\"userService\")\n@Transactional\npublic class UserServiceImpl implements UserService{\n\n```\nprivate final UserDao userDao;\n\n@Autowired\npublic UserServiceImpl(UserDao userDao) {\n    this.userDao = userDao;\n}\n@Override\npublic Person finUserById(Long id) {\n    return userDao.findByUserId(id);\n}\n```\n\n}\n## Controller\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\n\n@Controller\npublic class UserController {\n\n```\n@Autowired\nprivate UserService userService;\n\n@RequestMapping(\"/getUserById\")\npublic Person getUserById() {\n    return userService.finUserById(new Long(1));\n}\n```\n\n}\n## Application.Properties\n\nspring.datasource.url=jdbc:mysql://172.20.8.212:3306/CSD_UAT\nspring.datasource.username=sanbumani\nspring.datasource.password=sanbumani\n\nspring.jpa.database = MYSQL\nspring.jpa.show-sql = true\n## Build.gradle\n\nbuildscript {\n    repositories {\n        mavenCentral()\n    }\n    dependencies {\n        classpath(\"org.springframework.boot:spring-boot-gradle-plugin:1.2.3.RELEASE\")\n    }\n}\n\napply plugin: 'java'\napply plugin: 'eclipse'\napply plugin: 'idea'\napply plugin: 'spring-boot'\n\njar {\n    baseName = 'gs-rest-service'\n    version =  '1.0'\n}\n\nrepositories {\n    mavenCentral()\n}\n\nsourceCompatibility = 1.7\ntargetCompatibility = 1.7\n\ndependencies {\n    compile(\"org.springframework.boot:spring-boot-starter-parent\")\n    compile(\"org.springframework.boot:spring-boot-starter\")\n    compile(\"org.springframework.boot:spring-boot-starter-web\")\n    testCompile(\"junit:junit\")\n\n```\n//hibernate\n//compile 'org.eclipse.persistence:javax.persistence:2.1.0'\ncompile 'org.hibernate:hibernate-entitymanager:4.3.8.Final'\ncompile 'org.hibernate:hibernate-core:4.3.8.Final'\ncompile 'org.jboss.logging:jboss-logging:3.2.1.Final'\ncompile 'org.springframework.data:spring-data-jpa'\ncompile 'mysql:mysql-connector-java:5.1.34'\n```\n\n}\n\ntask wrapper(type: Wrapper) {\n    gradleVersion = '2.3'\n}\n## Error\n\nC:\\dev\\WebService-Test>java -jar build/libs/gs-rest-service-1.0.jar\n\n  .   ____          _            __ _ _\n /\\ / **_'_ __ _ _(_)_ __  __ _ \\ \\ \\ \\\n( ( )_** | '_ | '_| | '_ \\/ _` | \\ \\ \\ \\\n \\/  ___)| |_)| | | | | || (_| |  ) ) ) )\n  '  |____| .**|_| |_|_| |_\\**, | / / / /\n =========|_|==============|___/=/_/_/_/\n :: Spring Boot ::        (v1.2.3.RELEASE)\n\n2015-04-08 14:40:35.340  INFO 2836 --- [           main] hello.Application                        : Starting Application on SANBUMANI-8300 with PID 2836 (C:\\dev\\WebService-Test\\build\\libs\\gs-rest-service-1.0.jar started by sanbumani in C:\\dev\\WebService-Test)\n2015-04-08 14:40:35.381  INFO 2836 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@1f5248c: startup date [Wed Apr 08 14:40:35 EDT 2015]; root of context hierarchy\n2015-04-08 14:40:36.085  INFO 2836 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Overriding bean definition for bean 'beanNameViewResolver': replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigu\n=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]]\n2015-04-08 14:40:36.550  INFO 2836 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$4a3e36dd] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\n2015-04-08 14:40:36.577  INFO 2836 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'transactionAttributeSource' of type [class org.springframework.transaction.annotation.AnnotationTransactionAttributeSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\n2015-04-08 14:40:36.589  INFO 2836 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'transactionInterceptor' of type [class org.springframework.transaction.interceptor.TransactionInterceptor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\n2015-04-08 14:40:36.598  INFO 2836 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.config.internalTransactionAdvisor' of type [class org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\n2015-04-08 14:40:37.043  INFO 2836 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)\n2015-04-08 14:40:37.174  INFO 2836 --- [           main] o.apache.catalina.core.StandardService   : Starting service Tomcat\n2015-04-08 14:40:37.176  INFO 2836 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.0.20\n2015-04-08 14:40:37.281  INFO 2836 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext\n2015-04-08 14:40:37.281  INFO 2836 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1900 ms\n2015-04-08 14:40:37.941  INFO 2836 --- [ost-startStop-1] o.s.b.c.e.ServletRegistrationBean        : Mapping servlet: 'dispatcherServlet' to [/]\n2015-04-08 14:40:37.946  INFO 2836 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'characterEncodingFilter' to: [/_]\n2015-04-08 14:40:37.947  INFO 2836 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'hiddenHttpMethodFilter' to: [/_]\n2015-04-08 14:40:38.005  WARN 2836 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt\n\norg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private javax.sql.DataSource org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.dataSource; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.sql.DataSource] found for dependency: expected\n        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)\n        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)\n        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)\n        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)\n        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)\n        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)\n        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)\n        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)\n        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:368)\n        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1119)\n        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1014)\n        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)\n        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)\n        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)\n        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)\n        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)\n        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)\n        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:956)\n        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:747)\n        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)\n        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)\n        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)\n        at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)\n        at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)\n        at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)\n        at hello.Application.main(Application.java:11)\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n        at java.lang.reflect.Method.invoke(Method.java:606)\n        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)\n        at java.lang.Thread.run(Thread.java:744)\nCaused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private javax.sql.DataSource org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.dataSource; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.sql.DataSource] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}\n        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:561)\n        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)\n        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)\n        ... 31 common frames omitted\nCaused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.sql.DataSource] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}\n        at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1301)\n        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1047)\n        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942)\n        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533)\n        ... 33 common frames omitted\n\n2015-04-08 14:40:38.020  INFO 2836 --- [           main] o.apache.catalina.core.StandardService   : Stopping service Tomcat\n2015-04-08 14:40:38.055  WARN 2836 --- [ost-startStop-1] o.a.c.loader.WebappClassLoaderBase       : The web application [ROOT] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:\n java.lang.Object.wait(Native Method)\n java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)\n com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43)\n2015-04-08 14:40:38.060  INFO 2836 --- [           main] .b.l.ClasspathLoggingApplicationListener : Application failed to start with classpath: [jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/spring-boot-starter-1.2.3.RELEASE.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/spring-boot-starter-web-1.2.3.RELEASE.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/hibernate-entitymanager-4.3.8.Final.jar!/, jar:file:/C:/dev/WebServ\nile:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/spring-boot-1.2.3.RELEASE.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/spring-boot-autoconfigure-1.2.3.RELEASE.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/spring-boot-starter-logging-1.2.3.RELEASE.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/spring-core-4.1.6.RELEASE.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/snakeyaml-1.14.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/\nv/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/spring-webmvc-4.1.6.RELEASE.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/jboss-logging-annotations-1.2.0.Beta1.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/dom4j-1.6.1.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/hibernate-commons-annotations-4.0.5.Final.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-re\nrest-service-1.0.jar!/lib/spring-data-commons-1.9.2.RELEASE.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/spring-orm-4.0.9.RELEASE.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/spring-tx-4.0.9.RELEASE.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/aspectjrt-1.8.4.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/jul-to-slf4j-1.7.11.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/log4j-over-slf4j-1.7.11.jar!/, jar:file:/C:\nar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/tomcat-embed-websocket-8.0.20.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/jackson-annotations-2.4.0.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/jackson-core-2.4.5.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/validation-api-1.1.0.Final.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/classmate-1.0.0.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/li\nib/commons-logging-1.2.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/spring-context-4.1.6.RELEASE.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/jcl-over-slf4j-1.7.11.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/spring-aop-4.1.6.RELEASE.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/aopalliance-1.0.jar!/, jar:file:/C:/dev/WebService-Test/build/libs/gs-rest-service-1.0.jar!/lib/spring-beans-4.1.6.RELEASE.jar!/, jar:file:/C:/dev/WebService-Test/build/\n2015-04-08 14:40:38.063  INFO 2836 --- [           main] utoConfigurationReportLoggingInitializer :\n\nError starting ApplicationContext. To display the auto-configuration report enabled debug logging (start with --debug)\n\n2015-04-08 14:40:38.064 ERROR 2836 --- [           main] o.s.boot.SpringApplication               : Application startup failed\n\norg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private javax.sql.DataSource org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.dataSource; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.sql.DataSource] found for dependency: expected\n        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)\n        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)\n        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)\n        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)\n        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)\n        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)\n        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)\n        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)\n        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:368)\n        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1119)\n        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1014)\n        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)\n        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)\n        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)\n        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)\n        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)\n        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)\n        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:956)\n        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:747)\n        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)\n        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)\n        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)\n        at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)\n        at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)\n        at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)\n        at hello.Application.main(Application.java:11)\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n        at java.lang.reflect.Method.invoke(Method.java:606)\n        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)\n        at java.lang.Thread.run(Thread.java:744)\nCaused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private javax.sql.DataSource org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.dataSource; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.sql.DataSource] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}\n        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:561)\n        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)\n        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)\n        ... 31 common frames omitted\nCaused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.sql.DataSource] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}\n        at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1301)\n        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1047)\n        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942)\n        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533)\n        ... 33 common frames omitted\n\njava.lang.reflect.InvocationTargetException\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n"},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/403213865","html_url":"https://github.com/spring-projects/spring-boot/issues/2791#issuecomment-403213865","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2791","id":403213865,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzIxMzg2NQ==","user":{"login":"JavaHelper","id":8208031,"node_id":"MDQ6VXNlcjgyMDgwMzE=","avatar_url":"https://avatars0.githubusercontent.com/u/8208031?v=4","gravatar_id":"","url":"https://api.github.com/users/JavaHelper","html_url":"https://github.com/JavaHelper","followers_url":"https://api.github.com/users/JavaHelper/followers","following_url":"https://api.github.com/users/JavaHelper/following{/other_user}","gists_url":"https://api.github.com/users/JavaHelper/gists{/gist_id}","starred_url":"https://api.github.com/users/JavaHelper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JavaHelper/subscriptions","organizations_url":"https://api.github.com/users/JavaHelper/orgs","repos_url":"https://api.github.com/users/JavaHelper/repos","events_url":"https://api.github.com/users/JavaHelper/events{/privacy}","received_events_url":"https://api.github.com/users/JavaHelper/received_events","type":"User","site_admin":false},"created_at":"2018-07-07T12:55:01Z","updated_at":"2018-07-07T12:55:01Z","author_association":"NONE","body":"This is not working for the mongoDB application. Any pointers ?\r\n\r\nspring.data.mongodb.host=127.0.0.1\r\nspring.data.mongodb.port=27017\r\nspring.data.mongodb.database=springbatch"}}
{"actor":{"display_login":"JavaHelper"}}