spring 注解
帮我看下那错了Spring
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="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/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"
default-lazy-init="false">
<!-- <context:component-scan base-package="org.javacoo.crawler.ui" />-->
<!-- 允许 autowire -->
<context:annotation-config />
<bean id="MainFrame" class="com.supermarket.main.MainFrame" >
</bean>
</beans>
--------------------编程问答-------------------- 报的啥子错哦。大家肉眼不是编译器。再说你这还是运行时错误。 --------------------编程问答-------------------- 你这哪里看到注解了?
public class Test implements ITest{
private MainFrame main1;
public void setMain1(MainFrame main1) {
this.main1 = main1;
}
public Test(){
main1.run1();
}
public static void main(String [] args){
ApplicationContext ac = new ClassPathXmlApplicationContext("resources/applicationContext.xml");
// MainFrame m= (MainFrame)ac.getBean("MainFrame");
// m.run1();
new Test();
}
补充:Java , Web 开发