Spring boot test: Unable to instantiate inner configuration class
问题 I want to run JUnit tests for my DAO layer without involving my main Spring configurations. As such, I declared an inner class annotated with @Configuration so that it would override the configurations of the main application class annotated with @SpringBootApplication . This is the code: @RunWith(SpringRunner.class) @JdbcTest public class InterviewInformationControllerTest { @Configuration class TestConfiguration{ @Bean public InterviewInformationDao getInterviewInformationDao(){ return new