发表于: 2020-02-25 23:14:51

1 1207




配置springmvc配置文件和web.xml,编写controller,jsp

一,springmvc.xml

在resources/spring文件下下创建springmvc.xml文件,配置处理器映射器、适配器、视图解析器。

配置web.xml

参考入门程序,web.xml

这个文件有两个作用:

配置前端控制器(DispatcherServlet)

加载spring容器:添加spring容器监听器,加载spring容器,使用通配符加载spring/下的配置文件

applicationContext-dao.xml

applicationContext-service.xml

applicationContext-transaction.xml


编写Controller(就是Handler)

编写jsp

服务器路径为WEB-INF/jsp/items/itemsList.jsp

今日问题暂无



返回列表 返回列表
评论

    分享到