title: Error: Property 'driverClassName' must not be empty
body: <blockquote>
    <p>Caused by: java.lang.IllegalArgumentException: Property 'driverClassName' must not be empty</p>
  </blockquote>
  
  <p>It works when I remove @Profile</p>
  
  <pre><code>@Profile("web")
  @Configuration
  @EnableWebMvc
  @ComponentScan(basePackages = "com.demo.bank")
  public class AppConfig extends WebMvcConfigurerAdapter {
  
  }
  </code></pre>
  
  <p>for the reference i adding test case snippet.   </p>
  
  <blockquote>
  <pre><code>@WebAppConfiguration
  @RunWith(SpringJUnit4ClassRunner.class)
  @ContextConfiguration(classes = { AppConfig.class })
  public class InsertTestCase {
    @Mock
    CommonService commonService;
  
    @InjectMocks
    HomeController homeController;
  
    @Autowired
    WebApplicationContext wac;
  
    MockMvc mockMvc;
  
    @Before
    public void init() {
        MockitoAnnotations.initMocks(this);
    }
  
    @Test
    public void testRoot() {
        try {
            this.mockMvc = MockMvcBuilders.standaloneSetup(homeController).build();
            MvcResult mvcResult = this.mockMvc.perform(get("/")).andExpect(status().isOk()).andReturn();
            logger.info("Response:-\t" + mvcResult.getResponse().getContentAsString());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
  }
  </code></pre>
  </blockquote>