解决updateByExample时属性值异常的问题(部分属性值没有使用占位符?进行占位,而是变成了属性的名称)

news2024/11/15 13:39:33

目录

    • 场景简介
    • 代码片断
      • 实体类
    • 报错信息
    • 排查
    • 原因
    • 解决
      • 测试过程
      • 解决方案


场景简介

1、程序将mybatis框架升级为3.5.9版本后执行updateByExample方法时报错


代码片断

Condition condition = new Condition(MbCcsSessionConfig.class);
condition.createCriteria().andEqualTo("vdnId", SecurityAuthenUtil.getVdnId());
int row = mbCcsSessionConfigService.updateByExample(param, condition);

实体类

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "t_mb_ccs_session_config")
public class MbCcsSessionConfig  {
	
	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(name = "vdnId")
	private Integer vdnId;
	
	@Column(name = "sessionExceptionOverTime")
	private Integer sessionExceptionOverTime = 10;
	
	@Column(name = "sessionExceptionAgentOverTime")
	private Integer sessionExceptionAgentOverTime = 30;
	
	@Column(name = "sessionExceptionOpenOverTime")
	private Integer sessionExceptionOpenOverTime = 20;
	
	@Column(name = "sessionNoStaffOverTime")
	private Integer sessionNoStaffOverTime = 5;
	
	@Column(name = "leaveSessionOverTime")
	private Integer leaveSessionOverTime = 50;
	
	@Column(name = "leaveAgentOverTime")
	private Integer leaveAgentOverTime = 3;
	
	@Column(name = "sessionQueueOverTime")
	private Integer sessionQueueOverTime = 60;
	
	@Column(name = "lastUpdateOper")
	private String lastUpdateOper;
	
	@Column(name = "lastUpdateDate")
	private Date lastUpdateDate;
	
	@Column(name = "leaveSessionAgentOverTime")
	private Integer leaveSessionAgentOverTime;

}

报错信息

