一、报错内容java.lang.IllegalStateException: org.springframework.context.annotation.AnnotationConfigApplicationContext@6f79caec has not been refreshed yet
或
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [application.xml]; nested exception is java.io.FileNotFoundException: class path resource [application.xml] cannot be opened because it does not exist:
二、报错之处及改正
这个要改成
AnnotationConfigApplicationContext(SpringConfigure.class),括号里面也要加不然也会报错
即下面所示