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

mybatis实现增删改查1

文章目录

  • 19.MyBatis
    • 查询单行数据
        • `@MapperScan`
    • 结果映射
      • 配置核心文件
      • @Results自定义映射到实体的关系
    • 多行数据查询-完整过程
    • 插入数据
      • 配置mybatis 控制台日志
    • 更新数据
    • 删除数据
    • 小结
    • 通过id复用结果映射模板
    • xml处理结果映射

19.MyBatis

数据库访问 MyBatis,MyBatis-Plus 国内很常用,掌握了 MyBatis,MyBatis-Plus 就会了大部分了。MyBatis-Plus

附加的功能需要单独学习。我们以 MyBatis 来自介绍 Spring Boot 集成 ORM 框架。

MyBatis 使用最多的是 mapper xml 文件编写 SQL 语句。本章使用 MyBatis 的注解,JDK 新特性文本块,以

及 Record 完成 java 对象和表数据的处理。

单表CRUD

首先向 blog 数据库的 article 表添加新的文章,以及修改,查询文章。在新工程 Lession10-MyBatis 集成 MyBatis 框架。依赖需要 mysql 驱动、mybatis 依赖,Lombok。

创建工程

image-20250402214317444

添加依赖

image-20250402214426393

查询单行数据

image-20250402231008509

application.yml

#HikariCP 是一个高性能的 Java 数据库连接池,也是 Spring Boot 的默认数据源实现。
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
#配置数据库的基本属性
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/school?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false
spring.datasource.username=root
spring.datasource.password=yanyu666

数据实体

package com.yanyu.mybatis1.po;import lombok.Data;/*** @Author yanyu666_508200729@qq.com* @Date 2025/4/2 22:24* @description:*/
@Data
//  表的字段名字 与实例变量一致,才能映射,或者单独配置,使其支持 驼峰
public class StudentPO {private Integer id;private String name;private String stuid;private String major;}
@MapperScan

@MapperScan 是 MyBatis 和 MyBatis-Spring 提供的一个注解,用于指定 MyBatis 的 Mapper 接口所在的包路径,从而让 Spring 容器能够自动扫描并注册这些 Mapper 接口为 Bean。它通常用于简化 MyBatis 的配置过程。

作用

  • 自动扫描 Mapper 接口@MapperScan 注解可以指定一个或多个包路径,Spring 容器会自动扫描这些包路径下的所有接口,并将这些接口注册为 Spring 的 Bean。
  • 简化配置:在传统的 MyBatis 配置中,通常需要手动在 Spring 配置文件中声明每个 Mapper 接口的 Bean。使用 @MapperScan 后,可以通过注解的方式自动完成这些操作,减少了配置的工作量。

使用方法

@MapperScan 注解通常放在 Spring 的配置类(如 @Configuration 类)或 Spring Boot 的主应用类(如 @SpringBootApplication 类)上。它可以通过以下方式使用:

单个包路径

java复制

@MapperScan("com.yanyu.mybatis1.mapper")
public class MyApplication {
}

在上面的代码中,@MapperScan 指定了一个包路径 com.yanyu.mybatis1.mapper,Spring 容器会扫描该包路径下的所有接口,并将这些接口注册为 Spring 的 Bean。

启动类:指定扫描的接口

package com.yanyu.mybatis1;import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;@SpringBootApplication
@MapperScan("com.yanyu.mybatis1.mapper")
public class Mybatis1Application {public static void main(String[] args) {SpringApplication.run(Mybatis1Application.class, args);}}

查询接口

