sql server - Spring boot - Autowire datasource -


i having spring boot application using gradle , trying inject datasource , based on information given in application.properties(under src/main/resources)

 spring.datasource.url=  spring.datasource.username=  spring.datasource.password=  spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.sqlserverdriver 

i have sqljdbc4.jar in classpath , , in boot class (the 1 annotated @springbootapplication , have field of type javax.sql.datasource annotated @autowired . field not getting autowired , complains missing bean definition . ideally want sqlserverxadatasource injected field . spring boot should ideally autowire based on info given in application.properties , right ? missing here ?


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -