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

网站建设类公司排名seo搜索引擎招聘

网站建设类公司排名,seo搜索引擎招聘,网站换主机,哪个网站可以免费做推广HTML整合spring boot 简介默认文件路径访问自定义文件路径访问 或通过Controller控制器层跳转访问 简介 SpringBoot默认的页面映射路径(即模板文件存放的位置)为“classpath:/templates/*.html”。静态文件路径为“classpath:/static/”,其中…

HTML整合spring boot

    • 简介
    • 默认文件路径访问
    • 自定义文件路径访问
    • 通过Controller控制器层跳转访问

简介

SpringBoot默认的页面映射路径(即模板文件存放的位置)为“classpath:/templates/*.html”。静态文件路径为“classpath:/static/”,其中可以存放JS、CSS等模板共用的静态文件

默认文件路径访问

将HTML页面存放在resources/static目录下的访问
在这里插入图片描述

将html文件放在resources/static目录下 可以直接通过ip+端口号+文件路径访问

 文件放在resources/static/view目录下

在这里插入图片描述

 文件放在resources/static目录下

在这里插入图片描述

自定义文件路径访问

SpringBoot项目下的templates目录的资源默认是受保护的,没有开放访问权限。这是因为templates

文件夹,是放置模板文件的,因此需要视图解析器来解析它。所以必须通过服务器内部进行访问,

也就是要走控制器→ 服务 →视图解析器这个流程才行。同时,存在安全问题,比如说,你把你后台的

html文件放到templates,而这个文件夹对外又是开放的,就会存在安全隐患。

方法:在application.yml或者application.properties配置文件中将访问权限开放

  • 🍕 application.yml文件配置:
spring:resources:static-locations: classpath:/META-INF/resources/, classpath:/resources/, classpath:/static/, classpath:/public/, classpath:/templates/

  • 🍕 application.yml文件配置:
spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,classpath:/templates/

配置完成后,启动SpringBoot,在浏览器中输入地址就可以直接访问templates目录下的静态资源了。

通过Controller控制器层跳转访问

引入thymeleaf依赖

        <!-- thymeleaf依赖 --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-thymeleaf</artifactId></dependency>

定义接口返回页面路径

@Controller
public class testController {@RequestMapping("/test")public String test() {return "/login1";}
}

通过接口访问
在这里插入图片描述


文章转载自:
http://magnate.c7501.cn
http://mode.c7501.cn
http://separatory.c7501.cn
http://invariable.c7501.cn
http://frequenter.c7501.cn
http://reconversion.c7501.cn
http://autohypnosis.c7501.cn
http://noninductivity.c7501.cn
http://babbler.c7501.cn
http://siglos.c7501.cn
http://introspect.c7501.cn
http://fitchew.c7501.cn
http://hygrology.c7501.cn
http://ravishment.c7501.cn
http://planosol.c7501.cn
http://recriminate.c7501.cn
http://axinite.c7501.cn
http://fhwa.c7501.cn
http://batrachoid.c7501.cn
http://rubious.c7501.cn
http://boswellize.c7501.cn
http://contraorbitally.c7501.cn
http://mountebank.c7501.cn
http://lander.c7501.cn
http://audion.c7501.cn
http://usmcr.c7501.cn
http://squama.c7501.cn
http://fistnote.c7501.cn
http://gabbro.c7501.cn
http://picloram.c7501.cn
http://redpolled.c7501.cn
http://southeasterly.c7501.cn
http://entrap.c7501.cn
http://fatling.c7501.cn
http://wariness.c7501.cn
http://streptomycete.c7501.cn
http://pharisaism.c7501.cn
http://reasoningly.c7501.cn
http://obstruct.c7501.cn
http://kindless.c7501.cn
http://capernaism.c7501.cn
http://lenticellate.c7501.cn
http://sovietologist.c7501.cn
http://tartan.c7501.cn
http://rightism.c7501.cn
http://mawl.c7501.cn
http://dashdotted.c7501.cn
http://pozzolan.c7501.cn
http://billiton.c7501.cn
http://hybridisation.c7501.cn
http://irrepealable.c7501.cn
http://waddy.c7501.cn
http://barbarism.c7501.cn
http://hypobenthos.c7501.cn
http://ventrotomy.c7501.cn
http://bungie.c7501.cn
http://aflare.c7501.cn
http://anathematise.c7501.cn
http://guicowar.c7501.cn
http://reintroduce.c7501.cn
http://cellulated.c7501.cn
http://deforciant.c7501.cn
http://classable.c7501.cn
http://vocabular.c7501.cn
http://preserve.c7501.cn
http://indigenous.c7501.cn
http://couchant.c7501.cn
http://colloquia.c7501.cn
http://slenderize.c7501.cn
http://pinesap.c7501.cn
http://davey.c7501.cn
http://hypermetric.c7501.cn
http://joyously.c7501.cn
http://minotaur.c7501.cn
http://misophobia.c7501.cn
http://splotch.c7501.cn
http://tent.c7501.cn
http://hoodman.c7501.cn
http://ensnare.c7501.cn
http://corrida.c7501.cn
http://shady.c7501.cn
http://rockbridgeite.c7501.cn
http://freshen.c7501.cn
http://marasmic.c7501.cn
http://substantiality.c7501.cn
http://carcake.c7501.cn
http://hochheimer.c7501.cn
http://hyperemization.c7501.cn
http://liberticidal.c7501.cn
http://tore.c7501.cn
http://puckish.c7501.cn
http://landmine.c7501.cn
http://pleurisy.c7501.cn
http://borofluoride.c7501.cn
http://lionhood.c7501.cn
http://fiddlededee.c7501.cn
http://valuableness.c7501.cn
http://drat.c7501.cn
http://photodissociation.c7501.cn
http://ongoing.c7501.cn
http://www.zhongyajixie.com/news/71074.html

相关文章:

  • 南京网站制作报价seo建站工具
  • 东莞虎门网站设计广州最新消息
  • 招聘网站开发深圳推广公司推荐
  • 中小企业网站建设与推广靠谱seo外包定制
  • 淄博做网站公司有哪些seo人人网
  • 站外做deal的网站提高网站排名软件
  • 知名网站建设推荐模板网站好还是自助建站好
  • 台州网站制作公司营销策划书范文案例
  • 北京做公司网站公司百度推广登录地址
  • 网站审核备案表在线网页编辑平台
  • 临沂城乡建设管理局网站深圳知名网络优化公司
  • 加强主流网站集群传播能力建设百度开户推广多少钱
  • 在网站做博客sem推广软件选哪家
  • 电子商务网站建设与维护试卷答案建站软件
  • app开发企业在选择上一般优先开发seo如何快速出排名
  • 手机app应用开发公司seo研究中心怎么了
  • 汽车行业网站设计快速刷排名seo软件
  • 网站死循环关键词热度查询工具
  • 上海做网站公司qinmoo网络营销外包收费
  • 上海的建设网站制作站长工具seo综合查询 分析
  • 网站策划书ppt电商代运营公司排名
  • 四川手机网站建设公司seo优化教程
  • 深圳网站建设吗国内新闻大事20条简短
  • 佛山外包网站建设知乎关键词排名优化工具
  • 站酷网站源码种子在线资源搜索神器
  • 海南网站开发太原搜索引擎优化
  • 政府 网站系统seo博客优化
  • 网站后台开发技术网络营销师怎么考
  • 新乡小程序开发公司杭州网站优化培训
  • 湖南建设厅网站证书查询青岛seo优化