创建Spring Boot 工程
先在eclipse中安装spring -tool -suite插件,然后根据以下步骤可以创建
1、新建Spring Starter Project
2、Packaging 选择 jar
3、勾选Web 项
4、项目结构
启动项目
1、创建 HelloController.java
package com.example.demo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/hello")
public class HelloController {
@RequestMapping("/sts")
public String helloworld(){
return "使用spring-tool-suite插件";
}
}
2、运行 DemoApplication.java文件 或者 右键项目 Run As -> Spring Boot App
3、打印输出:Started DemoApplication in 3.977 seconds (JVM running for 6.73) 说明项目启动成功。
4、访问网页
创建Spring Boot 工程的更多相关文章
- Ubuntu下使用VS Code创建Spring Boot工程
目的 我们将在Ubuntu桌面系统下,使用VS Code(Visual Studio Code)编辑器从零开始创建一个Spring Boot工程,并实现一个简单的RESTful风格接口.使用这套流程的 ...
- MAC系统下用Idea创建spring boot工程 基于maven
1.创建项目 打开idea编辑器,选择file -> new -> project 点击next 依次填入group,artifact 填写完成之后再点击“next” 根据自己的需求在最 ...
- Spring Boot2 系列教程(二)创建 Spring Boot 项目的三种方式
我最早是 2016 年底开始写 Spring Boot 相关的博客,当时使用的版本还是 1.4.x ,文章发表在 CSDN 上,阅读量最大的一篇有 43W+,如下图: 2017 年由于种种原因,就没有 ...
- Spring Boot工程发布到Docker
先聊聊闲话 搞过企业级的application运维的同仁肯定深有感触,每个application的功能交叉错杂,数据交换就让人焦头烂额(当然这和顶层业务设计有关系), 几十个application发布 ...
- Springboot(一):使用Intellij中的Spring Initializr来快速构建Spring Boot工程
使用Intellij中的Spring Initializr来快速构建Spring Boot工程 New---Project 可以看到图所示的创建功能窗口.其中Initial Service Url指向 ...
- 学习创建spring boot
一.什么是spring boot? Spring Boot是由Pivotal团队提供的全新框架,其设计目的是用来简化新Spring应用的初始搭建以及开发过程.该框架使用了特定的方式来进行配置,从而使开 ...
- IDEA 创建Spring Boot 项目
一.准备环境 配置Maven,打开设置页面File - Setting,快捷键Ctrl + Alt + S,找到Maven,默认是IDEA 自带的插件,User setting file 配置文件默认 ...
- spring boot 之 如何创建spring boot项目
创建spring boot的方式有非常多,今天我们使用maven来进行创建spring boot项目,因为maven使用的非常广泛,也很好用,很多IDE也都支持maven. 1 创建maven项目 1 ...
- Spring Boot2 系列教程(一) | 如何使用 IDEA 构建 Spring Boot 工程
微信公众号:一个优秀的废人 如有问题或建议,请后台留言,我会尽力解决你的问题. Search 前言 新年立了个 flag,好好运营这个公众号.具体来说,就是每周要写两篇文章在这个号发表.刚立的 fla ...
随机推荐
- 本站页脚HTML回顶部代码
<style type="text/css">.top { width: 50px; height: 50px; background-color: #F0F0F0; ...
- poj1065Wooden Sticks(dp——最长递减数列)
Description There is a pile of n wooden sticks. The length and weight of each stick are known in adv ...
- web开发jsp页面遇到的一系列问题
一:web总结 1.jsp页面知识点巩固 1.1字符串数字格式化转换 <%@ taglib prefix="fmt" uri="http://java.sun.co ...
- 【洛谷新手村】简单字符串 p1055 ISBN号码
p1055 ISBN号码[传送门] 算法标签什么的: 思路:直接以字符串的形式读入这一串数字,然后for循环对字符串进行处理,字符串中的数字存进数组中(如果是X,存为10):然后再根据要求判断是否是正 ...
- [51nod 1766]树上的最远点对 (树的直径+ST表求lca+线段树)
[51nod 1766]树上的最远点对 (树的直径+ST表求lca+线段树) 题面 给出一棵N个点的树,Q次询问一点编号在区间[l1,r1]内,另一点编号在区间[l2,r2]内的所有点对距离最大值.\ ...
- springcloud费话之Eureka接口调用(feign)
目录: springcloud费话之Eureka基础 springcloud费话之Eureka集群 springcloud费话之Eureka服务访问(restTemplate) springcloud ...
- npm run dev 报错:Error: Cannot find module 'webpack-cli/bin/config-yargs'
使用 npm run dev 时报错: Error: Cannot find module 'webpack-cli/bin/config-yargs' 原因是找不到webpack-cli这个包,使用 ...
- 关于vuex中的状态变量的思考???
store中存取的为整个项目的公共变量,通过设置mutation来改变他们 假设现有如下代码: const store = new Vuex.Store({ state: { userInfo:{ n ...
- raw, SOCK_RAW - Linux IPv4 raw socket.
总 览 #include <sys/socket.h> #include <netinet/in.h> raw_socket = socket(PF_INET, SOCK_RA ...
- 天启android5.1系统无法在非1650批次号的rk3288w芯片上启动
天启android5.1系统无法在非1650批次号的rk3288w芯片上启动 挂掉log,说明在rtc初始化后挂掉 [ ) HIGH! ======== [ [ [ 1.420258] [WLAN_R ...