Spring Boot (教程1:安装spring-tool-suite插件 )

xiaoxiao2021-02-28  14

Spring Boot (教程1:安装spring-tool-suite插件 )

GitHub 地址:

https://github.com/asd821300801/Spring-Boot.git


安装 spring-tool-suite 插件

官网地址:https://spring.io/tools/sts/

简介:

     Spring工具套件是一个基于Eclipse的开发环境,用于开发Spring应用程序。它提供了一个现成的使用环境来实现,调试,运行,和部署你的Spring应用程序,包括关键的TC服务器,Pivotal Cloud Foundry,Git,Maven,AspectJ集成,并在最新的Eclipse版本。 包括Spring工具套件的开发者版本的关键TC服务器,在下降的Apache Tomcat的优化弹簧。其Spring Insight控制台,TC服务器开发版提供了一个图形化的实时视图的应用程序性能指标,让开发人员识别和诊断问题,从他们的桌面。 Spring工具套件支持面向本地、虚拟和基于云的服务器的应用程序。它是免费的开发和内部业务操作使用没有时间限制,完全开源和许可下的Eclipse公共许可证条款。


1、官网下载

https://spring.io/tools/sts/


2、Eclipse市场下载:

Help->Eclicpse Marketplace


搜索 spring-tool-suite


Installed 安装……


查看是否安装成功:

Window->Preferences 1

出现Spring选项说明已经安装成功。


创建Spring Boot 工程

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插件"; } } 1234567891011121314

2、运行 DemoApplication.java文件 或者 右键项目 Run As -> Spring Boot App


3、打印输出:Started DemoApplication in 3.977 seconds (JVM running for 6.73) 说明项目启动成功。


4、访问网页

http://localhost:8080/hello/sts

文章标签:  spring-boot 插件 个人分类:  Spring Boot 所属专栏:  简单粗暴的 Spring Boot 教程
转载请注明原文地址: https://www.6miu.com/read-2799951.html

最新回复(0)