package com.yanyu.mybatis1.mapper;import com.yanyu.mybatis1.po.StudentPO;
import org.apache.ibatis.annotations.Param;import org.apache.ibatis.annotations.Select;/*** @Author yanyu666_508200729@qq.com* @Date 2025/4/2 22:30* @description:*/
//@MapperScan("com.yanyu.mybatis1.mapper")  会自动扫面改接口的资源,并注册到容器
public interface StudentMapper {
//      按主键查询@Select("""select id,name,stuid,majorfrom student where id = #{studentId}""")
//        查询StudentPO selectById(@Param("studentId") Integer id);}

单元测试

package com.yanyu.mybatis1;import com.yanyu.mybatis1.mapper.StudentMapper;
import com.yanyu.mybatis1.po.StudentPO;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;/*** @Author yanyu666_508200729@qq.com* @Date 2025/4/2 22:57* @description:*/
@SpringBootTest
public class MyBatisTest {@AutowiredStudentMapper studentMapper;@Testvoid test1(){StudentPO studentPO = studentMapper.selectById(1);System.out.println(studentPO);}}

image-20250402232354366

结果映射

配置核心文件

image-20250402232616100

image-20250402232737079

字段名                实体实例变量名
name                   name
user_name              userName

@Results自定义映射到实体的关系

package com.yanyu.mybatis1.mapper;import com.yanyu.mybatis1.po.StudentPO;
import org.apache.ibatis.annotations.Param;import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;/*** @Author yanyu666_508200729@qq.com* @Date 2025/4/2 22:30* @description:*/
//@MapperScan("com.yanyu.mybatis1.mapper")  会自动扫面改接口的资源,并注册到容器
public interface StudentMapper {
//      按主键查询@Select("""select id,name,stuid,majorfrom student where id = #{studentId}""")
//        自定义查询结果映射关系@Results(id = "zidingyi",value = {@Result(id = true,column = "id",property = "id"),
//                id = true 说明字段id 是主键                 与实体一致@Result(column = "name",property = "name"),@Result(column = "stuid",property = "stuid"),@Result(column = "major",property = "major")
//                可以根据实体的名字,进行自定义,来处理字段名与实体不一致问题})StudentPO selectById(@Param("studentId") Integer id);}

多行数据查询-完整过程

  • 以集合进行处理
  • image-20250405222029224
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>3.4.4</version><relativePath/> <!-- lookup parent from repository --></parent><groupId>com.yanyu</groupId><artifactId>mybatis2</artifactId><version>0.0.1-SNAPSHOT</version><name>mybatis2</name><description>mybatis2</description><url/><licenses><license/></licenses><developers><developer/></developers><scm><connection/><developerConnection/><tag/><url/></scm><properties><java.version>17</java.version></properties><dependencies>
<!--        mybatis 添加--><dependency><groupId>org.mybatis.spring.boot</groupId><artifactId>mybatis-spring-boot-starter</artifactId><version>3.0.4</version></dependency>
<!--MySQL  驱动--><dependency><groupId>com.mysql</groupId><artifactId>mysql-connector-j</artifactId><scope>runtime</scope></dependency>
<!--        添加Lombok--><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><dependency><groupId>org.mybatis.spring.boot</groupId><artifactId>mybatis-spring-boot-starter-test</artifactId><version>3.0.4</version><scope>test</scope></dependency></dependencies><build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><configuration><annotationProcessorPaths><path><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId></path></annotationProcessorPaths></configuration></plugin><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><excludes><exclude><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId></exclude></excludes></configuration></plugin></plugins></build></project>
  • 利用 lombok 编写数据映射实体类
spring.application.name=mybatis2
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/school
spring.datasource.username=root
spring.datasource.password=yanyu666#配置日志
mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
#开启驼峰
mybatis.configuration.map-underscore-to-camel-case=true# 指定扫描的  xml  目录
mybatis.mapper-locations=classpath:/mappers/**/*.xml
#mappers 下面的任意目录  的  任意  xml
package com.yanyu.mybatis2.po;import lombok.Data;/*** @Author yanyu666_508200729@qq.com* @Date 2025/4/5 22:05* @description:*/
@Data
public class StudentPO {private Integer id;private String name;private String stuid;private String major;}
  • 设计数据操作接口
package com.yanyu.mybatis2.mapper;import com.yanyu.mybatis2.po.StudentPO;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;import java.util.List;/*** @Author yanyu666_508200729@qq.com* @Date 2025/4/5 22:03* @description:*/
public interface StudentDao {
//    查询所有的学生信息,返回的,应该是 list@Select("""select * from student""")@Results(id = "student" ,value ={@Result(id = true,column = "id",property = "id"),@Result(column = "name",property = "name"),@Result(column = "stuid",property = "stuid"),@Result(column = "major",property = "major")})List<StudentPO> selectAll();//   所有的结果依次映射为一个集合}
  • 设定扫描路径,保证接口注入IOC
package com.yanyu.mybatis2;import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;@SpringBootApplication
@MapperScan("com.yanyu.mybatis2.mapper")
public class Mybatis2Application {public static void main(String[] args) {SpringApplication.run(Mybatis2Application.class, args);}}
  • 单元测试
package com.yanyu.mybatis2;import com.yanyu.mybatis2.mapper.StudentDao;
import com.yanyu.mybatis2.po.StudentPO;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;import java.util.List;@SpringBootTest
class Mybatis2ApplicationTests {@Testvoid contextLoads() {}@AutowiredStudentDao studentDao;@Testvoid test1(){List<StudentPO> studentPOS = studentDao.selectAll();System.out.println(studentPOS);}}
  • 结果
[StudentPO(id=1, name=烟雨1, stuid=1001, major=计算机应用技术), StudentPO(id=3, name=烟雨3, stuid=1003, major=计算机应用技术), StudentPO(id=4, name=烟雨2, stuid=1002, major=计算机应用技术), StudentPO(id=5, name=烟雨4, stuid=1004, major=计算机应用技术)]
2025-04-05T22:18:20.704+08:00  INFO 32372 --- [mybatis2] [ionShutdownHook] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
2025-04-05T22:18:20.758+08:00  INFO 32372 --- [mybatis2] [ionShutdownHook] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.Process finished with exit code 0

插入数据

配置mybatis 控制台日志

mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl 是 MyBatis 配置中用于指定日志实现的属性。它用于控制 MyBatis 的日志输出方式,通常用于开发阶段,方便开发者查看 SQL 执行的详细信息。

作用

