81,122
社区成员




<context:component-scan base-package="com.spring3">
<context:include-filter type="regex" expression="com.spring3.*"/>
</context:component-scan>
public class Test {
public static void main(String[] args) {
ApplicationContext context = new ClassPathXmlApplicationContext("ApplicationContext.xml");
((UserService)context.getBean("userService")).fun();
}
}