当前位置: 首页 > news >正文

Spring Boot3.3.X整合Mybatis-Plus

前提说明:

项目的springboot版本为:<version>3.3.2</version>

需要整合的mybatis-plus版本:<version>3.5.7</version>

废话不多说,开始造吧

1.准备好数据库和表

2.配置全局文件application.properties或者是application.yml(配置mapper的映射文件路径)

我这里是application.properties,配置如下:

#配置服务器端口号
server.port=9090
#连接数据库
spring.application.name=dormitory_backend
spring.datasource.url=jdbc:mysql://localhost:3306/dormitory?allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&useSSL=false
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver#mybatis-plus配置mapper文件路径
mybatis-plus.mapper-locations=classpath:/mapper/*.xml
#打印sql日志
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
logging.level.com.dormitory.dormitory_backend.mapper=DEBUG

3.启动类配置包扫描注解和路径信息

配置之前先看下我这边的包结构

启动类,造吧?找到有@SpringBootApplication注解的类就是了,在其位置加上包扫描注解@MapperScan("com.dormitory.dormitory_backend.mapper")

注意括号里面的内容需要根据自己的包结构来配置,com.dormitory.dormitory_backend是我的包结构,主要看java,实在不懂,那就任意打开一个XXXmapper.java文件,看其包结构,框起来的一整个复制粘贴上去就可以了


4.导入依赖:

无效依赖---我尝试过导入网上的各种mybatis-plus的依赖:

<dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-boot-starter</artifactId><version>3.5.1</version>
</dependency>
<dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-annotation</artifactId><version>3.5.1</version>
</dependency>
<dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-core</artifactId><version>3.5.1</version>
</dependency>

至于为什么说是无效依赖,导入以上的依赖无法使用mybatis-plus自带的方法

发送请求时,后台产生以下报错:

Invalid bound statement (not found): com.dormitory.dormitory_backend.mapper.AttendanceMapper.deleteById

AttendanceMapper的deleteById方法是无效的绑定语句,也就是,无法识别到mybatis-plus自带的删除方法,但是可以识别自定义的mapper语句,能正常进行增删改查,也就是原mybatis的写法呗,但是,我想快速实现CRUD啊!于是,网上找了一个解决的方法,配置一个类,请看下文:

import com.baomidou.mybatisplus.core.MybatisConfiguration;
import com.baomidou.mybatisplus.core.MybatisXMLLanguageDriver;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import org.apache.ibatis.mapping.DatabaseIdProvider;
import org.apache.ibatis.plugin.Interceptor;
import org.mybatis.spring.boot.autoconfigure.MybatisProperties;
import org.mybatis.spring.boot.autoconfigure.SpringBootVFS;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.ResourceLoader;
import org.springframework.util.StringUtils;import javax.sql.DataSource;@Configuration
public class MybatisPlusConfig {@Autowiredprivate DataSource dataSource;@Autowiredprivate MybatisProperties properties;@Autowiredprivate ResourceLoader resourceLoader = new DefaultResourceLoader();@Autowired(required = false)private Interceptor[] interceptors;@Autowired(required = false)private DatabaseIdProvider databaseIdProvider;/*** mybatis-plus分页插件*/@Beanpublic PaginationInnerInterceptor paginationInnerInterceptor(){PaginationInnerInterceptor page= new PaginationInnerInterceptor();return page;}/*** 这里全部使用mybatis-autoconfigure 已经自动加载的资源。不手动指定 <p> 配置文件和mybatis-boot的配置文件同步 @return*/@Beanpublic MybatisSqlSessionFactoryBean mybatisSqlSessionFactoryBean() {MybatisSqlSessionFactoryBean mybatisPlus = new MybatisSqlSessionFactoryBean();mybatisPlus.setDataSource(dataSource);mybatisPlus.setVfs(SpringBootVFS.class);if (StringUtils.hasText(this.properties.getConfigLocation()))mybatisPlus.setConfigLocation(this.resourceLoader.getResource(this.properties.getConfigLocation()));if (!ObjectUtils.isEmpty(this.interceptors)) mybatisPlus.setPlugins(this.interceptors);MybatisConfiguration mc = new MybatisConfiguration();mc.setDefaultScriptingLanguage(MybatisXMLLanguageDriver.class);// 数据库字段设计为驼峰命名,默认开启的驼峰转下划线会报错字段找不到mc.setMapUnderscoreToCamelCase(true);mybatisPlus.setConfiguration(mc);if (this.databaseIdProvider != null) mybatisPlus.setDatabaseIdProvider(this.databaseIdProvider);if (StringUtils.hasLength(this.properties.getTypeAliasesPackage()))mybatisPlus.setTypeAliasesPackage(this.properties.getTypeAliasesPackage());if (StringUtils.hasLength(this.properties.getTypeHandlersPackage()))mybatisPlus.setTypeHandlersPackage(this.properties.getTypeHandlersPackage());if (!ObjectUtils.isEmpty(this.properties.resolveMapperLocations()))mybatisPlus.setMapperLocations(this.properties.resolveMapperLocations());return mybatisPlus;}
}