  • 日志实现log-impl 属性用于指定 MyBatis 使用的日志实现类。MyBatis 支持多种日志框架,通过设置该属性,可以指定使用特定的日志实现。
  • 调试用途:在开发阶段,将日志输出到控制台(StdOutImpl)可以帮助开发者快速查看 SQL 执行情况、参数传递、查询结果等信息,从而方便调试和优化代码。

常见的日志实现

MyBatis 提供了多种日志实现,可以通过 log-impl 属性指定。以下是一些常见的日志实现类:

  1. org.apache.ibatis.logging.stdout.StdOutImpl

    • 将日志输出到控制台(标准输出流)。这是最常用的日志实现,适用于开发阶段。

    • 示例配置:

      properties复制

      mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
      #配置控制台日志
      mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
      #开启驼峰与  _ 
      mybatis.configuration.map-underscore-to-camel-case=true
      

      接口定义

      image-20250403000934905

StudentPO selectById(@Param("studentId") Integer id);
//        添加数据  开启了主键自增,就不需要再写主键@Insert("""insert into student(name,stuid,major)values (#{name},#{stuid},#{major})""")int insertStudent(StudentPO studentPO);//  执行后返回结果
/*  insert into student(name,stuid,major)  对应  表的字段名字values (#={name},#={stuid},#={major})  对应实体的实例变量名字* */
@AutowiredStudentMapper studentMapper;@Testvoid test2(){StudentPO studentPO = new StudentPO();studentPO.setName("烟雨3");studentPO.setStuid("1003");studentPO.setMajor("计算机应用技术");int i = studentMapper.insertStudent(studentPO);System.out.println("1:数据插入成功" + i);}

日志:

image-20250403000044806

更新数据

 @Update("""update student set name=#{name} where id = #{id}""")int updateStudentName(Integer id,String name);
@AutowiredStudentMapper studentMapper;
@Testvoid test3(){int i = studentMapper.updateStudentName(2, "烟雨江南");System.out.println("显示1 说明更新成功:" + i);}

image-20250403001553226

删除数据

//删除@Delete("""delete from student where name=#{name}""")int deleteStudent(String name);
 @AutowiredStudentMapper studentMapper;  
@Testvoid test4(){int i = studentMapper.deleteStudent( "烟雨江南");System.out.println("显示1 说明更新成功:" + i);}

image-20250403001949732

image-20250403002014222

小结

MyBatis注解开发
1.加入mybatis的starter , mysql驱动(8.0.32)
2.创建实体类 XXXPO , XXXEntity , XXXDomain
3.创建Mapper接口, 在接口中定义方法, 在方法的上面使用合适的注解
@Select:查询 ,使用@Results和@Result做结果映射。
@Insert:新增
@Update:更新
@Delete:删除

4.在启动上面,加入@MapperScan
@MapperScan(basePackages = “com.yanyu.mybatis.mapper”)

5.application.properties
1)定义数据库连接
2)mybatis设置
日志
驼峰命名支持


通过id复用结果映射模板

