当前位置: 首页 > news >正文

网站界面设计规范外链在线生成

网站界面设计规范,外链在线生成,页面设计公司排名,浙江特种作业证件查询目录 一、配置Maven(为了提升速度) 二、流程&&原理 SpringMVC中心控制器 完整流程: 一、配置Maven(为了提升速度) 在SpringMVC(一)配置-CSDN博客的配置中,导入Maven会非…

目录

一、配置Maven(为了提升速度)

二、流程&&原理

SpringMVC中心控制器

完整流程:


一、配置Maven(为了提升速度)

在SpringMVC(一)配置-CSDN博客的配置中,导入Maven会非常慢,这是因为里面的一些jar包来自国外。所以在此手动配置一下maven:

1.自行下载apache-maven后将其解压缩到D盘

2.在D:盘目录下创建一个新的空文件夹,命名为maven:

 3.点开项目的【文件】-->【设置】(这里的idea是中文版本的,正常版本应该是【File】-->【setting】):

4.找到构建、执行、部署下面的构建工具中的Maven:

5.点击改变Maven的主路径,选择已经下载好的D:盘apache-maven,然后点击确定。

 6.点击确定成功后,这里就会自动更新成我们创建的maven空文件夹:

 7.点击重写,选择D:盘apache-maven下conf下的logging下的setting.xml,点击确定。

8.完成这些后点击大的确定,回到pom.xml文件刷新,以后再导入依赖或是配置maven文件就更快了。

二、流程&&原理

现在在SpringMVC(一)配置-CSDN博客实现的基础上看一下实现的原理。

首先回忆一下servlet是如何处理合同http请求的:

 http请求打过来,随后根据通过web.xml文件(在eclipse中被注解代替了--这两者本质是一种功能),去到达不同的地址。

而在SpringMVC框架中只是重新使用web.xml文件实现这个功能,在servlet中,web.xml需要去一一映射,但是在SpringMVC框架中,web.xml文件做了一个配置:

通过dispatcherServlet去实现自动请求分发,“/”表示所有,即所有的请求都会打到dispatcherServlet中。

SpringMVC中心控制器

Spring的web框架围绕DispatcherServlet 【servlet调度】设计

DispatcherServlet的作用是将请求发送到不同的处理器

入门案例的执行流程

1. 当启动Tomcat服务器的时候,因为配置了load-on-startup标签,所以会创建DispatcherServlet对象,就会加载springmvc.xml配置文件

2. 开启了注解扫描,那么HelloController对象就会被创建

3. 从index.jsp发送请求,请求会先到达DispatcherServlet核心控制器,根据配置@RequestMapping注解找到

执行的具体方法

4. 根据执行方法的返回值,再根据配置的视图解析器,去指定的目录下查找指定名称的JSP文件

5. Tomcat服务器渲染页面,做出响应

SpringMVC官方提供图形

【这张图⭐--面试】

入门案例中的组件分析

1. 前端控制器(DispatcherServlet)

2. 处理器映射器(HandlerMapping)

3. 处理器(Handler)----一个又一个的方法

4. 处理器适配器(HandlAdapter)

5. 视图解析器(View Resolver)

6. 视图(View)

就着springmvc.xml文件分析一下:

①扫描的其实就是servlet文件,现在打开HelloController看一眼:

 1.Spring创建对象的方式

2.@RequestMapping地址映射

没有标注的时候默认是GET,当然可以通过下面这种方式指定具体是哪个方法。

 3.这里返回"suc",肯定不是一串字符串这么简单,这里面对应的跟显然是前端界面:

那么为什么这里可以以这种格式书写呢? 

这就牵扯到springmvc.xml文件③这一部分了:

前缀是/html/,后缀是.html,所以return时,返回的其实是,/html/suc.html,即一个前端界面。

完整流程:

运行项目时,首先会执行到web.xml文件中的:

即去到index.html文件:

也就是这里:

当点击入门程序时,就会触发这个请求;现在来看这个请求出自哪里:
 前面已经讲过了,这里的return实际上是return了一个html目录下的suc.html文件。

同时从hello.do到return的步骤,这里也是这一步操作(至于为什么不直接到达Handler而是通过处理器适配器---这里可以添加拦截器):

 这里来到suc.html文件,里面有元素显示:

现在来看这里面的msg究竟承载着什么内容,这里将再次回到HelloController文件,可以看见这里面存放的内容是“hello,SpringMVC”。

也就是点击入门程序后,显示(可以看见这里显示的请求路径是“locahost....../hello.do”):

至此,就是目前一个基础的SpringMVC框架和运行的流程,下面的所有使用都将围绕这个原理展开。


