上一页 1 2 3 4 5 6 7 8 9 10 ··· 28 下一页
摘要: Thymeleaf使用 系统要求 Java 8+ springBoot2.5 + 创建springBoot项目工程 导入依赖 编写ThymeleafController package com.xiang.controller; import org.springframework.http.Htt 阅读全文
posted @ 2021-10-17 15:39 阿向向 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 关闭被占用端口 问题描述 *************************** APPLICATION FAILED TO START *************************** Description: The Tomcat connector configured to liste 阅读全文
posted @ 2021-10-16 15:35 阿向向 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 复杂参数 在map、model、modelAndView中存放数据,本质上都是在request中存放数据 controller层 package com.xiang.controller; import org.springframework.stereotype.Controller; impor 阅读全文
posted @ 2021-10-15 16:30 阿向向 阅读(246) 评论(0) 推荐(0) 编辑
摘要: @RequestAttribute 注解 @RequestAttribute 该注解可以将request中的值直接赋值给方法中的参数 controller层 package com.xiang.controller; import org.springframework.stereotype.Con 阅读全文
posted @ 2021-10-14 00:35 阿向向 阅读(6567) 评论(0) 推荐(1) 编辑
摘要: 注解使用 @PathVariable、@RequestHeader、@RequestParam、@RequestBody @RestController public class ParameterController { /** * @PathVariable:获取路径变量的注解 * restFu 阅读全文
posted @ 2021-10-13 16:52 阿向向 阅读(124) 评论(0) 推荐(0) 编辑
摘要: RESTful风格请求映射 系统要求 Java 8+ springBoot2.5 + 创建springBoot项目工程 编写HomeController类 package com.xiang.controller; import org.springframework.web.bind.annota 阅读全文
posted @ 2021-10-13 15:10 阿向向 阅读(97) 评论(0) 推荐(0) 编辑
摘要: yml文件 数据回显 系统要求 Java 8+ springBoot2.5 + 创建springBoot项目工程 配置pom.xml文件 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/PO 阅读全文
posted @ 2021-10-13 13:40 阿向向 阅读(59) 评论(0) 推荐(0) 编辑
摘要: Spring Initailizr(项目初始化向导) 选择我们需要的开发场景 自动创建项目结构 阅读全文
posted @ 2021-10-13 13:32 阿向向 阅读(75) 评论(0) 推荐(0) 编辑
摘要: @EnableConfigurationProperties + @ConfigurationProperties @EnableConfigurationProperties注解有两个功能: 1.开启参数cat的配置绑定功能 2.将参数cat自动注册到容器中,也就是说在cat的实体类中不需要加@C 阅读全文
posted @ 2021-10-12 15:56 阿向向 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 配置绑定 如何使用Java读取到properties文件中的内容,并且把它封装到JavaBean中,以供随时使用; 理解:这个过程就好比配置数据库时写了properties文件,然后我们通过java的流读取文件,然后连接数据库 @Component + @ConfigurationPropertie 阅读全文
posted @ 2021-10-12 15:55 阿向向 阅读(459) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 28 下一页