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
Post a Comment