81,094
社区成员
发帖
与我相关
我的任务
分享
<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();
}
}