问题描述
帮我看下那错了Spring<?xmlversion="1.0"encoding="UTF-8"?><beansxmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:aop="http://www.springframework.org/schema/aop"xmlns:tx="http://www.springframework.org/schema/tx"xmlns:jdbc="http://www.springframework.org/schema/jdbc"xmlns:context="http://www.springframework.org/schema/context"xsi:schemaLocation="http://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context-3.0.xsdhttp://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.0.xsdhttp://www.springframework.org/schema/jdbchttp://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsdhttp://www.springframework.org/schema/txhttp://www.springframework.org/schema/tx/spring-tx-3.0.xsdhttp://www.springframework.org/schema/aophttp://www.springframework.org/schema/aop/spring-aop-3.0.xsd"default-lazy-init="false"><!--<context:component-scanbase-package="org.javacoo.crawler.ui"/>--><!--允许autowire--><context:annotation-config/><beanid="MainFrame"class="com.supermarket.main.MainFrame"></bean></beans>
publicclassTestimplementsITest{privateMainFramemain1;publicvoidsetMain1(MainFramemain1){this.main1=main1;}publicTest(){main1.run1();}publicstaticvoidmain(String[]args){ApplicationContextac=newClassPathXmlApplicationContext("resources/applicationContext.xml");//MainFramem=(MainFrame)ac.getBean("MainFrame");//m.run1();newTest();}
解决方案
解决方案二:
报的啥子错哦。大家肉眼不是编译器。再说你这还是运行时错误。
解决方案三:
你这哪里看到注解了?