  • 以集合进行处理
  • image-20250405222029224
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>3.4.4</version><relativePath/> <!-- lookup parent from repository --></parent><groupId>com.yanyu</groupId><artifactId>mybatis2</artifactId><version>0.0.1-SNAPSHOT</version><name>mybatis2</name><description>mybatis2</description><url/><licenses><license/></licenses><developers><developer/></developers><scm><connection/><developerConnection/><tag/><url/></scm><properties><java.version>17</java.version></properties><dependencies>
<!--        mybatis 添加--><dependency><groupId>org.mybatis.spring.boot</groupId><artifactId>mybatis-spring-boot-starter</artifactId><version>3.0.4</version></dependency>
<!--MySQL  驱动--><dependency><groupId>com.mysql</groupId><artifactId>mysql-connector-j</artifactId><scope>runtime</scope></dependency>
<!--        添加Lombok--><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><dependency><groupId>org.mybatis.spring.boot</groupId><artifactId>mybatis-spring-boot-starter-test</artifactId><version>3.0.4</version><scope>test</scope></dependency></dependencies><build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><configuration><annotationProcessorPaths><path><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId></path></annotationProcessorPaths></configuration></plugin><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><excludes><exclude><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId></exclude></excludes></configuration></plugin></plugins></build></project>
  • 利用 lombok 编写数据映射实体类
spring.application.name=mybatis2
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/school
spring.datasource.username=root
spring.datasource.password=yanyu666#配置日志
mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
#开启驼峰
mybatis.configuration.map-underscore-to-camel-case=true# 指定扫描的  xml  目录
mybatis.mapper-locations=classpath:/mappers/**/*.xml
#mappers 下面的任意目录  的  任意  xml
package com.yanyu.mybatis2.po;import lombok.Data;/*** @Author yanyu666_508200729@qq.com* @Date 2025/4/5 22:05* @description:*/
@Data
public class StudentPO {private Integer id;private String name;private String stuid;private String major;}
  • 设计数据操作接口
package com.yanyu.mybatis2.mapper;import com.yanyu.mybatis2.po.StudentPO;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;import java.util.List;/*** @Author yanyu666_508200729@qq.com* @Date 2025/4/5 22:03* @description:*/
public interface StudentDao {
//    查询所有的学生信息,返回的,应该是 list@Select("""select * from student""")@Results(id = "student" ,value ={@Result(id = true,column = "id",property = "id"),@Result(column = "name",property = "name"),@Result(column = "stuid",property = "stuid"),@Result(column = "major",property = "major")})List<StudentPO> selectAll();//   所有的结果依次映射为一个集合}
  • 设定扫描路径,保证接口注入IOC
package com.yanyu.mybatis2;import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;@SpringBootApplication
@MapperScan("com.yanyu.mybatis2.mapper")
public class Mybatis2Application {public static void main(String[] args) {SpringApplication.run(Mybatis2Application.class, args);}}
  • 单元测试
package com.yanyu.mybatis2;import com.yanyu.mybatis2.mapper.StudentDao;
import com.yanyu.mybatis2.po.StudentPO;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;import java.util.List;@SpringBootTest
class Mybatis2ApplicationTests {@Testvoid contextLoads() {}@AutowiredStudentDao studentDao;@Testvoid test1(){List<StudentPO> studentPOS = studentDao.selectAll();System.out.println(studentPOS);}}
  • 结果
[StudentPO(id=1, name=烟雨1, stuid=1001, major=计算机应用技术), StudentPO(id=3, name=烟雨3, stuid=1003, major=计算机应用技术), StudentPO(id=4, name=烟雨2, stuid=1002, major=计算机应用技术), StudentPO(id=5, name=烟雨4, stuid=1004, major=计算机应用技术)]
2025-04-05T22:18:20.704+08:00  INFO 32372 --- [mybatis2] [ionShutdownHook] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
2025-04-05T22:18:20.758+08:00  INFO 32372 --- [mybatis2] [ionShutdownHook] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.Process finished with exit code 0

注解中的映射
1)@Results和@Result
2)@ResultMap 可以直接复用以前定义好的 映射模板

