Spring Boot
xiangwang2016
这个作者很懒,什么都没留下…
展开
-
前后端date类型参数交互问题
添加如下两个注解即可:import com.fasterxml.jackson.annotation.JsonFormat;import org.springframework.format.annotation.DateTimeFormat; /** * 上线时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @DateTimeFormat(pattern.原创 2021-01-14 17:32:07 · 643 阅读 · 1 评论 -
@Value 注入 List Map
YAML 语法“ ”双引号:不会转义字符串里面的特殊字符 特殊字符会作为本身想表示的意思 name: “hello \n world”:输出;hello 换行 world‘ ’ 单引号:会转义特殊字符 特殊字符最终只是一个普通的字符串数据 name: ‘hello \n world’:输出;hello \n worldapplication.yml:test: str: https://google.c...原创 2020-06-14 21:52:31 · 1158 阅读 · 0 评论 -
SpringBoot MyBatis generator pagehelper 整合
自动代码生成项目结构预览:项目搭建:环境配置 新建项目pom.xml配置:<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apa...原创 2020-06-07 15:47:52 · 341 阅读 · 0 评论 -
Spring Boot 项目集成 Swagger 实例文档
Swagger在 Spring Boot 项目中使用 Swagger 文档原创 2020-03-21 14:26:17 · 282 阅读 · 0 评论 -
SpringBoot 读取自定义配置文件
读取配置文件my.propertiesuser.mark=jackuser.age=25user.address=北京user.work=北京,上海指标映射Bean@Component@Data//注解来自于 lombok,lombok 能够减少大量的模板代码@ConfigurationProperties(prefix = "user", ignoreUnkno...原创 2020-03-20 15:42:44 · 340 阅读 · 0 评论