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

MyBatis系列六: 映射关系多对一

动态SQL语句-更复杂的查询业务需求

  • 官方文档
  • 基本介绍
  • 映射方式
  • 配置Mapper.xml的方式-应用实例
  • 注解的方式实现-应用实例
  • 课后练习

在这里插入图片描述

官方文档

文档地址: https://mybatis.org/mybatis-3/zh_CN/sqlmap-xml.html

基本介绍

●基本介绍
1.项目中多对1的关系是一个基本的映射关系, 也可以理解成1对多
2.User --- Pet: 一个用户可以养多只宠物
3.Dep --- Emp: 一个部门可以有多个员工

●注意细节
1.我们直接讲 双向的多对一的关系, 单向的多对一比双向的多对一简单.
2.在实际的项目开发中, 要求会使用双向的多对一的映射关系
3.说明: 什么是双向的多对一的关系: 比如通过User可以查询到对应的Pet, 返回来, 通过Pet也可以级联查询到对应的User信息.
4.多对多的关系, 是在多对1的基础上扩展即可.

映射方式

1.方式1: 通过配置XxxMapper.xml 实现多对1 [配置方式]
2.方式2: 通过注解的方式实现 多对1 [注解方式]
3.我们都实现代码, 应用举例.

配置Mapper.xml的方式-应用实例

●需求说明: 实现级联查询, 通过userid可以查询到用户信息, 并可以查询到关联的pet信息. 反过来, 通过Petid可以查询到Pet的信息, 并且可以级联查询到它的主人User对象信息
在这里插入图片描述

1.创建user表和pet

USE mybatis;CREATE TABLE `mybatis_user` (
`id` INT PRIMARY KEY AUTO_INCREMENT,
`name` VARCHAR(32) NOT NULL DEFAULT ''
)CHARSET=utf8CREATE TABLE `mybatis_pet` (
`id` INT PRIMARY KEY AUTO_INCREMENT,
`nickname` VARCHAR(32) NOT NULL DEFAULT '',
`user_id` INT,
FOREIGN KEY(`user_id`) REFERENCES `mybatis_user`(`id`)
)CHARSET=utf8INSERT INTO `mybatis_user` VALUES (NULL, '宋江'), (NULL, '卢俊义');
INSERT INTO `mybatis_pet` VALUES (NULL, '波斯猫', 1), (NULL, '旺财', 1);
INSERT INTO `mybatis_pet` VALUES (NULL, '斑点猫', 2), (NULL, '花猫', 2);SELECT * FROM `mybatis_user`;
SELECT * FROM `mybatis_pet`;

2.创建com.zzw.entity.Petcom.zzw.entity.User. 这里toString方法有问题, 后面揭晓

@Getter
@Setter
public class Pet {/*** CREATE TABLE `mybatis_pet` (* `id` INT PRIMARY KEY AUTO_INCREMENT,* `nickname` VARCHAR(32) NOT NULL DEFAULT '',* `user_id` INT,* FOREIGN KEY(`user_id`) REFERENCES `mybatis_user`(`id`)* )CHARSET=utf8*/private Integer id;private String nickname;//一个pet对应一个主人 User对象private User user;//toString会造成StackOverFlow//@Override//public String toString() {//    return "Pet{" +//            "id=" + id +//            ", nickname='" + nickname + '\'' +//            ", user=" + user +//            '}';//}
}
@Getter
@Setter
public class User {/*** CREATE TABLE `mybatis_user` (* `id` INT PRIMARY KEY AUTO_INCREMENT,* `name` VARCHAR(32) NOT NULL DEFAULT ''* )CHARSET=utf8*/private Integer id;private String name;//因为一个user可以养多个宠物, mybatis 使用集合体现体现这个关系private List<Pet> pets;//toString会带来麻烦?=>会造成StackOverFlow//@Override//public String toString() {//    return "User{" +//            "id=" + id +//            ", name='" + name + '\'' +//            ", pets=" + pets +//            '}';//}
}

3.创建UserMapperPetMapper