@ResultMap使用方式:
第一种:先通过@Results定义列的映射关系, @ResultMap(value=“@Result的id”)

package com.yanyu.mybatis2.mapper;import com.yanyu.mybatis2.po.StudentPO;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;import java.util.IdentityHashMap;
import java.util.List;/*** @Author yanyu666_508200729@qq.com* @Date 2025/4/5 22:03* @description:*/
public interface StudentDao {
//    查询所有的学生信息,返回的,应该是 list@Select("""select * from student""")@Results(id = "student" ,value ={@Result(id = true,column = "id",property = "id"),@Result(column = "name",property = "name"),@Result(column = "stuid",property = "stuid"),@Result(column = "major",property = "major")})List<StudentPO> selectAll();//   所有的结果依次映射为一个集合
//    复用上面的结果映射关系  id@Select("""select * from student where id = #{id}""")@ResultMap("student" )//直接借助  id  使用上面对应的映射关系StudentPO selectById(Integer id);}

xml处理结果映射

在xml中定义<resultMap id="xxx"> ,在代码中使用@ResultMap(value="xml的id")

image-20250405224832057

<?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.yanyu.mybatis2.mapper.StudentDao" >
<!--映射实体类--><resultMap id="StudentXML" type="com.yanyu.mybatis2.po.StudentPO"><!--        主键--><id column="id" property="id"/><!--        普通的字段--><result column="name" property="name"/><result column="stuid" property="stuid"/><result column="major" property="major"/></resultMap></mapper>
spring.application.name=mybatis2
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/school
spring.datasource.username=root
spring.datasource.password=yanyu666#配置日志
mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
#开启驼峰
mybatis.configuration.map-underscore-to-camel-case=true# 指定扫描的  xml  目录
mybatis.mapper-locations=classpath:/mappers/**/*.xml
#mappers 下面的任意目录  的  任意  xml

image-20250405225058947

  • 修改xml
<?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.yanyu.mybatis2.mapper.StudentDao" >
<!--映射实体类--><resultMap id="StudentXML" type="com.yanyu.mybatis2.po.StudentPO"><!--        主键--><id column="id" property="id"/><!--        普通的字段--><result column="name" property="name"/><result column="stuid" property="stuid"/><result column="major" property="major"/></resultMap></mapper>

image-20250405230117891

相关文章:

  • 发布一个npm包,更新包,删除包
  • Web开发-JavaEE应用JNDI注入RMI服务LDAP服务DNS服务高版本限制绕过
  • Hadoop----高可用搭建
  • 【Redis】缓存三剑客问题实践(上)
  • Android JNI开发中头文件引入的常见问题与解决方案​,提示:file not found
  • 使用 LlamaIndex Workflows 与 Elasticsearch
  • Android 中实现图片翻转动画(卡片翻转效果)
  • Selenium 在爬取过程中,网络响应被退出的解决方案
  • C++算法(13):如何高效读取并存储未知数量的空格分隔数字
  • C语言高频面试题——sizeof和strlen的区别
  • 进程的同步和互斥
  • Seata 分布式事务 快速开始
  • Crawl4AI:打破数据孤岛,开启大语言模型的实时智能新时代
  • 597页PPT丨流程合集:流程梳理方法、流程现状分析,流程管理规范及应用,流程绩效的管理,流程实施与优化,流程责任人的角色认知等
  • Docker Compose常用命令
  • 公路路面病害检测
  • 数据结构:顺序表的实现
  • 使用 Spring Boot Admin 通过图形界面查看应用配置信息的完整配置详解,包含代码示例和注释,最后以表格总结关键配置
  • 使用 rebase 轻松管理主干分支
  • 描述城市出行需求模式的复杂网络视角:大规模起点-目的地需求网络的图论分析
  • 持续更新丨伊朗官员:港口爆炸已致5人死亡超700人受伤
  • 艺术与医学的对话,瑞金医院办了一个展览
  • 特朗普政府称将恢复被终止的外国学生合法身份
  • 五矿地产:今年要确保债务“不爆雷”、交付“不烂尾”
  • 中越海警2025年第一次北部湾联合巡逻圆满结束
  • 魔都眼·上海车展⑤|被主播包围的新车