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

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

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -