在servlet中新增init方法:
public void init(ServletConfig config) {
super.init(config);
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext (this,config.getServletContext());
}
标签:contex log config conf bean inject get text let
在servlet中新增init方法:
public void init(ServletConfig config) {
super.init(config);
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext (this,config.getServletContext());
}
在servlet中用spring @Autowire注入Bean
标签:contex log config conf bean inject get text let
原文地址:https://www.cnblogs.com/ggqzz/p/8421772.html