摘要: 第一步:准备依赖 1、Spring-core beans expression context aop tx jdbc web webmvc 2、Druid MySQL-connector-java mybatis mybatis-spring 3、 Log4j slf4j-api slf4j-lo 阅读全文
posted @ 2019-09-14 21:29 幸福的小耗子 阅读(1860) 评论(0) 推荐(0) 编辑
摘要: 1、Spring MVC 的拦截器类似于Servlet 开发中的过滤器Filter,用于对Controller进行预处理和后处理。 2、使用SpringMVC拦截器步骤: 1.定义拦截器类 1.1 实现接口 org.springframework.web.servlet.HandlerInterce 阅读全文
posted @ 2019-09-14 19:50 幸福的小耗子 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 文件的上传 第一步:导入依赖,在pom.xml中配置 第二步:配置文件上传解析器,在springMVC.xml中配置 第三步:修改表单,加入属性enctype="multipart/form-data" application/x-www-form-urlencoded不是不能上传文件,是只能上传文 阅读全文
posted @ 2019-09-14 19:13 幸福的小耗子 阅读(825) 评论(0) 推荐(0) 编辑