2024-05-22 17:37:20.999 - [DEBUG] - [http-nio-8966-exec-10] - [c.f.m.a.MbCcsSessionConfigMapper.updateByExample - line:137]: ==> Preparing: UPDATE t_mb_ccs_session_config SET vdnId = vdnId,sessionExceptionOverTime = ?,sessionExceptionAgentOverTime = ?,sessionExceptionOpenOverTime = ?,sessionNoStaffOverTime = ?,leaveSessionOverTime = ?,leaveAgentOverTime = ?,sessionQueueOverTime = ?,lastUpdateOper = ?,lastUpdateDate = ?,leaveSessionAgentOverTime = ? WHERE ( ( vdnId = ? ) )
2024-05-22 17:37:21.004 - [DEBUG] - [http-nio-8966-exec-10] - [c.f.m.a.MbCcsSessionConfigMapper.updateByExample - line:137]: ==> Parameters: 0(Integer), 0(Integer), 0(Integer), 0(Integer), 0(Integer), 0(Integer), 0(Integer), 1(String), 2024-05-22 17:36:42.597(Timestamp), -1(Integer), 1(Integer)
nested exception is org.apache.ibatis.exceptions.PersistenceException: 
### Error updating database.  Cause: org.apache.shardingsphere.underlying.common.exception.ShardingSphereException: Can not update sharding key, logic table: [t_mb_ccs_session_config], column: [org.apache.shardingsphere.sql.parser.sql.segment.dml.assignment.AssignmentSegment@8348217].
### The error may exist in com/xxx/mapper/admin/MbCcsSessionConfigMapper.java (best guess)
### The error may involve com.xxx.mapper.admin.MbCcsSessionConfigMapper.updateByExample-Inline
### The error occurred while setting parameters
### SQL: UPDATE t_mb_ccs_session_config  SET vdnId = vdnId,sessionExceptionOverTime = ?,sessionExceptionAgentOverTime = ?,sessionExceptionOpenOverTime = ?,sessionNoStaffOverTime = ?,leaveSessionOverTime = ?,leaveAgentOverTime = ?,sessionQueueOverTime = ?,lastUpdateOper = ?,lastUpdateDate = ?,leaveSessionAgentOverTime = ? WHERE (       (  vdnId = ? ) )
### Cause: org.apache.shardingsphere.underlying.common.exception.ShardingSphereException: Can not update sharding key, logic table: [t_mb_ccs_session_config], column: [org.apache.shardingsphere.sql.parser.sql.segment.dml.assignment.AssignmentSegment@8348217].
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 
### Error updating database.  Cause: org.apache.shardingsphere.underlying.common.exception.ShardingSphereException: Can not update sharding key, logic table: [t_mb_ccs_session_config], column: [org.apache.shardingsphere.sql.parser.sql.segment.dml.assignment.AssignmentSegment@8348217].
### The error may exist in com/xxx/mapper/admin/MbCcsSessionConfigMapper.java (best guess)
### The error may involve com.xxx.mapper.admin.MbCcsSessionConfigMapper.updateByExample-Inline
### The error occurred while setting parameters
### SQL: UPDATE t_mb_ccs_session_config  SET vdnId = vdnId,sessionExceptionOverTime = ?,sessionExceptionAgentOverTime = ?,sessionExceptionOpenOverTime = ?,sessionNoStaffOverTime = ?,leaveSessionOverTime = ?,leaveAgentOverTime = ?,sessionQueueOverTime = ?,lastUpdateOper = ?,lastUpdateDate = ?,leaveSessionAgentOverTime = ? WHERE (       (  vdnId = ? ) )
### Cause: org.apache.shardingsphere.underlying.common.exception.ShardingSphereException: Can not update sharding key, logic table: [t_mb_ccs_session_config], column: [org.apache.shardingsphere.sql.parser.sql.segment.dml.assignment.AssignmentSegment@8348217].
	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:96)
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)
	at com.sun.proxy.$Proxy119.update(Unknown Source)
	at org.mybatis.spring.SqlSessionTemplate.update(SqlSessionTemplate.java:288)
	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:67)
	at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145)
	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86)
	at com.sun.proxy.$Proxy246.updateByExample(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:241)
	at com.sun.proxy.$Proxy247.updateByExample(Unknown Source)
	at com.xxx.base.service.impl.BaseServiceImpl.updateByExample(BaseServiceImpl.java:59)
	at com.xxx.controller.admin.sysmanager.SysConfigController.saveCcsSessionConfigInfo(SysConfigController.java:261)
	at com.xxx.controller.admin.sysmanager.SysConfigController$$FastClassBySpringCGLIB$$c230b3da.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:792)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
	at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:57)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:707)
	at com.xxx.controller.admin.sysmanager.SysConfigController$$EnhancerBySpringCGLIB$$3454dab7.saveCcsSessionConfigInfo(<generated>)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1072)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:965)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:337)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at com.xxx.power.jwt.a.doFilterInternal(JwtAuthenticationTokenFilter.java:212)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:112)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:82)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:221)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:186)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:126)
	at org.springframework.boot.web.servlet.support.ErrorPageFilter.access$000(ErrorPageFilter.java:64)
	at org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:101)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:119)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:698)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:367)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:639)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:882)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1647)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:750)

排查

查看报错信息,发现打印出来的SQL有问题,update的部分属性值没有使用占位符?进行占位,而是变成了属性的名称

问题就出现在vdnId = vdnId,update时,属性值应该像后边的sessionExceptionOverTime 等属性一样,使用?进行占位的,这里却没有

UPDATE t_mb_ccs_session_config SET vdnId = vdnId,sessionExceptionOverTime = ?,sessionExceptionAgentOverTime = ?,sessionExceptionOpenOverTime = ?,sessionNoStaffOverTime = ?,leaveSessionOverTime = ?,leaveAgentOverTime = ?,sessionQueueOverTime = ?,lastUpdateOper = ?,lastUpdateDate = ?,leaveSessionAgentOverTime = ? WHERE ( ( vdnId = ? ) )

原因

应该是mybatis框架3.5.9版本有与之前的版本有差异导致


解决

测试过程

为什么只有vdnId这个属性有异常,而其他属性却是正常的?

猜测:vdnId是主键,并且存在@Id注解

如果存在@Id注解的字段都不能参与update?那这个版本的mybatis框架还有使用的价值吗?

– 测试一:执行其他业务的updateByExample方法

在这里插入图片描述

结果:updateByExample执行正常


经过前面的测试,update存在多个条件时,就算更新的字段包含了@Id注解的主键,SQL依旧是正常的

– 测试二:为原本执行报错的update逻辑多加一个条件

在这里插入图片描述

结果:updateByExample执行正常


