springboot--helloworld

 时间:2024-10-14 02:44:10

本文完成一个简单的 Web 应用,输出“ Hello World”。例子基于己经安装好的环境只需要 IDK8 、 Ec l ipse,还有 Maven

工具/原料

eclipse

maven

jdk1.8

1、创建maven工程

1、在eclipse的package explore中右键-->new -->other --> maven --> 罪焐芡拂maven project, 弹出一个面板,选中create a simple project后单机next,

springboot--helloworldspringboot--helloworld

2、添加如下图中内容,使之成为一个spring boot 应用因为搭建的是web应用,所以需要添加spring-boot-starter-web依赖

springboot--helloworld

3、实现helloworld

1、如图中所示,创建两个文件,分别是Ch1Application.java和HelloWorldController.java文件

springboot--helloworldspringboot--helloworld

4、浏览器中输入url: http://127.0.0.1:8080/say.html,成功

springboot--helloworld
  • SpringBoot1-第一个HelloWorld
  • springboot项目(一)创建springboot+mybatis
  • Spring Boot系列之jdbc
  • 为什么需要springboot
  • spring学习(2)-spring项目的第一个helloworld
  • 热门搜索
    上海市商贸旅游 青岛旅游景点地图 南京免费旅游景点 河北承德旅游景点 甘南旅游景点大全 新疆旅游官方网 西安旅游论坛 军都旅游度假村 去厦门旅游要带什么 张家界旅游预订