首页 > 代码库 > spring+mybatis 配置问题

spring+mybatis 配置问题

spring-mvc 文件配置


<mvc:resources mapping="/static/**" location="/static/" /> //过滤可访问的静态文件,可以不经过spring的servlet
    
    <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">  
        <property name="messageConverters">  
             <list>  
                 <bean class="org.springframework.http.converter.StringHttpMessageConverter">  
                    <property name="supportedMediaTypes">  
                        <list>  
                            <value>text/plain;charset=UTF-8</value>  
                         </list>  
                    </property>  
                 </bean>
                 <bean class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter">  
                    <property name="supportedMediaTypes">  
                        <list>  
                            <value>text/plain;charset=UTF-8</value>
                         </list>  
                    </property>  
                 </bean>
             </list>  
        </property>  
    </bean>
    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="prefix" value="http://www.mamicode.com/WEB-INF/views/"/>
        <property name="suffix" value="http://www.mamicode.com/.jsp"/>
    </bean>
    
    <bean id="multipartResolver"  
          class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
    </bean>
          
    <context:component-scan base-package="cn.jesong.webcall.report.controller" />
    
    <mvc:annotation-driven />

spring+mybatis 配置问题