经过测试,发现在update条件只有主键ID的时候SQL才会出现错误


解决方案

– 解决方法一:vdnId字段不参与update

在这里插入图片描述

结果:updateByExample执行正常


– 解决方法二:既然想仅仅根据主键ID进行update,那么可以保留@Id主键,并且使用updateByPrimaryKey方法

在这里插入图片描述

结果:updateByExample执行正常


– 解决方法三:主键ID字段去除@Id注解(不推荐!!!去掉@Id注解会影响到xxxByPrimaryKey等方法的使用)

在这里插入图片描述

结果:updateByExample执行正常

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1685592.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

[STM32-HAL库]Flash库-HAL库-复杂数据读写-STM32CUBEMX开发-HAL库开发系列-主控STM32F103C6T6

目录 一、前言 二、实现步骤 1.STM32CUBEMX配置 2.导入Flash库 3.分析地址范围 4.找到可用的地址 5.写入读取普通数据 6.写入读取字符串 6.1 存储相关信息 6.2 存取多个参数 三、总结及源码 一、前言 在面对需要持久化存储的数据时&#xff0c;除了挂载TF卡&#xff0c;我们…

【线段图案】

描述 KiKi学习了循环&#xff0c;BoBo老师给他出了一系列打印图案的练习&#xff0c;该任务是打印用“*”组成的线段图案。 输入描述&#xff1a; 多组输入&#xff0c;一个整数&#xff08;1~100&#xff09;&#xff0c;表示线段长度&#xff0c;即“*”的数量。 输出描述…

.NET Core Web Api Swagger运行异常

遇到的问题 因为新增了一个控制器方法&#xff0c;从而导致在运行Swagger的时候直接报错&#xff0c;异常如下&#xff1a; SwaggerGeneratorException: Conflicting method/path combination "POST api/UserOperationExample" for actions - WebApi.Controllers.Us…

HCIP-Datacom-ARST自选题库__MPLS简答【4道题】

1.如图所示&#xff0c;R1、R2、R3、R4处于同一个MPLS域&#xff0c;且设备之间采用LDP分配MPLS标签&#xff0c;R4为4.4.4.0/24这条FEC的EgressLSR。若想实现R1访问4.4.4.0/24时&#xff0c;R4不需要查询标签表但能够了解该数据的转发优先级&#xff0c;则R3对于该FEC的出标签…

Linux中vim的基本使用

目录 vim中的三种模式以及基本操作命令模式(默认模式)插入模式底行模式 命令模式下的命令底行模式下的命令 vim是Linux和Unix环境下最基本的文本编辑器&#xff0c;类似于windows上的记事本 vim和Visual studio相比&#xff0c;vim并不集成&#xff0c;vim只能用来写代码 VS把写…

第六节 自动装配源码理解

tips&#xff1a;不同版本代码实现有差异。 前面两章了解的流程&#xff0c;就是 SpringBoot 自动转配的核心。 一、自动装配 1.1 什么是 SpringBoot 自动装配? 自动装配是 Spring 框架用来减少配置的显式需求而引入的一个特性&#xff0c;该特性通过 Autowired或者Resource…

Unity Terrain Adjust插件使用教程

一、Terrain Adjust插件介绍 二、插件下载以及导入 1、官方下载地址&#xff1a;Terrain Adjust 2、积分下载地址&#xff1a;Terrain Adjust 下载好之后&#xff0c;回到Unity当中&#xff0c;导入下载好之后的unitypackage包 三、插件使用 1、在使用之前一定要在场景中新…

KuberSphere 安装kubernates

准备机器 最少3台机器 centos Linux 内核&#xff1a;官方建议 3.10 以上 uname -rcontrol 一台 配置 2c 4g worker 二台 配置 2c 4g 3台设备需要用不同的hostname&#xff0c;需要提前修改 hostnamectl set-hostname <新的主机名> # 修改后执行一下命令刷新一下 su -…

【Android】联系人列表补充

真布局--叠起来垂直管 效果展示 部分代码&#xff08;在activity_main&#xff09;里面 <FrameLayout xmlns:android"http://schemas.android.com/apk/res/android"android:layout_width"match_parent"android:layout_height"match_parent"…

自动驾驶决策规划——坐标转换