配置了这个类,确实是可以使用mybatis-plus自带的方法,但是自己写的方法却无法实现了

实现配置类后,请求自定义的新增方法:

实现配置类后,请求mybatis-plus自带的删除方法:

几经辗转,发现导入以下这个依赖可以实现同时使用自定义方法和mybatis-plus自带方法,注意:需要删除MybatisPlusConfig类,以及将原先导入的三个依赖替换成新的依赖就可以了

有效依赖---导入mybatis-plus的依赖:

---------------原依赖-----------------
<dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-boot-starter</artifactId><version>3.5.1</version>
</dependency>
<dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-annotation</artifactId><version>3.5.1</version>
</dependency>
<dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-core</artifactId><version>3.5.1</version>
</dependency>--------------新依赖------------------
<dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-spring-boot3-starter</artifactId><version>3.5.7</version>
</dependency>

5.实现表对应的实体类

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_attendance")
public class Attendance {@ApiModelProperty("自增id")@TableId(value = "id",type = IdType.AUTO)private Integer id;@ApiModelProperty("账号(学号)")@TableField("user_account")private String userAccount;@ApiModelProperty("缺勤原因")@TableField("reason")private String reason;
}

6.mapper和xml

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dormitory.dormitory_backend.entity.Attendance;
import org.apache.ibatis.annotations.Mapper;@Mapper
public interface AttendanceMapper extends BaseMapper<Attendance> {int insertAttendance(Attendance attendance);int deleteAttendance(Integer id);
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapperPUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dormitory.dormitory_backend.mapper.AttendanceMapper"><insert id="insertAttendance" parameterType="com.dormitory.dormitory_backend.entity.Attendance">insert into t_attendance(user_account,reason) values(#{userAccount},#{reason})</insert><delete id="deleteAttendance">delete from t_attendance where id = #{id}</delete></mapper>

7.service和impl

public interface AttendanceService {int addAttendance(Attendance attendance);int deleteAttendance(Integer id);
}
import com.dormitory.dormitory_backend.entity.Attendance;
import com.dormitory.dormitory_backend.mapper.AttendanceMapper;
import com.dormitory.dormitory_backend.service.AttendanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;@Service
public class AttendanceServiceImpl implements AttendanceService {@Autowiredprivate AttendanceMapper attendanceMapper;/*** 自定义的新增方法* @param attendance* @return*/@Overridepublic int addAttendance(Attendance attendance) {int insert = attendanceMapper.insertAttendance(attendance);return insert;}/*** plus自带的删除方法* @param id* @return*/@Overridepublic int deleteAttendance(Integer id) {return attendanceMapper.deleteById(id);}
}

8.controller

import com.dormitory.dormitory_backend.entity.Attendance;
import com.dormitory.dormitory_backend.service.AttendanceService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;@RestController
@RequestMapping("/attendance")
@Api(tags = {"考勤管理"})
public class AttendanceController {@Autowiredprivate AttendanceService attendanceService;@PostMapping("/addAttendance")public int addAttendance(@RequestBody Attendance attendance){int addAttendance = attendanceService.addAttendance(attendance);return addAttendance;}@DeleteMapping("/deleteAttendance")public int deleteAttendance(Integer id){int addAttendance = attendanceService.deleteAttendance(id);return addAttendance;}
}

9.实现

唠一唠:出现Invalid bound statement (not found)问题的原因可能有哪些

1.全局配置文件没配好?

检查全局配置文件application.properties或application.yml是否配置扫描mapper包的文件路径

#mybatis配置mapper文件路径
#mybatis.mapper-locations=classpath:/mapper/*.xml
#mybatis-plus配置mapper文件路径
mybatis-plus.mapper-locations=classpath:/mapper/*.xml

2.启动类没加包扫描注解 ?

检查启动类上是否添加包扫描注解 

@SpringBootApplication
@MapperScan("项目路径.mapper")
public class DormitoryBackendApplication {public static void main(String[] args) {SpringApplication.run(DormitoryBackendApplication.class, args);
}

3.没使用@Mapper注解?

XXXmapper.java类是否使用@Mapper注解

@Mapper
public interface AttendanceMapper extends BaseMapper<Attendance> {}

4.命名空间不正确?

检查XXXmapper.xml的命名空间是否正确,是否能跳转到对应的XXXmapper.java

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapperPUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dormitory.dormitory_backend.mapper.AttendanceMapper"></mapper>

正常能跳转会有箭头图标,点击能跳转(下载一个插件)

相关文章:

Spring Boot3.3.X整合Mybatis-Plus

前提说明&#xff1a; 项目的springboot版本为&#xff1a;<version>3.3.2</version> 需要整合的mybatis-plus版本&#xff1a;<version>3.5.7</version> 废话不多说&#xff0c;开始造吧 1.准备好数据库和表 2.配置全局文件application.properti…...

快速了解软件测试——测试用例的方法

测试用例的编写方法有八种&#xff0c;其中等价类、边界值、判定表、场景法、流程图重要且使用得多 ●等价类●边界值●判定表●因果图[了解]●正交法[了解]●场景法●流程图●错误推测法[了解] 1、等价类 为什么要用等价类划分法? ●从大量数据中划分范围(等价类),然后从每…...

多线程、多进程,还是异步?-- Python 并发 API 如何选择

如何选择正确的 Python 并发 API模块 &#xff1f; Python 标准库提供了三种并发 API &#xff0c; 如何知道你的项目应该使用哪个 API&#xff1f; 在本教程将带逐步了解各API的特性、区别以及各自应用场景&#xff0c;指导你选择最合适的并发 API。 多线程、多进程&#xff0…...

汽车服务管理系统 _od8kr

TOC springboot580汽车服务管理系统 _od8kr--论文 系统概述 该系统由个人管理员和员工管理&#xff0c;用户三部分组成。其中&#xff1a;用户进入系统首页可以实现首页&#xff0c;热销汽车&#xff0c;汽车配件&#xff0c;汽车资讯&#xff0c;后台管理&#xff0c;在线客…...

带你玩转小程序推广,实现短链接一键跳转

不知道各位有没有想过&#xff0c;短链接直接跳转到微信小程序到底该怎么操作呢&#xff1f;掌握这个小技能&#xff0c;能让你的推广效率大幅提升哦。今天就给大家分享一个全新方法&#xff0c;教你如何从短链接直接跳转到微信小程序&#xff0c;实现高效的一键式跨越。 一、…...

OpenDDS的Rtps_Udp传输协议可靠性QoS收发基本流程

OpenDDS中,实现了Rtps_Udp传输协议(非纯udp)的可靠性传输。传输的线程包括: 1)发送方线程主要线程和定时器 《1》应用线程 《2》网络异步发送线程 《3》Heartbeat定时器 《4》Nak_response定时器 2)接收方主要线程和定时器 《1》网络异步接收线程 《2》heartbeat_respons…...

体育数据API纳米奥运会数据API:高阶数据包接口文档API示例⑦

纳米体育数据的数据接口通过JSON拉流方式获取200多个国家的体育赛事实时数据或历史数据的编程接口&#xff0c;无请求次数限制&#xff0c;可按需购买&#xff0c;接口稳定高效&#xff1b;覆盖项目包括足球、篮球、网球、电子竞技、奥运等专题、数据内容。 纳米数据API2.0版本…...

【中项第三版】系统集成项目管理工程师 | 第 15 章 组织保障

前言 本章的知识点预计上午会考1-2分&#xff0c;下午可能会考&#xff0c;一般与其他管理领域进行结合考查。学习要以教材为主。 目录 15.1 信息和文档管理 15.1.1 信息和文档 15.1.2 信息&#xff08;文档&#xff09;管理规则和方法 15.2 配置管理 15.2.1 基本概念 …...

数据结构——顺序栈和链式栈

目录 引言 栈的定义 栈的分类 栈的功能 栈的声明 1.顺序栈 2.链式栈 栈的功能实现 1.栈的初始化 (1)顺序栈 (2)链式栈 (3)复杂度分析 2.判断栈是否为空 (1)顺序栈 (2)链式栈 (3)复杂度分析 3.返回栈顶元素 (1)顺序栈 (2)链式栈 (3)复杂度分析 4.返回栈的大…...

PHP轻创推客集淘客地推任务平台于一体的综合营销平台系统源码

&#x1f680;轻创推客&#xff0c;营销新纪元 —— 集淘客与地推任务于一体的全能平台&#x1f310; &#x1f308;【开篇&#xff1a;营销新潮流&#xff0c;轻创推客引领未来】 在瞬息万变的营销世界里&#xff0c;你还在为寻找高效、全面的营销渠道而烦恼吗&#xff1f;&…...

three.js实现 加载3dtiles ,瓦片 ,倾斜摄影,功能

预览&#xff1a;https://z2586300277.github.io/three-cesium-examples/#/codeMirror?navigationThreeJS&classifyexpand&idloadTiles 部署站点预览&#xff1a;http://threehub.cn/ 开源地址&#xff1a;https://z2586300277.github.io/three-cesium-examples/#/e…...

Qt QTextEdit调用append数据重复的问题

使用QTextEdit写了个串口工具&#xff0c; 当串口有数据时通过一个signal传给slot&#xff0c;在 slot中调用QTextEdit的append(text)来增量显示串口数据&#xff0c;当串口关闭时调用clear()来清空显示。 结果发现append调用后显示的数据会有重复。 分析 分析代码&#xff0…...

数学基础(二)

一、导数 导数计算&#xff1a; 偏导数&#xff1a; 方向导数&#xff1a; 梯度&#xff1a; 函数在某点的梯度是一个向量&#xff0c;它的方向余方向导数最大值取得的方向一致。其大小正好是最大的方向导数 二、微积分 面积由来&#xff1a; 切线&#xff1a; 定积分&#x…...

Java设计模式原则及中介者模式研究

在软件开发过程中&#xff0c;设计模式作为解决常见设计问题的有效工具&#xff0c;对于提升代码质量、促进团队协作具有重要意义。本文系统地阐述了Java设计模式的六大基本原则——单一职责原则、开放封闭原则、里氏替换原则、依赖倒置原则、接口隔离原则以及迪米特法则&#…...

logstash入门学习

1、入门示例 1.1、安装 Redhat 平台 rpm --import http://packages.elasticsearch.org/GPG-KEY-elasticsearch cat > /etc/yum.repos.d/logstash.repo <<EOF [logstash-5.0] namelogstash repository for 5.0.x packages baseurlhttp://packages.elasticsearch.org…...

【代码】Swan-Transformer 代码详解(待完成)

1. 局部注意力 Window Attention (W-MSA Module) class WindowAttention(nn.Module):r""" Window based multi-head self attention (W-MSA) module with relative position bias.It supports both of shifted and non-shifted window.Args:dim (int): Number…...

iframe.contentDocument 和document.documentElement的区别

iframe.contentDocument 和 document.documentElement 是用于访问不同内容的两个不同的对象或属性。 1. iframe.contentDocument 内容: iframe.contentDocument 代表的是 <iframe> 元素所嵌入的文档的 Document 对象。它允许你访问和操作嵌入的文档&#xff08;即 ifram…...

计算机操作员试题(中篇)

计算机操作员试题(中篇) 335.在 Excel中,把鼠标指向被选中单元格边框,当指变成箭头时,拖动鼠标到目标单 元格时,将完成( )操作。 (A)删除 (B)移动 ©自动填充 (D)复制 336.在 Excel 工作表的单元格中,如想输入数字字符串 070615 (例如学号),则应输 入()。 (A) 0007…...

车规级MCU「换道」竞赛

汽车芯片&#xff0c;尤其是MCU市场正在进入拐点期。 本周&#xff0c;总部位于荷兰的汽车芯片制造商—恩智浦&#xff08;NXP&#xff09;半导体总裁兼首席执行官Kurt Sievers在公司第二季度财报电话会议上告诉投资者&#xff0c;由于汽车需求停滞不前&#xff0c;该公司正在努…...

数学生物学-2-离散时间模型(Discrete Time Models)

上一篇介绍了一个指数增长模型。然而&#xff0c;我们也看到&#xff0c;在现实情况下&#xff0c;细菌培养的增长是在离散的时间&#xff08;在这种情况下是小时&#xff09;进行测量的&#xff0c;种群并没有无限增长&#xff0c;而是趋于以S形曲线趋于平稳&#xff0c;称为“…...

免费开源!AI视频自动剪辑已成现实!效率提升80%,打工人福音!(附详细教程)

大家好&#xff0c;我是程序员X小鹿&#xff0c;前互联网大厂程序员&#xff0c;自由职业2年&#xff0c;也一名 AIGC 爱好者&#xff0c;持续分享更多前沿的「AI 工具」和「AI副业玩法」&#xff0c;欢迎一起交流~ 想象一下&#xff0c;假设老板给你布置了一项任务&#xff1a…...

NtripShare全站仪自动化监测之气象改正

最近有幸和自动化监测领域权威专家进行交流&#xff0c;讨论到全站仪气象改正的问题&#xff0c;因为有些观点与专家不太一致&#xff0c;所以再次温习了一下全站仪气象改正的技术细节。 气象改正的概念 全站仪一般利用光波进行测距&#xff0c;首先仪器会处理测距光波的相位漂…...

【人工智能】项目案例分析:使用自动编码器进行信用卡欺诈检测

一、项目背景 信用卡欺诈是金融行业面临的一个重要问题&#xff0c;快速且准确的欺诈检测对于保护消费者和金融机构的利益至关重要。本项目旨在通过利用自动编码器&#xff08;Autoencoder&#xff09;这一无监督学习算法&#xff0c;来检测信用卡交易中的欺诈行为&#xff0c…...

【工控】线扫相机小结

背景简介 我目前接触到的线扫相机有两种形式: 无采集卡,数据通过网线传输。 配备采集卡,使用PCIe接口。 第一种形式的数据通过网线传输,速度较慢,因此扫描和生成图像的速度都较慢,参数设置主要集中在相机本身。第二种形式的相机配备采集卡,通常速度更快,但由于相机和…...

将Web应用部署到Tomcat根目录的三种方法

将应用部署到Tomcat根目录的三种方法 将应用部署到Tomcat根目录的目的是可以通过"http://[ip]:[port]"直接访问应用&#xff0c;而不是使用"http://[ip]:[port]/[appName]"上下文路径进行访问。 方法一&#xff1a;&#xff08;最简单直接的方法&#xff0…...

工业和信息化部教育与考试中心计算机相关专业介绍

国家工信部的认证证书在行业内享有较高声誉。 此外&#xff0c;还设有专门的工业和信息化技术技能人才数据库查询服务&#xff0c;进一步方便了个人和企业对相关职业能力证书的查询需求。 序号 专业工种 级别 备注 1 JAVA程序员 初级 职业技术 2 电子…...

第二证券:生物天然气线上交易达成 创新探索互联互通、气证合一

8月20日&#xff0c;上海石油天然气生意中心在国内立异推出生物天然气线上生意。当日&#xff0c;绿气新动力&#xff08;北京&#xff09;有限公司&#xff08;简称“绿气新动力”&#xff09;挂单的1500万立方米生物天然气被百事食物&#xff08;我国&#xff09;有限公司&am…...

重磅!RISC-V+OpenHarmony平板电脑发布

仟江水商业电讯&#xff08;8月18日 北京 委托发布&#xff09;RISC-V作为历史上全球发展速度最快、创新最为活跃的开放指令架构&#xff0c;正在不断拓展高性能计算领域的边界。OpenHarmony是由开放原子开源基金会孵化并运营的开源项目&#xff0c;已成为发展速度最快的智能终…...

[DL]深度学习_扩散模型

扩散模型原理 深入浅出扩散模型 一、概念简介 1、Denoising Diffusion Probalistic Models&#xff0c;DDPM 1.1 扩散模型运行原理 首先sample一个都是噪声的图片向量&#xff0c;这个向量的shape和要生成的图像大小相同。通过Denoise过程来一步一步有规律的滤去噪声。Den…...

AI学习记录 - 如何快速构造一个简单的token词汇表

创作不易&#xff0c;有用的话点个赞 先直接贴代码&#xff0c;我们再慢慢分析&#xff0c;代码来自openai的图像分类模型的一小段 def bytes_to_unicode():"""Returns list of utf-8 byte and a corresponding list of unicode strings.The reversible bpe c…...

专业做旅游网站/搜索平台

编辑/etc/rsyslog.d/50-default.conf 其中有这么一段*.info;*.notice;*.warn;\auth,authpriv.none;\cron,daemon.none;\mail,news.none -/var/log/messages保存后重启服务&#xff1a;sudo restart rsyslog 转载于:https://www.cnblogs.com/knightly/p/3765332.html...

网站如何做图片特效/seo全称

使用的是XHScrollMenu和UIPageViewController来构建5个页面:ViewController1, ViewController2, ViewController3, ViewController4, ViewController5。XHScrollMenu和UIPageViewController左右滑动均可以控制页面的切换。一般情况下是正确的。但如果点击了menu&#xff0c;切换…...

商城网站怎么做内链/百度竞价广告点击器

CSS 概述CSS 指层叠样式表 (Cascading Style Sheets)&#xff0c;用于定义如何显示 HTML 标签&#xff0c;进行美化页面&#xff0c;css通常存储在样式表中。css有三种存在方式标签内联、页面嵌入和外部引入&#xff0c;比较三种方式的优缺点。在标签中使用 stylexx:xxx; 在…...

正规网站建设找哪家/现在推广一般都用什么软件

一、JSON的标准格式 JSON里面是一个对象&#xff0c;如果是多个对象&#xff0c;则用逗号间隔&#xff0c;即{},{}&#xff0c;这样就组成了一个对象序列&#xff0c;为了辨别开始和结束&#xff0c;则需要加上[]&#xff0c;即实际传递的形式应该是[{},{}]&#xff0c;如果只要…...

成都简阳疫情最新消息/点击seo软件

Html5--6-46 渐变效果 学习要点 掌握线性渐变和径向渐变的使用线性渐变&#xff1a; 属性&#xff1a;linear-gradinet(开始位置 角度&#xff0c;起始颜色&#xff0c;终止颜色 ) 开始位置&#xff1a;渐变开始的位置&#xff0c;属性值可以为百分比/长度/left、right、top、b…...

广州市城乡建设局网站/自动搜索关键词软件

1.利用jdk帮助文档 equals和的区别 操作符专门用来比较两个变量的值是否相等&#xff0c;也就是用于比较变量所对应的内存中所存储的数值是否相同&#xff0c;要比较两个基本类型的数据或两个引用变量是否相等&#xff0c;只能用操作符。如果一个变量指向的数据是对象类型的&a…...