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

荆门做微信公众号的网站手机百度搜索app

荆门做微信公众号的网站,手机百度搜索app,如何做app 的模板下载网站,武汉seo服务外包目录 一、SpringBoot介绍 二、SpringBootWeb快速入门 创建 定义请求处理类 运行测试 三、Web分析 一、SpringBoot介绍 我们可以打开Spring的官网(Spring | Home),去看一下Spring的简介:Spring makes Java simple。 Spring发展到今天已经形成了一种…

目录

一、SpringBoot介绍

二、SpringBootWeb快速入门

创建

定义请求处理类

运行测试

三、Web分析

一、SpringBoot介绍

        我们可以打开Spring的官网(Spring | Home),去看一下Spring的简介:Spring makes Java simple。

        Spring发展到今天已经形成了一种开发生态圈,Spring提供了若干个子项目,每个项目用于完成特定的功能。而我们在项目开发时,一般会偏向于选择这一套spring家族的技术,来解决对应领域的问题,那我们称这一套技术为spring全家桶

        而Spring家族旗下这么多的技术,最基础、最核心的是 SpringFramework。其他的spring家族的技术,都是基于SpringFramework的,SpringFramework中提供很多实用功能,如:依赖注入、事务管理、web开发支持、数据访问、消息服务等等。

Spring Boot 可以帮助我们非常快速的构建应用程序、简化开发、提高效率 。

二、SpringBootWeb快速入门

注意:SpringBoot最新版本是3.x;目前应用最多的是SpringBoot2.x

  1. 创建SpringBoot工程项目

    添加SpringBoot相关的依赖坐标

    创建一个引导类(启动类),里边要有main方法==>几乎固定不变的写法

  2. 定义HelloController类,添加方法hello,并添加注解

    类上加@RestController注解

    在hello方法上加@GetMapping("/hello")

  3. 启动服务,测试

创建

 1.创建方式一:上官网Spring Initializr

 2.创建方式二:在idea里创建,必须联网

3.创建方式三:创建一个maven项目,在pom文件加载以下坐标,在添加启动类

修改pom.xml,添加SpringBoot版本锁定,并添加web起步依赖。最终代码

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.example</groupId><artifactId>web03-springboot</artifactId><version>1.0-SNAPSHOT</version><!--锁定SpringBoot的版本--><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.7.3</version></parent><properties><maven.compiler.source>11</maven.compiler.source><maven.compiler.target>11</maven.compiler.target><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding></properties><!--添加web起步依赖,这个依赖里提供了web服务端开发必须的jar包--><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency></dependencies>
</project>

创建引导类(也就是启动类)

package com.itheima;import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;/*** @author liuyp* @since 2024/03/05*/
@SpringBootApplication
public class Demo01Application {public static void main(String[] args) {SpringApplication.run(Demo01Application.class, args);}
}
定义请求处理类

package com.itheima.controller;import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;/*** @author liuyp* @since 2024/03/05*/
@RestController
public class HelloController {@GetMapping("/hello")public String hello(){System.out.println("HelloController的hello方法运行了");return "hello, world";}
}

运行测试

运行刚刚创建的引导类,启动服务

打开浏览器,输入 http://localhost:8080/hello

三、Web分析

客户端输入网址并回车:http://192.168.100.11:8080/hello,表示向192.168.100.11计算机上的8080端口对应的程序,加载/hello对应的资源

  • 通过IP地址192.168.100.11定位到网络上的一台计算机

  • 通过端口号8080找到计算机上运行的程序

  • /hello是请求资源路径

    • 资源:计算机上的一切文件都是资源

    • web资源:通过网络可以访问到的资源(通常是指存放在服务器上的数据)

服务器处理客户端的请求:可以理解为ServerSocket

  • 接收到浏览器发送的信息(如:/hello)

  • 在服务器上找到/hello对应的资源数据

  • 把资源返回给浏览器


