从品牌网站建设到网络营销策划,从策略到执行的一站式服务
配置项目名、Java版本等
选择依赖模块,这里需要三个:
注意Spring Boot版本
项目新建完成:
(1)properties配置文件
(2)yml配置文件
(3)yaml配置文件
(1)新建controller:
package com.bone.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/books")
public class BookController {@GetMapping("/{id}")
public String get(@PathVariable Integer id){System.out.println("id==>id"+ id);
return "hello SpringBoot!!";
}
}
访问:
四、springBoot程序快速启动:
双击
打包完成后找到这个文件。
使用cmd切换到这个jar包所在的目录:
命令:java -jar .\sssm1-0.0.1-SNAPSHOT.jar
即可运行。
访问结果
你是否还在寻找稳定的海外服务器提供商?创新互联www.cdcxhl.cn海外机房具备T级流量清洗系统配攻击溯源,准确流量调度确保服务器高可用性,企业级服务器适合批量采购,新人活动首月15元起,快前往官网查看详情吧
成都网站建设公司地址:成都市青羊区太升南路288号锦天国际A座10层 建设咨询028-86922220
成都快上网科技有限公司-四川网站建设设计公司 | 蜀ICP备19037934号 Copyright 2020,ALL Rights Reserved cdkjz.cn | 成都网站建设 | © Copyright 2020版权所有.
专家团队为您提供成都网站建设,成都网站设计,成都品牌网站设计,成都营销型网站制作等服务,成都建网站就找快上网! | 成都网站建设哪家好? | 网站建设地图