随笔分类 - Spring
摘要:@Service("taskExecutorFactory") public class TaskExecutorFactory implements ApplicationContextAware,InitializingBean { private ApplicationContext context; private static Map taskExecutorMap...
阅读全文
摘要:@PostContruct是spring框架的注解,在方法上加该注解会在项目启动的时候执行该方法,也可以理解为在spring容器初始化的时候执行该方法。
阅读全文
摘要:@RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:trade.application.xml" }) public class BaseTest { }
阅读全文
摘要:接口说明:当一个类实现了这个接口之后,这个类就可以方便地获得 ApplicationContext 中的所有bean。换句话说,就是这个类可以直接获取Spring配置文件中,所有有引用到的bean对象。 在Web应用中,Spring容器通常采用声明式方式配置产生:开发者只要在web.xml中配置一个
阅读全文

浙公网安备 33010602011771号