发表于: 2018-01-06 21:22:52
1 553
今天完成的事情:
今天大致完成了一些关于springmvc的路径问题。
在启动Tomcat之后。打开页面首先进入的是如下链接,
http://localhost:8080/
效果如下:
然后在浏览器栏中输入http://localhost:8080/demo.txt 就会打开我预先在webAPP目录之下建立的demo.txt。说明我们最开始进入的服务器就是webAPP。
然后和师兄交流了一下,大概明白了<welcome-file-list>的真正的用法。
<welcome-file-list> <!--welcome-file-list开头-->
<welcome-file>/index.jsp</welcome-file> <!--设置欢迎页面,也就是项目启动后浏览器展示的第一个页面-->
</welcome-file-list> <!--welcome-file-list结尾-->
这个需要在配置文件中进行设置,然后再控制器中进行注解。
嗯思路是通了,但是怎么实际运行,还有些麻烦。
明天计划的事情:开始学习servlet,应该就可以开始编写实际的代码了吧。
遇到的问题:
1.IDEA下载原型缓慢。
这是因为MAVEN下载连接到的是国外的数据。只要更改MAVEN的setting文件,在其中添加如下设置:
<!-- mirror
| Specifies a repository mirror site to use instead of a given repository. The repository that
| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
|
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://my.repository.com/repo/path</url>
</mirror>
-->
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>uk</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://uk.maven.org/maven2/</url>
</mirror>
<mirror>
<id>CN</id>
<name>OSChina Central</name>
<url>http://maven.oschina.net/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>nexus</id>
<name>internal nexus repository</name>
<!-- <url>http://192.168.1.100:8081/nexus/content/groups/public/</url>-->
<url>http://repo.maven.apache.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
然后你就会感受到非一般的速度。
收获:
1.和别人交流搜索关键词的添加,可以转换思维,快速查找资料。
2.以收集信息构筑成一个能够完整描述这一知识点的领域,然后提取出其中的精髓,抽丝剥茧,提取出一个精简的框架。并清晰的认知,熟练的使用这一框架。
进度:进度很慢,但是感觉算是解决了路上的一些障碍,明天加把劲。
评论