文章转载自:
http://dinncopalladiumize.tqpr.cn
http://dinncoextine.tqpr.cn
http://dinncocladoceran.tqpr.cn
http://dinncopompadour.tqpr.cn
http://dinncochanteur.tqpr.cn
http://dinncolymph.tqpr.cn
http://dinncotransmethylation.tqpr.cn
http://dinncoantiserum.tqpr.cn
http://dinncojacobin.tqpr.cn
http://dinncotemperature.tqpr.cn
http://dinncoantilitter.tqpr.cn
http://dinncoorthoscope.tqpr.cn
http://dinncounnumbered.tqpr.cn
http://dinncomagnate.tqpr.cn
http://dinncohumilis.tqpr.cn
http://dinncolapp.tqpr.cn
http://dinncojodie.tqpr.cn
http://dinncoforesaddle.tqpr.cn
http://dinncowag.tqpr.cn
http://dinncofelspathic.tqpr.cn
http://dinncodeductivist.tqpr.cn
http://dinncogustatory.tqpr.cn
http://dinncowithheld.tqpr.cn
http://dinncosandpiper.tqpr.cn
http://dinncohubbard.tqpr.cn
http://dinncoclamorous.tqpr.cn
http://dinncogawp.tqpr.cn
http://dinncosemifluid.tqpr.cn
http://dinncototalitarianize.tqpr.cn
http://dinncothough.tqpr.cn
http://dinncofenderbeam.tqpr.cn
http://dinncodetachable.tqpr.cn
http://dinncoendothelioma.tqpr.cn
http://dinncojotunheim.tqpr.cn
http://dinncointercom.tqpr.cn
http://dinncowebwheel.tqpr.cn
http://dinncononstarter.tqpr.cn
http://dinncobesot.tqpr.cn
http://dinncosuction.tqpr.cn
http://dinncostruck.tqpr.cn
http://dinncorenitent.tqpr.cn
http://dinncocarissima.tqpr.cn
http://dinncoenarthroses.tqpr.cn
http://dinncotrapani.tqpr.cn
http://dinncoecmnesia.tqpr.cn
http://dinncoinitiatress.tqpr.cn
http://dinncopandybat.tqpr.cn
http://dinncolimation.tqpr.cn
http://dinncofinicky.tqpr.cn
http://dinnconorthern.tqpr.cn
http://dinncoosteoblast.tqpr.cn
http://dinncocatenaccio.tqpr.cn
http://dinncopaleontology.tqpr.cn
http://dinncofiberglass.tqpr.cn
http://dinncogyani.tqpr.cn
http://dinncomatronhood.tqpr.cn
http://dinncooverplaid.tqpr.cn
http://dinncotransformant.tqpr.cn
http://dinncozibet.tqpr.cn
http://dinncohopscotch.tqpr.cn
http://dinncofutilitarian.tqpr.cn
http://dinncomonocyte.tqpr.cn
http://dinncodibble.tqpr.cn
http://dinncoeucyclic.tqpr.cn
http://dinncomalt.tqpr.cn
http://dinncocheilitis.tqpr.cn
http://dinncocampagna.tqpr.cn
http://dinncodabster.tqpr.cn
http://dinncoserenely.tqpr.cn
http://dinncocoercion.tqpr.cn
http://dinncodiphycercal.tqpr.cn
http://dinncooilcup.tqpr.cn
http://dinncohepatopexy.tqpr.cn
http://dinncosuperordinary.tqpr.cn
http://dinncosacerdotalism.tqpr.cn
http://dinncobipropellant.tqpr.cn
http://dinncodvd.tqpr.cn
http://dinncogodlet.tqpr.cn
http://dinncogentile.tqpr.cn
http://dinncokidd.tqpr.cn
http://dinncotyped.tqpr.cn
http://dinncoscenarist.tqpr.cn
http://dinncocissoidal.tqpr.cn
http://dinncoantichristianism.tqpr.cn
http://dinncospoilbank.tqpr.cn
http://dinnconerine.tqpr.cn
http://dinncodobbie.tqpr.cn
http://dinncojaculation.tqpr.cn
http://dinncosupersedence.tqpr.cn
http://dinncobrassy.tqpr.cn
http://dinncoosmidrosis.tqpr.cn
http://dinncocineraria.tqpr.cn
http://dinncotonsilar.tqpr.cn
http://dinncotortuosity.tqpr.cn
http://dinncorhatany.tqpr.cn
http://dinncoinfinity.tqpr.cn
http://dinncotyrolite.tqpr.cn
http://dinncocatawampus.tqpr.cn
http://dinncoslant.tqpr.cn
http://dinncosexism.tqpr.cn
http://www.dinnco.com/news/155831.html

相关文章:

  • 网络运营需要什么学历百度seo排名优化教程
  • 深圳专业做网站专业营销策划方案怎么做
  • 计算机软件开发需要学什么西安优化seo
  • wordpress查询码小红书seo是什么
  • 哪个网站找人做网页比较好制作网站要找什么公司
  • b2c商城是什么意思企业seo自助建站系统
  • qq是腾讯的吗win7优化大师官方网站
  • 做外贸翻译用那个网站网络促销方案
  • 长安做网站价格深圳最新通告今天
  • 贵阳疫情防控最新政策抖音seo软件
  • 黄山网站建设推荐河南网络推广那家好
  • 什么网站可以做饼图app数据分析软件
  • 郑州网站关键字优化营销公司
  • 坪山商城网站建设哪家公司靠谱口碑营销的形式
  • 网站建设 深圳怎么根据视频链接找到网址
  • 宝安区做网站网站技术解决方案
  • 网站开发界面图标设计吴江seo网站优化软件
  • 鞍山网站建设公司网站子域名查询
  • 隆尧企业做网站优秀网站设计网站
  • 做毕业设计的参考文献网站友点企业网站管理系统
  • 凡客网站做SEO能被收录吗标题关键词优化报价
  • 旅游网站排名全球信息流优化师培训机构
  • 广东深圳手机号码南昌seo网站排名
  • 杭州知名网站建设百度开户要多少钱
  • 义乌网站建设联系方式google 优化推广
  • 彩票走势图网站是用什么程序做的微商软文范例
  • bing 网站管理员网络营销策略案例分析
  • 网站建设客户需求分析表今日国内新闻头条
  • 自己如何做公司网站视频郑州seo外包顾问
  • 海外模板网站有哪些网店怎么运营和推广