public interface UserMapper {//通过id获取User对象public User getUserById(Integer id);
}
public interface PetMapper {//通过User的id来获取pet对象, 可能有多个, 因此使用List接收public List<Pet> getPetByUserId(Integer userId);//通过pet的id获取pet对象, 同时会查询到pet对象关联的user对象public Pet getPetById(Integer id);
}

4.创建PetMapper.xmlUserMapper.xml

<mapper namespace="com.zzw.mapper.PetMapper"><!--1.配置/实现public List<Pet> getPetByUserId(Integer userId);2.通过User的id来获取pet对象, 可能有多个, 因此使用List接收3.完成的思路和前面大体相同--><resultMap id="petResultMap" type="Pet"><id property="id" column="id"/><result property="nickname" column="nickname"/><association property="user" column="user_id"select="com.zzw.mapper.UserMapper.getUserById"/><!--先写完, 再去实现getUserById方法--></resultMap><select id="getPetByUserId" parameterType="Integer"resultMap="petResultMap">SELECT * FROM `mybatis_pet` WHERE `user_id` = #{userId}</select>
</mapper>
<mapper namespace="com.zzw.mapper.UserMapper"><!--解读1.想一想前面的1对1怎么实现的2.配置/实现public User getUserById(Integer id);3.通过id获取User对象4.思路(1) 先通过user-id 查询得到用户信息 (2) 再根据user-id查询对应的pet信息并映射到List<Pet> pets--><resultMap id="userResultMap" type="User"><id property="id" column="id"/><result property="name" column="name"/><!--解读: 因为pets属性是集合, 因此这里需要使用collection标签来处理1.ofType="Pet" 指定返回的集合中存放的数据类型Pet2.collection 表示 pets 是一个集合3.property="pets" 是返回的user对象的属性 pets4.column="id" select * from `mybatis_user` where `id` = #{id} 返回的id字段对应的值--><collection property="pets" column="id" ofType="Pet"select="com.zzw.mapper.PetMapper.getPetByUserId"/></resultMap><select id="getUserById" parameterType="Integer"resultMap="userResultMap">select * from `mybatis_user` where `id` = #{id}</select>
</mapper>

5.新建UserMapperTest PetMapperTest

public class UserMapperTest {//属性private SqlSession sqlSession;private UserMapper userMapper;//初始化@Beforepublic void init() {sqlSession = MyBatisUtils.getSqlSession();userMapper = sqlSession.getMapper(UserMapper.class);System.out.println("userMapper--" + userMapper);}@Testpublic void getUserById() {User user = userMapper.getUserById(2);System.out.println("user信息--" + user.getId() + "-" + user.getName());List<Pet> pets = user.getPets();for (Pet pet : pets) {System.out.println("养的宠物信息-" + pet.getId() + "-" + pet.getNickname());}if (sqlSession != null) {sqlSession.close();}}
}
public class PetMapperTest {//属性private SqlSession sqlSession;private PetMapper petMapper;//初始化@Beforepublic void init() {sqlSession = MyBatisUtils.getSqlSession();petMapper = sqlSession.getMapper(PetMapper.class);System.out.println("petMapper--" + petMapper.getClass());}@Testpublic void getPetByUserId() {List<Pet> pets = petMapper.getPetByUserId(1);for (Pet pet : pets) {System.out.println("pet信息-" + pet.getId() + "-"  + pet.getNickname());User user = pet.getUser();System.out.println("user信息-" + user.getName());}if (sqlSession != null) {sqlSession.close();}}
}

6.实现getPetById, 体会复用

<!--说明
1. 注意体会resultMap带来好处, 直接复用
2. 配置/实现public Pet getPetById(Integer id);
3. 通过pet的id获取pet对象
-->
<select id="getPetById" parameterType="Integer"resultMap="petResultMap">SELECT * FROM `mybatis_pet` where `id` = #{id};
</select>
@Test
public void getPetById() {Pet pet = petMapper.getPetById(4);System.out.println("pet信息-" + pet.getId() + "-" + pet.getNickname());User user = pet.getUser();System.out.println("主人信息-" + user.getId() + "-" + user.getName());if (sqlSession != null) {sqlSession.close();}
}

