ssm的spring-servlet.xml的配置文件:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.2.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.2.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.2.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd">
<!-- 扫描包 -->
<context:component-scan base-package="com.wskj.ssm">
<!-- 扫描所有的controller 但是不扫描service-->
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller" />
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service" />
</context:component-scan>
<!-- 启用注解 -->
<mvc:annotation-driven></mvc:annotation-driven>
<!-- 静态资源映射 -->
<mvc:resources location="/resource/" mapping="/static/**"></mvc:resources>
<mvc:resources location="/files/" mapping="/files/**"></mvc:resources>
<!-- 页面解析器。prefix:前缀, suffix:后缀 -->
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
<!-- json的支持 -->
<bean id="messageAdapter"
class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
<property name="messageConverters">
<list>
<!-- Support JSON -->
<bean
class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter" />
</list>
</property>
</bean>
<bean id="exceptionMessageAdapter"
class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver">
<property name="messageConverters">
<list>
<!-- Support JSON -->
<bean
class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter" />
</list>
</property>
</bean>
<!-- 文件上传 -->
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver"
p:maxUploadSize="34564356345456"
p:defaultEncoding="utf-8">
<!-- <property name="defaultEncoding" value="utf-8"></property> -->
</bean>
</beans>
分享到:
相关推荐
ssm框架基础配置文件,不需要自己每次都手动敲,拿来即用,注意修改少数几个路径,超级方便。
ssm框架配置简要说明,一些必要的文档说明, 懂SSM框架基础的适合观看一下
ssm框架脚手架java基础配置文件Spring/SpringMVC/MyBatis eclipse下。ssm框架脚手架java基础配置文件Spring/SpringMVC/MyBatis eclipse下。ssm框架脚手架java基础配置文件Spring/SpringMVC/MyBatis eclipse下。...
Java开发项目基于SSM框架的管理系统源代码。基于SSM框架的管理系统 实现 登录 、 注册 、 增 、 删 、 改 、 查 ; 可继续完善增加前端、校验、其他功能等; 可作为SSM项目开发练习基础模型; 课程设计 、 毕业...
适合使用SSM框架开发的人群,可以在此基础上进行添加功能等,将SSM配置都已经弄好。
SSM-xml+注解整合SSM框架-《员工信息管理系统》-功能演示.mp4 ...主要利用xml配置问价+注解整合SSM框架,在此基础上实现一套crud。 前端没有使用模板,所以大道至简,主要是联系ssm框架的整合方法。
spring+spring mvc +mybatis 整合maven工程
ssm框架的基本模型,包括一些配置文件,还有接口、实现类,并且都有详细的注释
适合初学者,SSM框架基础的搭建和最简单的配置文件,没有工具包跟拦截器,只是单纯的框架。
ssm项目基础框架搭建,包括maven配置、spring、springMvc、mybatis、logging等基础内容、xml配置注释详细
基础的ssm框架整合配置,实现简单的crud功能,对新手有帮助
1711A 六组项目简介(仓库管理系统) 我们做的是一个仓库管理系统,它包含:菜单管理、基础...配置:项目用的是maven+ssm框架+httpclient+webservice+mongodb+redis缓存技术,需要配置相应的配置文件,才可以运行此文件
使用此资源的好处:我们都知道搭建SSM项目最麻烦的就是前期进行框架的搭建,配置很麻烦很繁琐,人称配置地狱,这个模板可以为你省去大量的搭建时间,不过这其中的内容是一个很基础的项目,没有大量的功能,只有简单...
按部就班地学习:建议从基础的Java Web开发开始,逐步深入到SSM框架的学习。通过实践,逐步掌握SSM框架的使用技巧和Java Web开发的最佳实践。 参考项目文件和笔记:项目文件和笔记提供了丰富的背景信息和开发经验。...
项目标题:基于SSM框架的Java CRUD操作演示源码 ...本项目以简洁明了的代码展示了SSM框架在实现后端CRUD操作的基础应用,适合作为学习SSM框架的经典入门示例,也便于开发者在此基础上进行扩展和优化。
适合对SSM没有使用过的同学,讲解通俗易懂,覆盖了当前SSM使用的基本操作 课程内容: 1、Spring简介及快速入门 2、Spring配置文件及其相应API 3、Spring注解开发 4、Spring web环境及其Junit的集成 5、Spring ...
- Properties配置文件:4个,包含系统的基础配置信息。 - JPG图片:3个,用于界面美化和视觉辅助。 简而言之,这是一个基于SSM框架开发的宿舍管理系统,不仅界面友好、操作便捷,而且能够高效地处理宿舍相关的各项...
webservice里面的框架技术 cxf生成一个沟通接口的桥梁,然后新建一个沟通桥梁的类,再通过配置相关的配置文件及jar包就可以调用出接口中的数据,之后选中一条数据,并输入收件人的邮箱 ,点击发送后,我们会将收件人...
一、项目简介 ...基础数据管理:客户资料管理,系统基础数据配置,维修项目管理,供应商管理,配件信息管理,仓库信息管理,业务类型管理等 https://blog.csdn.net/weixin_43860634/article/details/125337823
按部就班地学习:建议从基础的Java Web开发开始,逐步深入到SSM框架的学习。通过实践,逐步掌握SSM框架的使用技巧和Java Web开发的最佳实践。 参考项目文件和笔记:项目文件和笔记提供了丰富的背景信息和开发经验。...