Refine SpringApplicationBuilder and add a test for profiles