SpringBoot3.3.0升级方案
本文介绍了由SpringBoot2升级到SpringBoot3.3.0升级方案,新版本的升级可以解决旧版本存在的部分漏洞问题。
一、jdk17下载安装
1、下载
官网下载地址
Java Archive Downloads - Java SE 17
Jdk17下载后,可不设置系统变量java_home,仅在idea的指定项目中设置即可。
2、Jdk17项目环境设置
a).File-->Settings-->Build,Execution,Deployment-->Compiler-->Java Compiler
b).File-->Project Settings-->modules
source和Dependencies均设置为jdk17
c).File-->Plateform Settings-->SDKS
d).启动类Edit Configuration-->Run/Debug Configurations
二、依赖升级
主要依赖升级和替换引入
Java17 && Spring3.3.0 && mybatis-plus3.5.6 && Spring Security6.3.0 && Swagger3 && jakarta &&maven3.6
1、Java17依赖升级
<properties><java.version>17</java.version><mybatis-plus.version>3.5.6</mybatis-plus.version><flowable.version>7.0.0</flowable.version></properties>
<build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.1</version><configuration><source>${java.version}</source><target>${java.version}</target><encoding>${project.build.sourceEncoding}</encoding></configuration></plugin></plugins>
</build>
2、SpringBoot3.3.0依赖升级
<!-- SpringBoot的依赖配置-->
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-dependencies</artifactId><version>3.3.0</version><type>pom</type><scope>import</scope>
</dependency>
3、mybatis-plus3.5.6依赖升级
<dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-boot-starter</artifactId><version>${mybatis-plus.version}</version><exclusions><exclusion><groupId>org.mybatis</groupId><artifactId>mybatis-spring</artifactId></exclusion></exclusions>
</dependency>
<dependency><groupId>org.mybatis</groupId><artifactId>mybatis-spring</artifactId><version>3.0.3</version>
</dependency>
<dependency><groupId>org.springframework</groupId><artifactId>spring-web</artifactId>
</dependency>
<dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-core</artifactId><version>3.5.6</version><scope>compile</scope>
</dependency>
4、SpringSecurity6.3.0依赖升级
<dependency><groupId>org.springframework.security</groupId><artifactId>spring-security-config</artifactId><version>6.3.0</version>
</dependency>
<dependency><groupId>org.springframework.security</groupId><artifactId>spring-security-core</artifactId><version>6.3.0</version>
</dependency>
5、Swagger.3.0依赖升级
<dependency><groupId>org.springframework</groupId><artifactId>spring-webmvc</artifactId><version>6.1.8</version>
</dependency>
<dependency><groupId>org.springdoc</groupId><artifactId>springdoc-openapi-starter-webmvc-ui</artifactId><version>2.3.0</version>
</dependency>
<dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId>
</dependency>
<!-- openAPI包,替换 Swagger 的 SpringFox -->
<dependency><groupId>org.springdoc</groupId><artifactId>springdoc-openapi-starter-webmvc-ui</artifactId><version>2.3.0</version>
</dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId>
</dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><optional>true</optional>
</dependency>
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope>
</dependency>
6、jakarta包替换
<dependency><groupId>jakarta.annotation</groupId><artifactId>jakarta.annotation-api</artifactId>
</dependency>
7、其他
<dependency><groupId>org.springframework</groupId><artifactId>spring-context-support</artifactId>
</dependency>
<dependency><groupId>org.springframework.security</groupId><artifactId>spring-security-core</artifactId>
</dependency>
<dependency><groupId>org.springframework</groupId><artifactId>spring-web</artifactId>
</dependency>
<dependency><groupId>jakarta.validation</groupId><artifactId>jakarta.validation-api</artifactId>
</dependency>
<dependency><groupId>org.apache.commons</groupId><artifactId>commons-lang3</artifactId>
</dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-annotations</artifactId>
</dependency>
<dependency><groupId>org.springframework</groupId><artifactId>spring-tx</artifactId>
</dependency>
<dependency><groupId>org.springframework</groupId><artifactId>spring-tx</artifactId>
</dependency>
版本查看:
mvn -version
java -version
三、Swagger3.0升级(OpenAPI)
1、配置文件
OpenAPIConfig.java
package com.inspur.web.core.config;import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;/*** @author: Inspur* @datetime: 2024/3/26* @desc:*/
@Configuration
public class OpenAPIConfig {@Beanpublic OpenAPI openAPI() {return new OpenAPI().info(new Info().title("接口文档标题").description("SpringBoot3 集成 Swagger3接口文档").version("v1")).externalDocs(new ExternalDocumentation().description("项目API文档").url("/"));}
}
2、使用示例
SwaggerController.java
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;
/*** @author: zjl* @datetime: 2024/3/26* @desc:*/
@Tag(name = "控制器:测试Swagger3", description = "描述:测试Swagger3")
@RestController
public class SwaggerController {@Operation(summary = "测试Swagger3注解方法Get")@Parameters({@Parameter(name = "id",description = "编码"),@Parameter(name = "headerValue",description = "header传送内容")})@ApiResponses({@ApiResponse(responseCode = "200", description = "请求成功"),@ApiResponse(responseCode = "400", description = "请求参数没填好"),@ApiResponse(responseCode = "401", description = "没有权限"),@ApiResponse(responseCode = "403", description = "禁止访问"),@ApiResponse(responseCode = "404", description = "请求路径没有或页面跳转路径不对")})@GetMapping(value = "/swagger/student")public Object getStudent(@RequestParam @Parameter(example = "2") String id,@RequestHeader @Parameter(example = "2") String headerValue){return id;}@Operation(summary = "测试Swagger3注解方法Post")@ApiResponses({@ApiResponse(responseCode = "200", description = "请求成功"),@ApiResponse(responseCode = "400", description = "请求参数没填好"),@ApiResponse(responseCode = "401", description = "没有权限"),@ApiResponse(responseCode = "403", description = "禁止访问"),@ApiResponse(responseCode = "404", description = "请求路径没有或页面跳转路径不对")})@PostMapping(value = "/swagger/student", produces = "application/json")public SwaggerApiModel updateStudent(@RequestBody SwaggerApiModel model){return model;}/*** swagger 不暴漏该 api,通过@Hidden隐藏* 但是仍然可以访问* @return*/@Hidden@GetMapping(value = "/swagger/hiddenApi")public String hiddenApi(){return "hiddenApi";}/*** swagger 暴漏该 api,没有配置@Hidden会展示* @return*/@GetMapping(value = "/swagger/noHiddenApi")public String noHiddenApi(){return "noHiddenApi";}
}
3、swagger2和swagger3主要区别
四、SpringSecurity6
1、拦截器变化
extends HandlerInterceptorAdapter
==>
implements HandlerInterceptor
自定义拦截器
implements WebMvcConfigurer
==>
extends WebMvcConfigurationSupport
跨域配置eg:ResourceConfig.java:
addAllowedOrigin ==>
addAllowedOriginPattern
@Configuration
public class ResourcesConfig implements WebMvcConfigurer
{@Bean
public CorsFilter corsFilter()
{// 设置访问源地址
// config.addAllowedOrigin("*");config.addAllowedOriginPattern("*");}}
2、过滤器变化
antMatchers ==> requestMatchers
匹配地址时 “**”==> “*”
示例:
Spring2:
public class SecurityConfig extends WebSecurityConfigurerAdapter
{@Bean
@Override
public AuthenticationManager authenticationManagerBean() throws Exception
{return super.authenticationManagerBean();
}@Override
protected void configure(HttpSecurity httpSecurity) throws Exception
{httpSecurity// CSRF禁用,因为不使用session.csrf().disable()// 认证失败处理类.exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and()// 基于token,所以不需要session.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()// 过滤请求.authorizeRequests()// 对于登录login 注册register 验证码captchaImage 允许匿名访问.antMatchers("/login","/loginApp", "/appLogin","/register", "/captchaImage","/factory/getPublicKey").anonymous().antMatchers(HttpMethod.GET,"/","/*.html","/**/*.html","/**/*.css","/**/*.js","/profile/**").permitAll().antMatchers("/common/download**").anonymous()// 除上面外的所有请求全部需要鉴权认证.anyRequest().authenticated().and().headers().frameOptions().disable();
httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler);
// 添加JWT filter
httpSecurity.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class);
// 添加CORS filter
httpSecurity.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class);
httpSecurity.addFilterBefore(corsFilter, LogoutFilter.class);}@Overrideprotected void configure(AuthenticationManagerBuilder auth) throws Exception{auth.userDetailsService(userDetailsService).passwordEncoder(bCryptPasswordEncoder());}
}/*** 强散列哈希加密实现*/
@Bean
public BCryptPasswordEncoder bCryptPasswordEncoder()
{return new BCryptPasswordEncoder();
}}
Spring3:
@Configuration
@EnableWebSecurity
@AllArgsConstructor
@EnableMethodSecurity
public class SecurityConfig
{@Bean
public AuthenticationManager authenticationManager(AuthenticationConfiguration authenticationConfiguration) throws Exception {return authenticationConfiguration.getAuthenticationManager();
}@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {http// CSRF禁用,因为不使用session.csrf().disable()// 禁用HTTP响应标头.headers().cacheControl().disable().and()// 认证失败处理类.exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and()// 基于token,所以不需要session.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()// 过滤请求.authorizeRequests()// 对于登录login 注册register 验证码captchaImage 允许匿名访问// // 对于登录login 注册register 验证码captchaImage 允许匿名访问.requestMatchers("/login","/loginApp", "/appLogin","/register", "/captchaImage","/factory/getPublicKey").anonymous().requestMatchers(HttpMethod.GET,"/","/*.html","/*/*.html","/*/*.css","/*/*.js","/profile/**").permitAll().requestMatchers("/common/download**").anonymous()// 除上面外的所有请求全部需要鉴权认证.anyRequest().authenticated().and().headers().frameOptions().disable();
// 添加Logout filter
http.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler);
// 添加JWT filter
http.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class);
// 添加CORS filter
http.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class);
http.addFilterBefore(corsFilter, LogoutFilter.class);}/*** 强散列哈希加密实现*/
@Bean
public BCryptPasswordEncoder bCryptPasswordEncoder()
{return new BCryptPasswordEncoder();
}}
五、Maven3.6
六、javax替换 Jakarta
批量替换:
javax.persistence.* -> jakarta.persistence.*
javax.validation.* -> jakarta.validation.*
javax.servlet.* -> jakarta.servlet.*
javax.annotation.* -> jakarta.annotation.*
javax.transaction.* -> jakarta.transaction.*
import javax. ==> import jakarta.
或者使用idea工具:Refactor==>Migrate
七、controller请求地址问题
对于GetMapping方法,@PathVariable(“roleId”) 需要注明变量名
public AjaxResult getInfo(@PathVariable Long roleId)
==>
public AjaxResult getInfo(@PathVariable("roleId") Long roleId)
八、配置文件修改
# swagger3spring:mvc:pathmatch:matching-strategy: ant_path_matcher# 升级后可能导致不支持Bean的注入依赖,可以在配置文件解决main:allow-circular-references: true #允许循环依赖
相关文章:
![](https://i-blog.csdnimg.cn/direct/a8f6d63474b04824a84dd28252815763.png)
SpringBoot3.3.0升级方案
本文介绍了由SpringBoot2升级到SpringBoot3.3.0升级方案,新版本的升级可以解决旧版本存在的部分漏洞问题。 一、jdk17下载安装 1、下载 官网下载地址 Java Archive Downloads - Java SE 17 Jdk17下载后,可不设置系统变量java_home,仅在id…...
![](https://i-blog.csdnimg.cn/direct/af97ef99f57140d0a15b84e3cac1ddf1.png)
用 Kotlin 编写四则运算计算器:从零开始的简单教程
人不走空 🌈个人主页:人不走空 💖系列专栏:算法专题 ⏰诗词歌赋:斯是陋室,惟吾德馨 目录 🌈个人主页:人不走空 💖系列专栏:算法专题 ⏰诗词歌…...
![](https://i-blog.csdnimg.cn/direct/186292f417e14593a1765f49db17e614.gif)
java算法day13
java算法day13 104 二叉树的最大深度111 二叉树的最小深度226 翻转二叉树101 对称二叉树100 相同的树 104 二叉树的最大深度 我最开始想到的是用层序遍历。处理每一层然后计数。思路非常的清楚。 迭代法: /*** Definition for a binary tree node.* public class…...
![](https://www.ngui.cc/images/no-images.jpg)
方便快捷传文件—搭建rsync文件传输服务器
比如我们有一个服务器,想把各个机器的文件都通过脚本传给这台机,用sftp或者直接rsync就必须输密码,肯定不行,做等效性免密又麻烦,怎么办呢,这么办! 在服务端 yum -y install rsync #编辑&…...
![](https://i-blog.csdnimg.cn/direct/4c160dee2dfa44f98ef2759ba01b86ba.png)
python调用qt编写的dll
报错:FileNotFoundError: Could not find module F:\pythonProject\MINGW\sgp4Lib.dll (or one of its dependencies). Try using the full path with constructor syntax. 只有两种情况: 1.路径不对 2.库的依赖不全 1、如果是使用了qt库的࿰…...
![](https://img-blog.csdnimg.cn/direct/61aa512eacd4495e8cae7ab871401a25.png)
SCI一区级 | Matlab实现NGO-CNN-LSTM-Mutilhead-Attention多变量时间序列预测
SCI一区级 | Matlab实现NGO-CNN-LSTM-Mutilhead-Attention多变量时间序列预测 目录 SCI一区级 | Matlab实现NGO-CNN-LSTM-Mutilhead-Attention多变量时间序列预测预测效果基本介绍程序设计参考资料 预测效果 基本介绍 1.Matlab实现NGO-CNN-LSTM-Mutilhead-Attention北方苍鹰算…...
![](https://img-blog.csdnimg.cn/img_convert/eab72e2cd47bcae16fce5923bd35c562.png)
【Redis】初识 Redis
文章目录 1 什么是 Redis2 Redis 的特点2.1 速度快2.2 可编程性2.3 可拓展性2.4 持久化2.5 主从复制2.5 高可用和分布式2.6 客户端语言多 3 Redis 使用场景3.1 实时数据存储3.2 缓存和 Session 存储3.3 消息队列 4 Redis 重大版本5 CentOS7 安装 Redis5 1 什么是 Redis Redis …...
![](https://img-blog.csdnimg.cn/f8b284a4e903400a9f74036e9221054b.jpeg#pic_center)
【PTA天梯赛】L1-003 个位数统计(15分)
作者:指针不指南吗 专栏:算法刷题 🐾或许会很慢,但是不可以停下来🐾 文章目录 题目题解总结 题目 题目链接 题解 使用string把长度达1000位的数字存起来开一个代表个位数的数组 a[11]倒序计算最后一位,…...
![](https://i-blog.csdnimg.cn/direct/e5a890ee19854232a4813303df29f801.png)
c语言位操作符相关题目之交换两个数的值
文章目录 一、题目二、方法11,思路2,代码实现 三、方法21,思路2,代码实现 四、方法31,思路2,代码实现 总结 提示:以下是本篇文章正文内容,下面案例可供参考 一、题目 实现两个变量的…...
![](https://i-blog.csdnimg.cn/direct/e32411ae37094c05a19e86fb9e027e53.png)
智能家居装修怎么布线?智能家居网络与开关插座布置
打造全屋智能家居。计划的智能家居方案以米家系列为主,智能家居联网方案以无线为主。装修前为了装备智能家居做了很多准备工作,本文深圳侨杰智能分享一个智能家居装修和布线方面的心得与实战知识。希望能对大家的装修有所帮助。 1.关于网络 如果房子比…...
![](https://i-blog.csdnimg.cn/direct/4ae4e34d8c4249e1891122ed8199c357.png)
GD32MCU最小系统构成条件
大家是否有这个疑惑:大学课程学习51的时候,老师告诉我们51的最小系统构成?那么进入32位单片机时代,gd32最小系统构成又是怎么样的呢? 1.供电电路 需要确保供电的电压电流稳定,以东方红开发版为例ÿ…...
![](https://www.ngui.cc/images/no-images.jpg)
C语言——循环结构:while、do...while、for
while循环 基本结构 C语言中的while循环是一种基本的循环控制结构,它允许程序重复执行一段代码块,直到指定的条件不再满足为止。while循环的语法结构如下: while (condition) { // 循环体 // 在这里编写要重复执行的代码 } condition …...
![](https://i-blog.csdnimg.cn/direct/d067ed0d58e04d22adc7971f05b3cd69.png)
C#实现最短路径算法
创建点集 double r 200 * 500;double width 1920;double height 1080;int col (int)(r / width);int row (int)(r / height);List<(double, double)> list1 new List<(double, double)>();for (int i 0; i < row; i){var y i * height;if (y < r){va…...
![](https://i-blog.csdnimg.cn/direct/7bc97046081548b386680340850ead2c.png)
Python函数 之 匿名函数
1.概念 匿名函数: 使用 lambda 关键字 定义的表达式,称为匿名函数. 2.语法 lambda 参数, 参数: 一行代码 # 只能实现简单的功能,只能写一行代码 # 匿名函数 一般不直接调用,作为函数的参数使用的 3.代码 4.练习 # 1, 定义匿名函数, 参数…...
![](https://www.ngui.cc/images/no-images.jpg)
深入解析 Mybatis 中 Mapper 接口的实现原理
《深入解析 Mybatis 中 Mapper 接口的实现原理》 在使用 Mybatis 进行数据库操作时,Mapper 接口扮演着重要的角色。它提供了一种简洁、类型安全的方式来与数据库进行交互。那么,Mybatis 是如何实现 Mapper 接口的呢? 一、Mybatis 简介 Myb…...
![](https://www.ngui.cc/images/no-images.jpg)
微信小程序获取用户头像
微信为了安全更改了许多API接口,属实烦人。这次带来的是微信小程序基础库3.5.0还能使用的获取用户头像方法 按键式 <view><view><button open-type"chooseAvatar" bindchooseavatar"onGetUserImage">获取用户头像</butto…...
![](https://www.ngui.cc/images/no-images.jpg)
uniapp小程序连接蓝牙设备
uniapp小程序连接蓝牙设备 一、初始化蓝牙模块二、开始搜索三、连接蓝牙四、监听特征值变化五、调用示例utils.js文件 一、初始化蓝牙模块 这一步是必须的,在开发项目过程中,初始化蓝牙模块之后,紧接着就要开启一些监听的api,供后…...
![](https://i-blog.csdnimg.cn/direct/9f81bbabbbde464480991fa354d92a9d.jpeg)
AI大模型推理过程与优化技术深度剖析
在人工智能的浩瀚星空中,AI大模型以其卓越的性能和广泛的应用前景,成为了推动技术进步的璀璨明星。本文旨在深入探讨AI大模型的推理过程及其背后的优化技术,为理解这一复杂而精妙的技术体系提供一个清晰的视角。 一、AI大模型的推理过程揭秘 …...
![](https://www.ngui.cc/images/no-images.jpg)
Dubbo 核心概念介绍
Dubbo 是一款阿里巴巴开源的高性能 RPC(远程过程调用)框架,广泛应用于微服务架构中。它主要解决服务治理、负载均衡、故障转移等分布式系统问题。本文将介绍 Dubbo 的核心概念,包括服务提供者(Provider)、服…...
![](https://i-blog.csdnimg.cn/direct/2d2cb06ee0b34e0ebba19115ddada3ca.png)
练习 6.7:⼈们 在为练习 6.1 编写的程序中,再创建两个表⽰⼈的字典,然后将这三个字典都存储在⼀个名为 people 的列表中。
练习 6.7:⼈们 在为练习 6.1 编写的程序中,再创建两个表⽰⼈的字典,然后将这三个字典都存储在⼀个名为 people 的列表中。 要求 遍历这个列表,将其中每个⼈的所有信息都打印出来。 代码 human {shuicc: {first_name: shui,la…...
![](https://img-blog.csdnimg.cn/img_convert/0d6ebfed4d48a46338a720a2bc6d7548.png)
星环科技知识平台TKH:引领企业构建高效AI基础设施,加速数智化转型新纪元
5月30-31日,2024向星力未来数据技术峰会期间,星环科技正式发布其最新人工智能基础设施产品——Transwarp Knowledge Hub星环知识平台(以下简称TKH)。该平台旨在为企业打通从人工智能基础设施建设到大数据、人工智能等研发应用的完…...
![](https://www.ngui.cc/images/no-images.jpg)
嵌入式板级支持包(BSP)80道面试题及参考答案(3万字长文)
目录 解释什么是通用输入输出(GPIO)接口及其在BSP中的作用。 描述SPI接口的主要特点和用途。 说明IC总线协议的工作原理。 如何在BSP中配置一个UART接口? USB设备控制器在BSP中的初始化步骤是什么? 以太网接口如何在BSP中被支持? 什么是SDIO,它在哪些场景下会被使…...
![](https://i-blog.csdnimg.cn/direct/7621a3cac991417d822da81aa5190a1d.png)
如何找回误删的文件?4个常用文件恢复方法!
对于许多用户来说,误删文件是一种常见而令人懊恼的情况。恢复误删文件的重要性在于,它可以帮助用户找回宝贵的数据,避免因数据丢失带来的各种不便和损失。 如何找回不小心删除的文件? 误删数据不知道怎么恢复,会给我…...
![](https://www.ngui.cc/images/no-images.jpg)
在大型企业级应用中,如何优化 XML 数据的存储和检索效率,以满足高并发访问需求?
在大型企业级应用中,优化XML数据的存储和检索效率可采取以下措施: 数据库选择:选择适合XML存储和查询的数据库,如Oracle、MySQL、PostgreSQL等。这些数据库提供了专门的XML存储和查询功能,能够更高效地处理XML数据。 …...
![](https://www.ngui.cc/images/no-images.jpg)
win10 A4000 下使用Xinference来进行大模型的推理测试
创建环境 conda remove --name xinference --all conda create --name xinference python3.10 conda activate xinference 安装: conda install pytorch torchvision torchaudio pytorch-cuda11.8 -c pytorch -c nvidia pip install tiktoken sentence-transformer…...
![](https://www.ngui.cc/images/no-images.jpg)
【9-2:代码规范】
算法级思想 代码规范(java) 代码规范(java) 方法参数必须一致,不要出现自动装箱拆箱操作SimpleDateFormat是线程不安全的使用equals注意空指针异常日志 事务场景中如果出现异常被捕时注意回滚不要再finally中使用retu…...
![](https://www.ngui.cc/images/no-images.jpg)
std::filesystem::current_path().generic_string()的bug
这行指令出来会出来大小写的盘符,如D 或者d,似乎随机 #include <iostream> #include <filesystem>namespace fs std::filesystem;bool arePathsSame(const fs::path& p1, const fs::path& p2) {return p1 p2; }int main() {fs::p…...
![](https://img-blog.csdnimg.cn/img_convert/b7f9bd44685928d99756d6a2c9f51b80.png)
Python excel知识库批量模糊匹配的3种方法实例(fuzzywuzzy\Gensim)
前言 当然,基于排序的模糊匹配(类似于Excel的VLOOKUP函数的模糊匹配模式)也属于模糊匹配的范畴,但那种过于简单,不是本文讨论的范畴。 本文主要讨论的是以公司名称或地址为主的字符串的模糊匹配。 使用编辑距离算法进…...
![](https://www.ngui.cc/images/no-images.jpg)
stm32使用单通道规则组ADC
Driver_ADC.c 如果需要关闭adc转换,只需要设置CNT,将其置为0,后面再转换一次就停止了。 #include "Driver_ADC.h"void Driver_ADC1_Init(void) {/* 1. 时钟配置 *//* 1.1 adc时钟 */RCC->APB2ENR | RCC_APB2ENR_ADC1EN;RCC-&g…...
![](https://www.ngui.cc/images/no-images.jpg)
[python][whl]causal-conv1d的python模块在windows上whl文件下载
【模块介绍】 causal-conv1d,即因果一维卷积(Causal 1D Convolution),是一种在深度学习特别是时序数据处理中广泛应用的卷积技术。它主要特点在于其“因果性”,即输出的每个元素仅依赖于输入序列中它之前的元素&#…...
![](https://img-blog.csdnimg.cn/4288b5d598df400b93e255637d855fb9.png)
asp网站制作设计教程/广告素材
需求:y轴刻度 最大值取接口返回的 最大值数据 方法一: data() {return {yAxisMaxNum: 49};},initChart() {// 创建 echarts 实例。this.myChartOne this.$echarts.init(this.$refs.Echart);let maxNum this.yAxisMaxNumvar option {tooltip: {trigger…...
![](/images/no-images.jpg)
网站建设 杭州市萧山区/快速seo整站优化排行
由于在外企工作,所以英语这块真的很重要,不过相对于花旗软件来说,这家外企对英语的要求低多了(花旗软件需要自己和客户做需求,自己写程序,自己为客户维护,在需求分析阶段和印度的或者是英国的客…...
![](/images/no-images.jpg)
网站建设收入的发票/网络营销案例范文
创建类的对象 类的实例化 实例化类 类和对象的使用(面向对象思想落地的实现): 1.创建类,设计类的成员 2.创建类的对象 3.通过“对象.属性”或“对象.方法”调用对象的结构 如果创建了一个类的多个对象,则每个对象…...
![](/images/no-images.jpg)
wordpress 有赞云/打开百度网址
最近想升级mesos0.23.0,结果编译mesos0.23.0需要gcc4.8,可是centOS6.6最高版本的gcc也只到4.4.7版本,只好手动升级一下了。 下载4.8.2源码 wget ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.8.2/gcc-4.8.2.tar.bz2 下载依赖(gmp-4.3.2、mpfr-2.4.2、mpc-0.8.1) /us…...
![](https://img-blog.csdnimg.cn/aa6e71fe7a334bf586f6400ab65f10b2.png)
网站 盈利/优化防疫政策
HashMap底层核心知识总结 本文结合底层对HashMap核心知识进行归纳总结!!! 一、了解数据结构中的HashMap吗?介绍下他的结构和底层原理? HashMap是由数组链表组成的数据结构(jdk1.8中是数组链表红⿊树的数…...
![](https://images2018.cnblogs.com/blog/1301126/201803/1301126-20180327005313634-1099059186.png)
网站广告弹窗代码/樱花12e56
HTTP: HTTP的两大特点:无连接无状态 无连接:每次连接只处理一个请求,服务器处理完客户端的请求,响应给客户端之后就断开本次连接(及时的释放系统资源) 无状态:每次请求完之后,服务器…...