日期:2014-05-17 浏览次数:20790 次
<!-- 配置静态资源,直接映射到对应的文件夹,不被DispatcherServlet处理,3.04新增功能,需要重新设置spring-mvc-3.0.xsd -->
<mvc:resources mapping="/img/**" location="/imgage/"/>
<mvc:resources mapping="/js/**" location="/js/"/>
<mvc:resources mapping="/css/**" location="/css/"/>
<mvc:resources mapping="/html/**" location="/html/"/>
<!--
①:对web包中的所有类进行扫描,以完成Bean创建和自动依赖注入的功能
-->
<context:annotation-config/>
<context:component-scan base-package="com.honestspring.controller"></context:component-scan>
<context:component-scan base-package="com.honestspring.dao"></context:component-scan>
<context:component-scan base-package="com.honestspring.service"></context:component-scan>
<context:component-scan base-package="com.honestspring.sys.component"></context:component-scan>
<context:component-scan base-package="com.honestspring.sys.tld"></context:component-scan>
<context:component-scan base-package="com.honestspring.model"></context:component-scan>
@Autowired
@Qualifier("hSListViewComponent")
public AbtractSysViewComponent hsViewComponent;
import com.honestspring.util.XMLManager;
public abstract class AbtractSysViewComponent {
public abstract String spellFileName(String module);
public Document getResource(String module) {
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import com.honestspring.common.Constant;
import com.honestspring.sys.model.DataGrid;
import com.honestspring.sys.screen.model.Column;
import com.honestspring.sys.screen.model.Function;
import com.honestspring.sys.screen.model.Toolbar;
import com.honestspring.util.DataGridModel;
import com.honestspring.util.XMLManager;
@Component
public class HSListViewComponent extends AbtractSysViewComponent {
@Autowired
private FieldWidthOfListStrategyIntf fieldWidthOfListStragey;
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'listViewAjaxController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: public com.honestspring.sys.component.AbtractSysViewComponent com.honestspring.controller.ListViewAjaxController.hsViewComponent; nested exception is org.springframework.beans.factory.NoSuchBeanDefinit