以下内容来自b站up主忠厚老实的老王&#xff0c;视频链接&#xff1a;自动驾驶决策规划算法序章 总纲与大致目录_哔哩哔哩_bilibilihttps://www.bilibili.com/video/BV1hP4y1p7es/?spm_id_from333.999.0.0&vd_sourced36e625f376908cfa88ef5ecf2fb0ed8侵删。 决策规划算法…

解除网页禁止选择

控制台输入以下命令 复制&#xff1a;javascript:void(document.body.οncοpy) 可选&#xff1a;javascript:void(document.body.onselectstart) 拖拉&#xff1a;javascript:void(document.body.οnmοuseup)

SecureFX 9.5.2 SecureCRT 9.5.2 官方下载

SecureCRT是一款由VanDyke Software公司开发的终端仿真软件&#xff0c;它提供了类似于Telnet和SSH等协议的远程访问功能。SecureCRT专门为网络管理员、系统管理员和其他需要保密访问网络设备的用户设计。 SecureCRT具有以下特点&#xff1a; 安全性&#xff1a;SecureCRT支持…

什么是安全左移如何实现安全左移

文章目录 一、传统软件开发面临的安全挑战二、什么是安全左移四、安全左移与安全开发生命周期&#xff08;SDL&#xff09;三、安全左移对开发的挑战五、从DevOps到DevSecOps六、SDL与DevSecOps 一、传统软件开发面临的安全挑战 传统软件开发面临的安全挑战主要包括以下几个方…

Stanford-Coursera 算法Week1 笔记

题外话&#xff1a;全文免费放心食用&#xff0c;作者在此求个 三连关注 1. Integer Multiplication&#xff08;引入&#xff09; &#xff08;很小的时候我们就学过&#xff1a;两个数字相乘的算法——将输入(两个数字)转换为输出(它们的乘积)的一组定义良好的规则&#xf…

MVSnet 代码详解(pytorch)

大致过一下MVSnet 论文中核心的点对应代码应该怎么写。 forward 函数需要 照片&#xff0c;映射矩阵&#xff0c;以及深度值。 照片的shape是 &#xff08;1&#xff0c;5,3&#xff0c;1184,1600&#xff09;代表着1个batch,5张图片&#xff0c;然后一次是每张图片的channel和…

LeetCode547省份数量

题目描述 有 n 个城市&#xff0c;其中一些彼此相连&#xff0c;另一些没有相连。如果城市 a 与城市 b 直接相连&#xff0c;且城市 b 与城市 c 直接相连&#xff0c;那么城市 a 与城市 c 间接相连。省份 是一组直接或间接相连的城市&#xff0c;组内不含其他没有相连的城市。给…

彩色进度条(C语言版本)

.h文件 #include<stdio.h> #include<windows.h>#define NUM 101 #define LOAD_UP 50 #define LOAD_DOWN 60 #define SLEEP_SLOW 300 #define SLEEP_FAST 70 版本1&#xff1a;&#xff08;初始版&#xff09; //v1 #include "progress.h" int main() …

使用 Sonatype Nexus Repository Manager 如何安装npm.md

1. 安装与启动 Nexus2. 登录 Nexus Web UI3. 创建 npm 仓库4. &#xff08;可选&#xff09;配置 npm 代理仓库5. 创建 npm 仓库组6. 配置 npm 客户端7. 测试和使用 Sonatype Nexus Repository Manager (通常简称 Nexus) 是一个强大的二进制管理系统&#xff0c;用于存储和管理…

北京大学肖臻老师《区块链技术与应用》P20(挖矿难度调整)和P21(权益证明)

1️⃣ 参考 北京大学肖臻老师《区块链技术与应用》 P20 - ETH挖矿难度调整篇P21 - ETH权益证明篇 2️⃣0️⃣ ETH挖矿难度调整 在ETH中最长合法链也是最难合法链&#xff08;Total Difficulty&#xff09; 比特币与以太坊难度的宏观比较 比特币以太坊调整难度隔2016个区块…

LiveGBS流媒体平台GB/T28181用户手册-版本信息:查看机器码、切换查看流媒体服务

LiveGBS流媒体平台GB/T28181用户手册--版本信息:查看机器码、切换查看流媒体服务 1、版本信息1.1、查看机器码1.2、多个流媒体服务1.3、提交激活 2、搭建GB28181视频直播平台 1、版本信息 版本信息页面&#xff0c;可以查看到信令服务 流媒体服务相关信息&#xff0c;包含硬件…