package com.mucfc;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
@Controller
public class StaticFileController {
@RequestMapping(value="/image/test")
public ModelAndView img(HttpServletRequest request,HttpServletResponse response){
System.out.println("-----img-------");
return new ModelAndView("image");
}
@RequestMapping(value={"/index","/"})//相对于根目录的路径
public String test2() {
return "index";//指定页面要跳转的view视图路径
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
SpringMVC访问图片
共28个文件
jar:12个
xml:3个
jsp:2个
3星 · 超过75%的资源 需积分: 50 138 下载量 73 浏览量
2015-05-11
19:14:03
上传
评论
收藏 4.43MB 7Z 举报
温馨提示
SpringMVC访问图片,效果看博文http://blog.csdn.net/evankaka/article/details/45647031
资源推荐
资源详情
资源评论
收起资源包目录
SpringMVCLearningChapter2_1.7z (28个子文件)
SpringMVCLearningChapter2_1
WebContent
img
Koala.jpg 763KB
META-INF
MANIFEST.MF 39B
WEB-INF
web.xml 1KB
spring-servlet.xml 1KB
views
index.jsp 715B
image.jsp 683B
lib
spring-beans-3.2.9.RELEASE.jar 599KB
standard.jar 384KB
spring-context-3.2.9.RELEASE.jar 846KB
commons-logging-1.1.1.jar 59KB
spring-context-support-3.2.9.RELEASE.jar 126KB
jstl.jar 20KB
spring-instrument-tomcat-3.2.9.RELEASE.jar 10KB
spring-web-3.2.9.RELEASE.jar 618KB
spring-webmvc-3.2.9.RELEASE.jar 623KB
spring-expression-3.2.9.RELEASE.jar 192KB
spring-framework-bom-3.2.9.RELEASE.jar 6KB
spring-core-3.2.9.RELEASE.jar 864KB
.settings
org.eclipse.wst.jsdt.ui.superType.name 6B
org.eclipse.wst.common.project.facet.core.xml 345B
org.eclipse.wst.common.component 533B
org.eclipse.wst.jsdt.ui.superType.container 49B
.jsdtscope 503B
org.eclipse.jdt.core.prefs 364B
src
com
mucfc
StaticFileController.java 733B
.project 1KB
.classpath 841B
build
classes
com
mucfc
StaticFileController.class 1KB
共 28 条
- 1
资源评论
- yhcomeon2018-04-25不错,可以用
- jyk07082017-08-18什么鬼,代码里什么都没写,忽悠
Evankaka
- 粉丝: 7714
- 资源: 129
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功