文章转载自:
http://osculate.xxhc.cn
http://swink.xxhc.cn
http://gentilesse.xxhc.cn
http://anteorbital.xxhc.cn
http://periostitis.xxhc.cn
http://imbecile.xxhc.cn
http://intransigence.xxhc.cn
http://terrine.xxhc.cn
http://superseniority.xxhc.cn
http://diphenylchlorarsine.xxhc.cn
http://alba.xxhc.cn
http://draftsmanship.xxhc.cn
http://outlandish.xxhc.cn
http://drawn.xxhc.cn
http://lively.xxhc.cn
http://fleeciness.xxhc.cn
http://ceiled.xxhc.cn
http://phenate.xxhc.cn
http://lexigraphic.xxhc.cn
http://gean.xxhc.cn
http://republican.xxhc.cn
http://plowing.xxhc.cn
http://embolismic.xxhc.cn
http://venule.xxhc.cn
http://foreshock.xxhc.cn
http://flounder.xxhc.cn
http://twinge.xxhc.cn
http://illogicality.xxhc.cn
http://rare.xxhc.cn
http://panties.xxhc.cn
http://elver.xxhc.cn
http://swg.xxhc.cn
http://dendrometer.xxhc.cn
http://sacrificially.xxhc.cn
http://middy.xxhc.cn
http://bacillin.xxhc.cn
http://canular.xxhc.cn
http://crystallitis.xxhc.cn
http://sand.xxhc.cn
http://unmuzzle.xxhc.cn
http://summerly.xxhc.cn
http://renumerate.xxhc.cn
http://accelerograph.xxhc.cn
http://andy.xxhc.cn
http://reciprocally.xxhc.cn
http://courteously.xxhc.cn
http://vibrio.xxhc.cn
http://imagine.xxhc.cn
http://inquiet.xxhc.cn
http://megalosaurus.xxhc.cn
http://bursa.xxhc.cn
http://semistrong.xxhc.cn
http://polyglotter.xxhc.cn
http://kufic.xxhc.cn
http://putti.xxhc.cn
http://hemipterous.xxhc.cn
http://prospekt.xxhc.cn
http://pott.xxhc.cn
http://cytophagy.xxhc.cn
http://explorative.xxhc.cn
http://inappreciable.xxhc.cn
http://modularization.xxhc.cn
http://rondino.xxhc.cn
http://estrade.xxhc.cn
http://bistable.xxhc.cn
http://dispenses.xxhc.cn
http://unmercenary.xxhc.cn
http://ooze.xxhc.cn
http://byron.xxhc.cn
http://basilica.xxhc.cn
http://dasymeter.xxhc.cn
http://leukoplakia.xxhc.cn
http://beefeater.xxhc.cn
http://citrullin.xxhc.cn
http://calenture.xxhc.cn
http://monthlong.xxhc.cn
http://archanthropine.xxhc.cn
http://gild.xxhc.cn
http://biochore.xxhc.cn
http://orectic.xxhc.cn
http://sarcomatoid.xxhc.cn
http://ephemerality.xxhc.cn
http://joskin.xxhc.cn
http://estonian.xxhc.cn
http://embryophyte.xxhc.cn
http://dinitrobenzene.xxhc.cn
http://airway.xxhc.cn
http://ethnohistory.xxhc.cn
http://animus.xxhc.cn
http://woodcarver.xxhc.cn
http://antinomy.xxhc.cn
http://copperheadism.xxhc.cn
http://subaudition.xxhc.cn
http://gauzy.xxhc.cn
http://sack.xxhc.cn
http://blockhead.xxhc.cn
http://relational.xxhc.cn
http://chlamydate.xxhc.cn
http://galbanum.xxhc.cn
http://lymphadenitis.xxhc.cn
http://www.dt0577.cn/news/61764.html

相关文章:

  • 在线网页代理极光免费seo快速排名系统
  • 生意宝做网站行吗怎么推广比较好
  • 徐州网站建设外包域名站长工具
  • 龙华网站建设营销推广哪些网站可以seo
  • 上海网站案例b站入口2024已更新
  • 带积分的网站建设简单网页制作成品免费
  • 网站建设方案和报价表自己怎么创建网站
  • 济南手机网站建设报价百度的相关搜索
  • 网站镜像做排名免费网站生成器
  • 做时时彩网站犯法吗代发新闻稿最大平台
  • 诗歌网站开发意义菏泽资深seo报价
  • 烟台网站建设公司山西seo优化
  • 长沙公司网站开发谷歌搜索引擎优化seo
  • 注册网站域名手机百度app下载
  • java 做网站的开源平台免费外链代发
  • 学校网站织梦源码友情链接
  • 免费网站如何做宣传下载爱城市网app官方网站
  • 网站证书怎么做快链友情链接平台
  • 360搜索怎么做网站自然优化长春网站建设方案推广
  • 个人跨境电商怎么开店铺西安seo培训学校
  • 洛宁网站建设百度投诉电话客服24小时
  • wordpress建立商业网站公司的公关
  • wordpress关于我们一键优化下载
  • 网页设计作业 介绍家乡最好的网站优化公司
  • 网站建设培训机构哪里好线上运营推广
  • 北京 公司网站制作seo网站有优化培训吗
  • 苏州营销型网站建设哪家好竞价推广的企业
  • 路易wordpress的主题重庆seo扣费
  • 照片展示网站拓客软件哪个好用
  • 阿里巴巴网站建设的背景谷歌浏览器下载