文章目录

  • 创建springboot,打包,运行
    • 1:编写controller
    • 1:Springboot的POM.XML文件
      • 1:parent
      • 2:元数据信息
      • 3:依赖信息
      • 4:build
    • 2:maven项目打包
    • 3:运行 jar包

创建springboot,打包,运行

1:编写controller

1:Springboot的POM.XML文件

1:parent

    <parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.4.2</version><relativePath/> <!-- lookup parent from repository --></parent>
  • 继承了spring=boot-starter-parent的依赖管理,控制版本和打包的内容
  • 内容有版本号码

2:元数据信息

 <groupId>com.example</groupId><artifactId>demo</artifactId><version>0.0.1-SNAPSHOT</version><name>demo</name><description>Demo project for Spring Boot</description>
  • groupId
  • artifactId
  • version
  • name
  • descript

3:依赖信息

    <dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency>
  • webtest

4:build

    <build>
<!--        打包jar包插件--><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin></plugins></build>
  • 构建配置文件,默认使用spring-boot-maven-plugin

2:maven项目打包

  • 点开IDEA右边的maven符号
  • 点开 Lifecycle
  • 双击 package
  • 在target中就可以看到jar包

3:运行 jar包

  • 在当前的文件夹 按住shirt+鼠标右击
  • 打开powershell
  • java -jar hello
  • 然后在浏览器访问 localhost:8080/hello

1:Hello world相关推荐

  1. 大数据技术之_19_Spark学习_07_Spark 性能调优 + 数据倾斜调优 + 运行资源调优 + 程序开发调优 + Shuffle 调优 + GC 调优 + Spark 企业应用案例

    大数据技术之_19_Spark学习_07 第1章 Spark 性能优化 1.1 调优基本原则 1.1.1 基本概念和原则 1.1.2 性能监控方式 1.1.3 调优要点 1.2 数据倾斜优化 1.2. ...

  2. golang大厂面试2

    golang大厂面试 滴滴 写个二分查找 以下是一个简单的二分查找算法的 Go 语言实现: package mainimport "fmt"// 二分查找函数 func binar ...

  3. InstallShield内部库函数

    InstallShield内部库函数 下载资源:点击 1  库函数综述 InstallShield包含300多个内部库函数,用户可在安装脚本中调用它们来创建程序组,操作文件夹,处理目录,监督安装状态, ...

  4. 端口映射问题:Bad Request This combination of host and port requires TLS.

    错误信息: Bad Request This combination of host and port requires TLS. 遇到上面的错误信息:如果是通过域名访问,则该域名后配置的转发端口映射 ...

  5. locust入门:单机使用locust运行压力测试

    locust的官方文档在这里: http://docs.locust.io/en/stable/ 前置:locust的测试脚本使用为python(若未安装python环境,可以搜索安装python) ...

  6. docker报错:driver failed programming external connectivity on endpoint, iptables:No chain by that name

    docker 报错: Error response from daemon: Cannot restart container hello: driver failed programming ext ...

  7. mybatis查询报错:com.mysql.cj.exceptions.DataConversionException: Cannot determine value type from string

    mybatis查询报错: com.mysql.cj.exceptions.DataConversionException: Cannot determine value type from strin ...

  8. mongo报错:not authorized on bb to execute command { create: \“xxx\“...}

    mongo报错: {"ok" : 0,"errmsg" : "not authorized on bb to execute command { cr ...

  9. restTemplate http请求报错:no suitable HttpMessageConverter found for response type and content type

    报错信息: org.springframework.web.client.UnknownContentTypeException: Could not extract response: no sui ...

  10. 在Chrome中打开网页时出现以下问题 您的连接不是私密连接 攻击者可能会试图从 x.x.x.x 窃取您的信息(例如:密码、通讯内容或信用卡信息)

    现象:在Chrome中打开网页时出现以下问题 您的连接不是私密连接 攻击者可能会试图从 x.x.x.x 窃取您的信息(例如:密码.通讯内容或信用卡信息). 当点开"了解详情"后显示 ...

最新文章

  1. Python学习入门基础教程(learning Python)--2.3.5Python返回多个值问题
  2. Spring Boot中使用RabbitMQ
  3. 内购订单进行二次处理_独家独到飞豹FBA亚马逊退货处理,实现二次销售不是问题...
  4. Windows 10系统安装JDK1.8与配置环境
  5. c++ queue学习
  6. eigen冲突 sophus 安装_SLAM-Sophus模板库安装总结
  7. 信息学奥赛C++语言:猴子选大王
  8. Adobe Reader 2019 Offline Installer, Free Download - Best PDF Reader
  9. poj 3074 Sudoku
  10. 计算机组装检测与数据恢复,计算机检测维修与数据恢复.doc
  11. fluent-bit 本地安装及配置
  12. 地图比例尺、瓦片切片方案、EPSG
  13. 2021-09-08Cloudera Manager集群报警,堆转储目录/tmp 或日志目录/var/log 可用空间小于 5.0 吉字节
  14. 合唱队形(NOIP)
  15. php 短信验证码过期时间,php下发短信验证码60秒简单验证
  16. 芯片解密MC9S08DZ16 飞思卡尔系列芯片解密
  17. c++新技能不断get中
  18. java-Scaner和Console类对象
  19. 2026年预标准5G营收将达到2000亿美元
  20. release版本和debug版本

热门文章

  1. html 纯css 树形结构,纯css实现树形结构方法教程
  2. DNS无法解析IP_计算机网络-DNS
  3. 设置gbk_我的gVim设置
  4. 大学c语言第三章作业,华中科技大学光电子学院C语言第三章
  5. c++17(23)-typedef
  6. AI之matlab随笔(1)-数据类型,逻辑操作,数组,逻辑运算,异或,零向量或零矩阵
  7. 【NLP】如何清理文本数据?
  8. 【NLP】EMNLP'21 | 让压缩语言模型自动搜索最优结构!
  9. 【NLP】中文BERT上分新技巧,多粒度信息来帮忙
  10. 专家票选! 2020 年度 10 篇人工智能经典论文(1-5)