您现在的位置:首页 >> 前端 >> 内容

SpringMVC的配置文件

时间:2017/8/23 9:11:00 点击:

  核心提示:一、配置头部vc='https://www.springframework.org/schema/mvc' xmlns:p='https://www.springframework.org/schem...

一、配置头部


vc="https://www.springframework.org/schema/mvc" xmlns:p="https://www.springframework.org/schema/p" xmlns:tx="https://www.springframework.org/schema/tx" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="
           https://www.springframework.org/schema/beans 
           https://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
           https://www.springframework.org/schema/context 
           https://www.springframework.org/schema/context/spring-context-3.0.xsd 
           https://www.springframework.org/schema/mvc https://www.springframework.org/schema/mvc/spring-mvc.xsd
           https://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop-3.0.xsd          
           https://www.springframework.org/schema/tx https://www.springframework.org/schema/tx/spring-tx-3.0.xsd">

二、配置注解驱动设置、静态资源访问



    

三、 解决org.apache.catalina.connector.RequestFacade cannot be cast to org.springframework.web.multipart.MultipartHttpServletRequest问题


        
    

四、启动Spring MVC的注解功能,完成请求和注解POJO的映射,解决@ResponseBody乱码问题


        
            
                
                    
                        
                            text/html;charset=UTF-8
                        
                    
                
            
        
    

五、 配置freemarker视图模版路径


        
        
        
            
                10
                zh_CN
                yyyy-MM-dd HH:mm:ss
                yyyy-MM-dd
                HH:mm:ss
                #.##
            
        
    

六、配置FreeMark视图解析器


        
        
        
        
        
        
        
        
        
    

七、扫描@Controller注解的类,完成bean创建和依赖注入 (spring Mvc层)

    
        
    

Tags:SP PR RI IN 
作者:网络 来源:Future_Car