美文网首页
07 构建Spring MVC应用程序

07 构建Spring MVC应用程序

作者: hayes0420 | 来源:发表于2018-06-03 18:43 被阅读0次
image.png

上图是MVC经历的所有站点

一 Spring web初探
根据https://blog.csdn.net/classicer/article/details/50753019 手动练习了一遍,最后eclipse直接回了个404 not found

直接懵逼,后来想想404 not found是不是eclipse与myeclipse比没那么只能吧,直接改url为http://127.0.0.1:8080/spittr/再次登录,
成功

image.png

忙活了2小时就应为这个报错,可以说是相当low了

备注:

二 继续学习
对web有个初步认识后,根据https://segmentfault.com/a/1190000004343063?_ea=575820学习扩展一下

三:遇到问题:
1 拷贝上一个项目到新的项目,发现遇到报错Server at localhost. Multiple Contexts have a path,搜索发现在E:\eclips_java.metadata.plugins\org.eclipse.wst.server.core\tmp2\conf\server.xml确实存在两个context,于是删除一个,运行成功
Context docBase="spittr" path="/spittr" reloadable="true" source="org.eclipse.jst.jee.server:spittr"/><Context docBase="spittr3" path="/spittr" reloadable="true" source="org.eclipse.jst.jee.server:spittr3"/></Host>

2 其中测试中遇到警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:SecondServlet' did not find a matching property.
研究后确认就是个报错,不影响执行。

相关文章

网友评论

      本文标题:07 构建Spring MVC应用程序

      本文链接:https://www.haomeiwen.com/subject/bnajsftx.html