sprintboot
文章平均质量分 65
issue是fw
19 years old, struggling in life, chasing daydreams.
展开
-
FastJson的typeReference使用场景
原文当我们需要反序列化一个mapmapmap时 public static void main(String[] args) { Map<String, Person> map = new HashMap<>(16); map.put("one", new Person("zhangsan")); map.put("two", new Person("lisi")); String jsonStr = JSON原创 2022-02-11 11:23:49 · 690 阅读 · 0 评论 -
Spring Boot 自动配置数据源及操作数据库(mybatis)
目录创建数据库数据库配置```application.properties```测试类检查是否连接成功springboot操作数据库springboot继承mybatis创建数据库CREATE DATABASE /*!32312 IF NOT EXISTS*/`lou_springboot` /*!40100 DEFAULT CHARACTER SET utf8 */;USE `lou_springboot`;DROP TABLE IF EXISTS `tb_user`;CREATE TAB原创 2021-12-19 16:45:02 · 1813 阅读 · 1 评论 -
Spring Boot 处理文件上传及映射路径
样例代码先编写一个文件上传页面/static/upload-test.html请求路径为/upload其中enctype=multipart/form-data是将文件以二进制的形式上传,这样可以实现多种类型的文件上传。<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8" /> <title>Spring Boot 文件上传测试</title&g原创 2021-12-19 15:01:29 · 1089 阅读 · 1 评论