注解的方式实现-应用实例

●需求说明: 通过注解的方式来实现下面的多对1的映射关系, 实现级联查询, 通过userid可以查询到用户信息, 并可以查询到关联的pet信息. 反过来, 通过Petid可以查询到Pet的信息, 并且可以级联查询到它的主人User对象信息

说明: 在实际开发中还是 推荐使用配置方式

1.新建com.zzw.mapper.UserMapperAnnotation接口

/*** @author 赵志伟* @version 1.0* UserMapperAnnotation: 使用注解的方式实现多对一*/
public interface UserMapperAnnotation {/*** 1.说明: 注解的形式就是前面xml配置方式的体现* 2.这里同学们可以结合前面xml实现*  <resultMap id="userResultMap" type="User">*         <id property="id" column="id"/>*         <result property="name" column="name"/>*         <collection property="pets" column="id" ofType="Pet"*                     select="com.zzw.mapper.PetMapper.getPetByUserId"/>*     </resultMap>*     <select id="getUserById" parameterType="Integer"*             resultMap="userResultMap">*         select * from `mybatis_user` where `id` = #{id}*     </select>*/@Select("select * from `mybatis_user` where `id` = #{id}")@Results({@Result(id = true, property = "id", column = "id"),@Result(property = "name", column = "name"),//这里请小伙伴注意, pets属性对应的是集合@Result(property = "pets", column = "id",many = @Many(select = "com.zzw.mapper.PetMapperAnnotation.getPetByUserId"))})public User getUserById(Integer id);
}

2.新建com.zzw.mapper.PetMapperAnnotation接口

public interface PetMapperAnnotation {/*** <resultMap id="petResultMap" type="Pet">*     <id property="id" column="id"/>*     <result property="nickname" column="nickname"/>*     <association property="user" column="user_id"*                  select="com.zzw.mapper.UserMapper.getUserById"/>* </resultMap>* <select id="getPetByUserId" parameterType="Integer"*         resultMap="petResultMap">*     SELECT * FROM `mybatis_pet` WHERE `user_id` = #{userId}* </select>*///id = "petResultMap" 就是给我们的Results[Result Map] 指定一个名字//, 目的是为了后面复用@Select("SELECT * FROM `mybatis_pet` WHERE `user_id` = #{userId}")@Results(id = "petResultMap", value = {@Result(id = true, property = "id", column = "id"),@Result(property = "nickname", column = "nickname"),@Result(property = "user", column="user_id",one = @One(select = "com.zzw.mapper.UserMapperAnnotation.getUserById"))})public List<Pet> getPetByUserId(Integer userId);/*** <select id="getPetById" parameterType="Integer"*         resultMap="petResultMap">*     SELECT * FROM `mybatis_pet` where `id` = #{id}* </select>** @ResultMap("petResultMap") 使用/引用我们上面定义的 Results[ResultMap]*/@Select("SELECT * FROM `mybatis_pet` where `id` = #{id}")@ResultMap("petResultMap")public Pet getPetById(Integer id);
}

3.新建 com.zzw.mapper.UserMapperAnnotationTestcom.zzw.mapper.PetMapperAnnotationTest

public class UserMapperAnnotationTest {//属性private SqlSession sqlSession;private UserMapperAnnotation userMapperAnnotation;//初始化@Beforepublic void init() {sqlSession = MyBatisUtils.getSqlSession();userMapperAnnotation = sqlSession.getMapper(UserMapperAnnotation.class);System.out.println("userMapperAnnotation--" + userMapperAnnotation.getClass());}@Testpublic void getUserById() {User user = userMapperAnnotation.getUserById(2);System.out.println("[注解方式]--user信息--" + user.getId() + "-" + user.getName());List<Pet> pets = user.getPets();for (Pet pet : pets) {System.out.println("养的宠物信息-" + pet.getId() + "-" + pet.getNickname());}if (sqlSession != null) {sqlSession.close();}}
}
public class PetMapperAnnotationTest {//属性private SqlSession sqlSession;private PetMapperAnnotation petMapperAnnotation;//初始化@Beforepublic void init() {sqlSession = MyBatisUtils.getSqlSession();petMapperAnnotation = sqlSession.getMapper(PetMapperAnnotation.class);System.out.println("petMapperAnnotation--" + petMapperAnnotation.getClass());}@Testpublic void getPetByUserId() {List<Pet> pets = petMapperAnnotation.getPetByUserId(1);for (Pet pet : pets) {System.out.println("pet信息-" + pet.getId() + "-"  + pet.getNickname());User user = pet.getUser();System.out.println("user信息-" + user.getName());}if (sqlSession != null) {sqlSession.close();}}@Testpublic void getPetById() {Pet pet = petMapperAnnotation.getPetById(4);System.out.println("pet信息-" + pet.getId() + "-" + pet.getNickname());User user = pet.getUser();System.out.println("主人信息-" + user.getId() + "-" + user.getName());if (sqlSession != null) {sqlSession.close();}}
}

课后练习

1.自己设计表 dept(部门) 和 emp(雇员), 是1对多的关系
2.通过查询dept, 可以级联查询得到所有emp的信息
3.通过查询emp, 可以级联查询得到对应的dept信息
4.字段小伙伴可以自己设计, 尽量完成.
- dept(id, dep_name)
- emp(id, name, salary, dept_id)

●代码实现
1.创建 dept表 和 emp

USE mybatis;CREATE TABLE `dept` (
`id` INT PRIMARY KEY AUTO_INCREMENT,
`dep_name` VARCHAR(64) NOT NULL DEFAULT ''
)CHARSET=utf8CREATE TABLE `emp` (
`id` INT PRIMARY KEY AUTO_INCREMENT,
`name` VARCHAR(64) NOT NULL DEFAULT '',
`salay` DOUBLE NOT NULL DEFAULT 0.0,
`dept_id` INT,
FOREIGN KEY(`dept_id`) REFERENCES `dept`(`id`)
)CHARSET=utf8INSERT INTO `dept` VALUES (1, '宣传部'), (2, '技术部');
INSERT INTO `emp` VALUES (1, '赵志伟', 6000, 2), (2, '赵培竹', 6000, 1), (3, '阳光', 12000, 2), (4, '月亮', 12000, 1);SELECT * FROM `dept`;
SELECT * FROM `emp`;

2.创建com.zzw.entity.dept.javacom.zzw.entity.emp.java

@Getter
@Setter
public class Dept {private Integer id;private String depName;//级联查询, 一对多private List<Emp> emps;
}
@Getter
@Setter
public class Emp {private Integer id;private String name;private Double salary;//级联查询, 一对一private Dept dept;
}

3.创建EmpMapper.javaDeptMapper.java

public interface EmpMapper {//通过emp的id查询到emp对象, 同时会查询到emp对象关联的dept对象public Emp getEmpById(Integer id);//通过dept的id获取emp对象, 可能有多个, 因此用List接收public List<Emp> getEmpByDeptId(Integer deptId);
}
public interface DeptMapper {//通过dept的id查询到dept对象public Dept getDeptById(Integer id);
}

4.创建EmpMapper.xmlDeptMapper.xml

<mapper namespace="com.zzw.mapper.EmpMapper"><!--1.配置/实现public List<Emp> getEmpByDeptId(Integer deptId);2.通过dept的id获取emp对象, 可能有多个, 因此用List接收--><resultMap id="EmpResultMap" type="Emp"><id property="id" column="id"/><result property="name" column="name"/><result property="salary" column="salary"/><association property="dept" column="dept_id"select="com.zzw.mapper.DeptMapper.getDeptById"/></resultMap><select id="getEmpByDeptId" parameterType="Integer" resultMap="EmpResultMap">SELECT * FROM `emp` WHERE dept_id = #{deptId}</select>
</mapper>
<mapper namespace="com.zzw.mapper.EmpMapper"><!--1.配置/实现public Dept getDeptById(Integer id);2.通过dept的id查询到dept对象3.思路(1) 先通过dept-id 查询到部门信息 (2) 再根据dept-id查询对应的emp信息并映射到List<Emp> emps--><resultMap id="DeptResultMap" type="Dept"><id property="id" column="id"/><result property="depName" column="dep_name"/><!--解读: 因为emps属性是集合, 因此这里需要使用collection标签来处理1.ofType="Emp" 指定返回的集合中存放的数据类型Emp2.collection 表示 emps 是一个集合3.property="emps" 是返回的dept对象的属性 emps4.column="id" SELECT * FROM `dept` WHERE `id` = #{id} 返回的id字段的值--><collection property="emps" column="id" ofType="Emp"select="com.zzw.mapper.EmpMapper.getEmpByDeptId"/></resultMap><select id="getDeptById" parameterType="Integer" resultMap="DeptResultMap">SELECT * FROM `dept` WHERE `id` = #{id}</select>
</mapper>

5.创建EmpMapperTestDeptMapperTest

public class EmpMapperTest {//属性private SqlSession sqlSession;private EmpMapper empMapper;//编写方法完成初始化@Beforepublic void init() {sqlSession = MyBatisUtils.getSqlSession();empMapper = sqlSession.getMapper(EmpMapper.class);System.out.println("empMapper=" + empMapper.getClass());}@Testpublic void getEmpByDeptId() {List<Emp> emps = empMapper.getEmpByDeptId(2);for (Emp emp : emps) {System.out.println("emp信息-" + emp.getId() + "-" + emp.getName() + "-" + emp.getSalary());Dept dept = emp.getDept();System.out.println("部门信息-" + dept.getId() + "-" + dept.getDepName());}if (sqlSession != null) {sqlSession.close();}}
}
public class DeptMapperTest {//属性private SqlSession sqlSession;private DeptMapper deptMapper;//编写方法完成初始化@Beforepublic void init() {sqlSession = MyBatisUtils.getSqlSession();deptMapper = sqlSession.getMapper(DeptMapper.class);System.out.println("deptMapper=" + deptMapper.getClass());}@Testpublic void getDeptById() {Dept dept = deptMapper.getDeptById(1);System.out.println("部门信息-" + dept.getId() + "-" + dept.getDepName());List<Emp> emps = dept.getEmps();for (Emp emp : emps) {System.out.println("员工信息-" + emp.getId() + "-" + emp.getName() + "-" + emp.getSalary());}if (sqlSession != null) {sqlSession.close();}}
}

6.实现getEmpById, 体会复用

<!--
1.配置/实现public Emp getEmpById(Integer id);
2.通过emp的id查询到emp对象, 同时会查询到emp对象关联的dept对象
-->
<select id="getEmpById" parameterType="Integer" resultMap="EmpResultMap">SELECT * FROM `emp` WHERE `id` = #{id}
</select>
@Test
public void getEmpById() {Emp emp = empMapper.getEmpById(2);System.out.println("emp信息-" + emp.getId() + "-" + emp.getName() + "-" + emp.getSalary());Dept dept = emp.getDept();System.out.println("部门信息-" + dept.getId() + "-" + dept.getDepName());if (sqlSession != null) {sqlSession.close();}
}

注解方式实现

1.新建EmpMapperAnnotation接口

public interface EmpMapperAnnotation {/*** 通过emp的id查询到emp对象, 同时会查询到emp对象关联的dept对象* <select id="getEmpById" parameterType="Integer" resultMap="EmpResultMap">*     SELECT * FROM `emp` WHERE `id` = #{id}* </select>*/@Select("SELECT * FROM `emp` WHERE `id` = #{id}")@ResultMap("EmpResultMap")public Emp getEmpById(Integer id);/*** 通过dept的id获取emp对象, 可能有多个, 因此用List接收* <resultMap id="EmpResultMap" type="Emp">*     <id property="id" column="id"/>*     <result property="name" column="name"/>*     <result property="salary" column="salary"/>*     <association property="dept" column="dept_id"*                  select="com.zzw.mapper.DeptMapper.getDeptById"/>* </resultMap>* <select id="getEmpByDeptId" parameterType="Integer" resultMap="EmpResultMap">*     SELECT * FROM `emp` WHERE dept_id = #{deptId}* </select>*/@Select("SELECT * FROM `emp` WHERE dept_id = #{deptId}")@Results(id = "EmpResultMap", value = {@Result(id = true, property = "id", column = "id"),@Result(property = "name", column = "name"),@Result(property = "salary", column = "salary"),@Result(property = "dept", column = "dept_id",one = @One(select = "com.zzw.mapper.DeptMapperAnnotation.getDeptById"))})public List<Emp> getEmpByDeptId(Integer deptId);
}

2.新建DeptMapperAnnotation接口

public interface DeptMapperAnnotation {/**通过dept的id查询到dept对象* <resultMap id="DeptResultMap" type="Dept">*     <id property="id" column="id"/>*     <result property="depName" column="dep_name"/>*     解读: 因为emps属性是集合, 因此这里需要使用collection标签来处理*     1.ofType="Emp" 指定返回的集合中存放的数据类型Emp*     2.collection 表示 emps 是一个集合*     3.property="emps" 是返回的dept对象的属性 emps*     4.column="id" SELECT * FROM `dept` WHERE `id` = #{id} 返回的id字段的值*     -->*     <collection property="emps" column="id" ofType="Emp"*                 select="com.zzw.mapper.EmpMapper.getEmpByDeptId"/>* </resultMap>* <select id="getDeptById" parameterType="Integer" resultMap="DeptResultMap">*     SELECT * FROM `dept` WHERE `id` = #{id}* </select>*/@Select("SELECT * FROM `dept` WHERE `id` = #{id}")@Results(id = "DeptResultMap", value = {@Result(id = true, property = "id", column = "id"),@Result(property = "depName", column = "dep_name"),@Result(property = "emps", column = "id",many = @Many(select = "com.zzw.mapper.EmpMapperAnnotation.getEmpByDeptId"))})public Dept getDeptById(Integer id);
}

3.新建 com.zzw.mapper.EmpMapperAnnotationTestcom.zzw.mapper.DeptMapperAnnotationTest

public class EmpMapperAnnotationTest {//属性private SqlSession sqlSession;private EmpMapperAnnotation empMapperAnnotation;//编写方法完成初始化@Beforepublic void init() {sqlSession = MyBatisUtils.getSqlSession();empMapperAnnotation = sqlSession.getMapper(EmpMapperAnnotation.class);System.out.println("empMapperAnnotation=" + empMapperAnnotation.getClass());}@Testpublic void getEmpByDeptId() {List<Emp> emps = empMapperAnnotation.getEmpByDeptId(2);for (Emp emp : emps) {System.out.println("[注解方式]emp信息-" + emp.getId() + "-" + emp.getName() + "-" + emp.getSalary());Dept dept = emp.getDept();System.out.println("部门信息-" + dept.getId() + "-" + dept.getDepName());}if (sqlSession != null) {sqlSession.close();}}@Testpublic void getEmpById() {Emp emp = empMapperAnnotation.getEmpById(2);System.out.println("[注解方式]emp信息-" + emp.getId() + "-" + emp.getName() + "-" + emp.getSalary());Dept dept = emp.getDept();System.out.println("[注解方式]dept信息-" + dept.getId() + "-" + dept.getDepName());if (sqlSession != null) {sqlSession.close();}}
}
public class DeptMapperAnnotationTest {//属性private SqlSession sqlSession;private DeptMapperAnnotation deptMapperAnnotation;//编写方法完成初始化@Beforepublic void init() {sqlSession = MyBatisUtils.getSqlSession();deptMapperAnnotation = sqlSession.getMapper(DeptMapperAnnotation.class);System.out.println("deptMapperAnnotation=" + deptMapperAnnotation.getClass());}@Testpublic void getDeptById() {Dept dept = deptMapperAnnotation.getDeptById(1);System.out.println("[注解方式]dept信息-" + dept.getId() + "-" + dept.getDepName());List<Emp> emps = dept.getEmps();for (Emp emp : emps) {System.out.println("[注解方式]emp信息-" + emp.getId() + "-" + emp.getName() + "-" + emp.getSalary());}if (sqlSession != null) {sqlSession.close();}}
}

接下来我们学习, mybatis缓存…在这里插入图片描述
💐💐💐💐💐💐💐💐给个赞, 点个关注吧, 各位大佬!💐💐💐💐💐💐💐💐

💐💐💐💐💐💐💐💐祝各位2024年大吉大运💐💐💐💐💐💐💐💐💐💐
请添加图片描述

相关文章:

  • pip设置国内源:阿里云、腾讯云、清华大学源
  • leetcode144. 二叉树的前序遍历
  • python学习笔记-10
  • 新版本vue-cli打包之后没有css文件
  • 数据分析:解锁业务洞察与决策优化的关键
  • android之WindowManager悬浮框
  • C#面:C# 类的执行顺序?
  • [pmayavi][python]mayavi所有whl文件下载地址汇总
  • “探索未来之音:AI音乐创作的前沿技术与应用“
  • 安卓逆向案例——XX电影网
  • Ilya出走记:SSI的超级安全革命
  • Python面试宝典:Python中与常用的机器学习库相关的面试笔试题(1000加面试笔试题助你轻松捕获大厂Offer)
  • 设置Docker容器开机自启
  • 硬件开发笔记(二十一):外部搜索不到的元器件封装可尝试使用AD21软件的“ManufacturerPart Search”功能
  • 动态规划:Leetcode 739. 每日温度
  • cookie和session
  • Elasticsearch 参考指南(升级前重新索引)
  • gf框架之分页模块(五) - 自定义分页
  • Idea+maven+scala构建包并在spark on yarn 运行
  • MySQL数据库运维之数据恢复
  • MySQL用户中的%到底包不包括localhost?
  • Netty 框架总结「ChannelHandler 及 EventLoop」
  • PHP CLI应用的调试原理
  • ucore操作系统实验笔记 - 重新理解中断
  • VuePress 静态网站生成
  • 闭包,sync使用细节
  • 二维平面内的碰撞检测【一】
  • 互联网大裁员:Java程序员失工作,焉知不能进ali?
  • 简析gRPC client 连接管理
  • 深度学习入门:10门免费线上课程推荐
  • 主流的CSS水平和垂直居中技术大全
  • ionic入门之数据绑定显示-1
  • 智能情侣枕Pillow Talk,倾听彼此的心跳
  • ​【数据结构与算法】冒泡排序:简单易懂的排序算法解析
  • # 深度解析 Socket 与 WebSocket:原理、区别与应用
  • #我与Java虚拟机的故事#连载14:挑战高薪面试必看
  • ( 用例图)定义了系统的功能需求,它是从系统的外部看系统功能,并不描述系统内部对功能的具体实现
  • (16)UiBot:智能化软件机器人(以头歌抓取课程数据为例)
  • (20)docke容器
  • (52)只出现一次的数字III
  • (C语言)共用体union的用法举例
  • (Repost) Getting Genode with TrustZone on the i.MX
  • (八)光盘的挂载与解挂、挂载CentOS镜像、rpm安装软件详细学习笔记
  • (草履虫都可以看懂的)PyQt子窗口向主窗口传递参数,主窗口接收子窗口信号、参数。
  • (二)学习JVM —— 垃圾回收机制
  • (附源码)c#+winform实现远程开机(广域网可用)
  • (附源码)springboot美食分享系统 毕业设计 612231
  • (附源码)springboot猪场管理系统 毕业设计 160901
  • (转)memcache、redis缓存
  • (转)详解PHP处理密码的几种方式
  • (最简单,详细,直接上手)uniapp/vue中英文多语言切换
  • *p++,*(p++),*++p,(*p)++区别?
  • .\OBJ\test1.axf: Error: L6230W: Ignoring --entry command. Cannot find argumen 'Reset_Handler'
  • .bat批处理(四):路径相关%cd%和%~dp0的区别
  • .cfg\.dat\.mak(持续补充)