Doing below works.
@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
But If I wanted to have dataSource, I should not do the above configuration.
The below link says that we need to all the properties in application.properties file. All the properties should start with
spring.datasource.*
http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html