SpringBoot版本: 2.1.6.RELEASE
1 启动
方式1 – IntelliJ IDEA - Windows
右键启动类SpringBootSampleApplication.java > Run “SpringBootSampleApplication#main()”

方式2 – Maven – Windows
E:
cd E:ProjectsSpringBootSample
mvn clean
mvn spring-boot:run (非后台运行)
或 mvn spring-boot:run > ./Applog.log & (后台运行)

方式3 – Maven/JAR – AnyPlatform [推荐]
思路:mvn install编译生成出项目的jar,然后运行jar



方式4 - Maven/Linux Shell - Linux [未亲测]
请参见: 正确、安全地停止SpringBoot应用服务: 部署为Unix/Linux Service -博客园
2 停用
方式1 – 命令行 – AnyPlatform


方式2 – IDEA – Windows

方式3 – actuator – AnyPlatform [推荐]
利用端点管理器actuator,实现远程管理。
Actuator内容详见本文:端点管理actuator

方式4 - Maven/Linux Shell - Linux [未亲测]
请参见: 正确、安全地停止SpringBoot应用服务: 部署为Unix/Linux Service -博客园