springboot
有梦_咸鱼
做一条有梦想的咸鱼,爱生活,也爱这世界
展开
-
idea创建springboot项目
创建springboot项目 1、创建主题工程、选择maven 一直—next 创建每个模块: 创建成功原创 2021-01-13 21:09:15 · 84 阅读 · 0 评论 -
@RequestBody、@RequestParam和 @Pathvariable区别
@RequestBody、@RequestParam和 @Pathvariable区别 @RequestParam 是接受的参数是来自http请求体或者请求url的QueryString中 参数: @RequestParam有三个配置参数: required 表示是否必须,默认为 true,必须。 defaultValue 可设置请求参数的默认值。 value 为接收url的参数名(相当于key值)。 @Controller @RequestMapping("/pets") @SessionAttribut原创 2020-11-24 23:07:21 · 166 阅读 · 0 评论 -
springboot 项目中yml配置文件中值的获取
写入实体类 添加注解: @Component @ConfigurationProperties(prefix = “person”) 这个注解的依赖如下: @ConfigurationProperties(prefix = “person”) <!--读取配置文件--> <dependency> <groupId>org.springframework.boot</groupId> <原创 2020-10-23 11:06:07 · 1254 阅读 · 0 评论 -
如何快速构建一个springboot项目
打开IDE选择新建项目 选择好后: 成功构建springboot项目:原创 2020-10-15 11:42:09 · 101 阅读 · 0 评论