OR博客
OrdinaryRoad升级到2.0.0记录
OrdinaryRoad
创建于:2024-06-13 15:57:31
上海
0
5
20
0
## 通用配置修改 ### redis 增加前缀`data` 旧版: ```yaml spring: redis: ... ``` 新版: ```yaml spring: data: redis: ... ``` ## 路径匹配修改 > {"code":901,"msg":"No more pattern data allowed after {*...} or ** pattern element","success":false} ### SaToken配置 ``` /** 改为 /* ``` ## 自动注入文件修改 ``` SpringBoot3.0新特性:1、spring.factories文件废弃,自动配置包位置变化 2、Spring Native 快速体验 3、jakata api迁移 3、三方库的支持 ``` https://blog.csdn.net/wang121213145/article/details/131008257 ## RequestParam https://blog.csdn.net/qq_20280007/article/details/137818969 ## OpenFeign弃用,改为RestClient(Servlet)、WebClient(Reactor) 参考 `OAuth2RegisteredClientController` https://blog.csdn.net/weixin_42073629/article/details/107076213 ## Knife4j升级 - https://gitee.com/xiaoym/knife4j/issues/I986E2 - [OpenAPI 3 Library for spring-boot (springdoc.org)](https://springdoc.org/#migrating-from-springfox) - [Spring Cloud Gateway网关聚合 | Knife4j (xiaominfo.com)](https://doc.xiaominfo.com/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction) - [Spring Cloud Gateway网关下的文档聚合?就用它了 | Knife4j (xiaominfo.com)](https://doc.xiaominfo.com/docs/blog/gateway/knife4j-gateway-introduce) ### 微服务 ```xml <dependency> <groupId>com.github.xiaoymin</groupId> <artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId> </dependency> ``` ### 网关 ```xml <dependency> <groupId>com.github.xiaoymin</groupId> <artifactId>knife4j-gateway-spring-boot-starter</artifactId> </dependency> ``` - 需要增加配置 ```yaml #knife4j knife4j: gateway: enabled: true strategy: discover discover: enabled: true version: openapi3 # excluded-services: # - ordinaryroad-gateway oas3: url: /v3/api-docs/default ``` ## TODO 项目结构优化
评论