关于sa-token的基础使用

基础使用 @RestController @RequestMapping("/acc/") public class LoginAuthController { // 会话登录接口 ---- http://localhost:8081/acc/doLogin?name=zhang&pwd=1


关于springdoc的基础使用

简单集成 在springboot中使用springdoc起步非常容易,只需要引入其starter即可 <dependency> <groupId>org.springdoc</groupId> <artifactId>springdoc-openapi-ui</artifactId>


关于fastjson2.0基础使用

配置依赖 <dependency> <groupId>com.alibaba.fastjson2</groupId> <artifactId>fastjson2</artifactId> <version>2.0.55</version> </dependency> 新特性


关于fastjson与jackson

fastjson默认不包含空值,即当一个对象序列化为json时,其中的空值在序列化后会失去字段名 当要将拥有泛型的类反序列化时new TypeReference 不需要使用强转 添加这个序列化与反序列化都绑定了


springboot 静态资源配置

static-path-pattern 在 Spring Boot 中,spring.resources.static-path-pattern 配置项用于设置静态资源的 URL 路径模式。当访问一个静态资源时,Spring Boot 会根据这个配置来匹配请求的路径。 例如,Spring Boot


关于springboot基础配置

# 开发环境配置 server: # 服务器的HTTP端口,默认为8080 port: 8080 servlet: # 应用的访问路径 context-path: / # undertow 配置 undertow: # HTTP post内容的最大大小。当


Maven多环境配置

不考虑配置中心时,将多环境的配置就放在项目的resource目录下 配置 <profiles> <profile> <id>local&l


关于Undertow的简单使用

一是添加依赖 在Spring Boot中整合Undertow,可以通过以下步骤实现: :在pom.xml文件中添加Spring Boot Starter Undertow的依赖 <dependency> <groupId>org.springframework.boot</groupId>