spring-mvc
Snail_404
这个作者很懒,什么都没留下…
展开
-
spring mvc controller4中配置方式
一、注解配置(常用) mvc.xml<context:annotation-config></context:annotation-config> <context:component-scan base-package="com.ldu.hello"></c ontext:component-scan>HelloController.java@Controllerpublic clas原创 2017-08-20 10:49:17 · 242 阅读 · 0 评论 -
spring mvc 结果跳转方式
无视图解析器public class HelloController { @RequestMapping("/hello") public void hello(HttpServletRequest req,HttpServletResponse res) throws IOException{ //通过HttpServletResponse输出 //原创 2017-08-20 12:50:33 · 233 阅读 · 0 评论