day54_spring整合mybatis

news2024/9/20 9:37:26

Spring+Mybatis整合【重点】

Spring学完了,主要学习Spring两个内容:IOC+AOP

利用这两个知识来完成spring和mybatis的整合

  • IOC: 控制反转,用来创建对象
    • XxxService
    • 通过数据源创建数据库连接
    • 创建SqlSessionFactory
    • 创建SqlSession
    • 获得XxxMapper代理对象
  • AOP: 面向切面
    • 控制事务

具体的整合思路

  1. 创建项目
  2. 导入依赖
    1. spring依赖
    2. aop依赖
    3. mybatis依赖
    4. 数据库驱动依赖
    5. 连接池依赖
    6. 日志依赖
    7. 专业用于spring整合mybatis依赖
    8. spring-jdbc依赖,用于Dao层支持
  3. 配置文件
    1. spring配置文件
      1. 基本的IOC,DI扫描注解配置
      2. 加载配置文件
      3. 配置数据源
      4. 配置关于Mybatis
    2. mybatis配置文件
    3. db配置文件
    4. log4j配置文件
  4. 具体的业务代码
    1. UserService+UserServiceImpl
    2. UserMapper.java+ UserMapper.xml
  5. 测试

1.1 创建项目

1.2 依赖

    <dependencies>
        <!-- spring核心依赖(4个) -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>5.1.6.RELEASE</version>
        </dependency>

        <!-- 切面 -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aspects</artifactId>
            <version>5.1.6.RELEASE</version>
        </dependency>

        <!-- spring支持Dao -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>5.1.6.RELEASE</version>
        </dependency>
        <!-- 单元测试 -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.1</version>
            <scope>test</scope>
        </dependency>
        <!-- mybatis -->
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis</artifactId>
            <version>3.5.7</version>
        </dependency>
        <!-- 数据库驱动 -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.47</version>
        </dependency>
        <!-- 日志 -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        <!-- 分页插件 -->
        <dependency>
            <groupId>com.github.pagehelper</groupId>
            <artifactId>pagehelper</artifactId>
            <version>5.3.0</version>
        </dependency>
        <!-- 数据库连接池 -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>1.2.8</version>
        </dependency>
        <!-- spring整合mybatis专业包 -->
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis-spring</artifactId>
            <version>1.3.1</version>
        </dependency>
        <!-- 小辣椒 -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.12</version>
        </dependency>
    </dependencies>

1.3 配置文件

1.3.1 db.properties

jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/java2217?useSSL=false
jdbc.username=root
jdbc.password=123456
jdbc.initialSize=5
jdbc.maxActive=20
jdbc.minIdle=3
jdbc.maxWait=0
jdbc.timeBetweenEvictionRunsMillis=0
jdbc.minEvictableIdleTimeMillis=0

1.3.2 log4j.properties

# ERROR是级别
# 级别从低到高: debug,info,warn,error (日志信息从详细到简单)
# stdout: standard output的缩写,标准输出,其实就是输出到控制台
log4j.rootLogger=error

# 因为整个mybatis日志太多,可以指定只输出自己项目中指定位置的日志
log4j.logger.com.qf.mapper=debug,stdout


# 上面的stdout,是跟此处的stdout一样
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n

1.3.3 mybatis-config.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
        "https://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>

    <!-- 交给spring配置的,这里可以删除 -->

    <settings>
        <!-- 设置使用log4j日志 -->
        <setting name="logImpl" value="LOG4J"/>
        <!-- 开启下划线转驼峰 -->
        <!-- 把数据库create_time,变成createTime列 -->
        <setting name="mapUnderscoreToCamelCase" value="true"/>
        
        <!-- 开启缓存(默认就是true) -->
        <setting name="cacheEnabled" value="true"/>
    </settings>

</configuration>

1.3.4 applicationContext.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
       https://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/aop
       http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">

    <!-- 开启注解扫描 -->
    <context:component-scan base-package="com.qf"/>

    <!-- 1 加载db.properties配置文件-->
    <context:property-placeholder location="classpath:db.properties" />

    <!-- 2 创建数据源 -->
    <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource">
        <!-- 此处是driverClassName,不是driver -->
        <property name="driverClassName" value="${jdbc.driver}"/>
        <property name="url" value="${jdbc.url}"/>
        <property name="username" value="${jdbc.username}"/>
        <property name="password" value="${jdbc.password}"/>
        <property name="initialSize" value="${jdbc.initialSize}"/>
        <property name="maxActive" value="${jdbc.maxActive}"/>
        <property name="minIdle" value="${jdbc.minIdle}"/>
        <property name="maxWait" value="${jdbc.maxWait}"/>
        <property name="timeBetweenEvictionRunsMillis" value="${jdbc.timeBetweenEvictionRunsMillis}"/>
        <property name="minEvictableIdleTimeMillis" value="${jdbc.minEvictableIdleTimeMillis}"/>
    </bean>

    <!-- 3 创建SqlSessionFactory -->
    <bean id="sessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource"/>
        <!-- 这些配置,如果在mybatis-config.xml中写过,这里就不要写 -->
        <property name="typeAliasesPackage" value="com.qf.model"/>\

        <property name="plugins">
            <set>
                <bean class="com.github.pagehelper.PageInterceptor">
                    <property name="properties">
                        <props>
                            <prop key="helperDialect">mysql</prop>
                        </props>
                    </property>
                </bean>
            </set>
        </property>

        <!-- 这些配置,也可以通过mybatis-config.xml-->
        <property name="configLocation" value="mybatis-config.xml"/>
    </bean>

    <!-- 4 扫描mapper,使mapper加入spring容器 -->
    <!-- mapper加入容器后,Service中就可以注入使用mapper -->
    <bean id="mapperScannerConfigurer" class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <!-- 此处是上面工厂的id,此处是value不是ref -->
        <property name="sqlSessionFactoryBeanName" value="sessionFactory"/>

        <!-- 扫描Mapper,产生代理对象,加入spring容器 -->
        <property name="basePackage" value="com.qf.mapper"/>
    </bean>
</beans>

1.4 业务类

1.4.1 业务层

public interface UserService {
    User findUserById(int id);
}

@Service
public class UserServiceImpl implements UserService {

    // 注入Mapper
    @Autowired
    private UserMapper userMapper;


    @Override
    public User findUserById(int id) {
        return userMapper.findUserById(id);
    }
}

1.4.2 数据层

public interface UserMapper {

    User findUserById(int id);

}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.qf.mapper.UserMapper">
    <select id="findUserById" resultType="User">
        SELECT
            *
        FROM
            tb_user
        WHERE
            id = #{id}
    </select>
</mapper>

1.5 测试

@Test
public void test() {
    String path = "applicationContext.xml";
    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(path);
    UserService service = context.getBean("userServiceImpl", UserService.class);

    User user = service.findUserById(1);
    System.out.println(user );
}

2 事务

2.1 介绍

Spring管理事务,有两种方案

  • 编程式事务
    • 需要手动给每个方法编写事务代码
    • 代码大量冗余,不灵活,对业务代码有侵入性
  • 声明式事务【学习】
    • 在applicationContext.xml文件中配置aop,声明哪些方法需要事务管理
    • 业务代码不用做任何改变,无感的就会有事务管理

2.2 目标方法

AOP编程

  • 目标方法
  • 定义切面类,定义增强的方法
  • 配置文件中"织入"

事务配置

  • 目标方法
  • spring提供了事务管理器,即增强的方法
  • 配置文件中"织入"

需求: 转账案例

public interface UserService {
    // 演示转账
    /**
     * 由谁转给谁,转多少
     * @param outId 转出的人的id
     * @param inId  收入的人的id
     * @param money 转多少钱
     * @return 是否成功
     */
    boolean transferMoney(int outId,int inId,double money);

}
    /**
     * 由谁转给谁,转多少
     * @param outId 转出的人的id
     * @param inId  收入的人的id
     * @param money 转多少钱
     * @return 是否成功
     */
    @Override
    public boolean transferMoney(int outId, int inId, double money) {

        // 转出
        int i = userMapper.updateAccountDesc(outId,money);

        System.out.println(1/0 );// 模拟,出现故障

        // 转入
        int j = userMapper.updateAccountIncr(inId,money);

        if (i >0 && j > 0) {
            return true;
        }
        return false;
    }
}
public interface UserMapper {

    int updateAccountDesc(@Param("outId") int outId, @Param("money") double money);

    int updateAccountIncr(@Param("inId") int inId, @Param("money") double money);
}
    <!-- 转出 -->
    <update id="updateAccountDesc">
        update account set money = money - #{money} where id = #{outId}
    </update>

    <!-- 转入 -->
    <update id="updateAccountIncr">
        update account set money = money + #{money} where id = #{inId}
    </update>

2.3 配置 【重点】

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
       https://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/aop
       http://www.springframework.org/schema/aop/spring-aop.xsd
       http://www.springframework.org/schema/context
       http://www.springframework.org/schema/context/spring-context.xsd
       http://www.springframework.org/schema/tx
       http://www.springframework.org/schema/tx/spring-tx.xsd">

    <!-- 开启注解扫描 -->
    <context:component-scan base-package="com.qf"/>

    <!-- 1 加载db.properties配置文件-->
    <context:property-placeholder location="classpath:db.properties" />

    <!-- 2 创建数据源 -->
    <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource">
        <property name="driverClassName" value="${jdbc.driver}"/>
        <property name="url" value="${jdbc.url}"/>
        <property name="username" value="${jdbc.username}"/>
        <property name="password" value="${jdbc.password}"/>
        <property name="initialSize" value="${jdbc.initialSize}"/>
    </bean>

    <!-- 3 创建SqlSessionFactory -->
    <bean id="sessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource"/>
        <!-- 这些配置,如果再mybatis-config.xml中写过,这里就不要写 -->
        <property name="typeAliasesPackage" value="com.qf.model"/>

        <property name="plugins">
            <set>
                <bean class="com.github.pagehelper.PageInterceptor">
                    <property name="properties">
                        <props>
                            <prop key="helperDialect">mysql</prop>
                        </props>
                    </property>
                </bean>
            </set>
        </property>

        <!-- 这些配置,也可以通过mybatis-config.xml-->
        <property name="configLocation" value="mybatis-config.xml"/>
    </bean>

    <!-- 4 扫描mapper,使mapper加入spring容器 -->
    <!-- mapper加入容器后,Service中就可以注入使用mapper -->
    <bean id="mapperScannerConfigurer" class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <!-- 此处是上面工厂的id -->
        <property name="sqlSessionFactoryBeanName" value="sessionFactory"/>

        <!-- 扫描Mapper,产生代理对象,加入spring容器 -->
        <property name="basePackage" value="com.qf.mapper"/>
    </bean>

    <!-- 5 事务管理器(相当于是切面)-->
    <bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        <!-- 需要注入数据源 -->
        <property name="dataSource" ref="dataSource"/>
    </bean>

    <!-- 6 配置事务管理的增强方法(配置事务的特性) -->
    <tx:advice id="txAdvice" transaction-manager="txManager">
        <tx:attributes>
            <!--
                name: 目标方法名,还可以模糊匹配的方法名
            -->
            <tx:method name="transferMoney"/>
            <!--<tx:method name="query*"/>-->
            <tx:method name="*"/>
        </tx:attributes>
    </tx:advice>

    <!-- 7 织入(将增强的方法作用到目标方法上) -->
    <aop:config>
        <aop:pointcut id="myPointcut" expression="execution(* com.qf.service.impl.*.*(..))"/>
        <aop:advisor advice-ref="txAdvice" pointcut-ref="myPointcut"/>
    </aop:config>
</beans>

【重要】关于事务主要是第5,6,7步

2.4 测试

    @Test
    public void test2() {
        String path = "applicationContext.xml";
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(path);
        UserService service = context.getBean("userServiceImpl", UserService.class);

        boolean b = service.transferMoney(1, 2, 100);
        System.out.println(b );
    }

2.5 事务属性配置【了解】

隔离级别 isolation=“DEFAULT”

属性值解释
DEFAULT采用当前数据库默认的级别(建议)
READ_UNCOMMITTED读未提交
READ_COMMITTED读已提交(Oracle默认级别)
REPEATABLE_READ可重复读(MySQL默认级别)
SERIALIZABLE串行化

传播行为 propagation=“REQUIRED” (默认)

REQUIRED: 不存在外部事务时,就会开启新事物;存在外部事务,则合并事务到外部事务(适合增删改频率比较高方法)

SUPPORTS: 不存在外部事务时,不开启新事物;存在外部事务,则合并事务到外部事务(适合查询的方法)

image-20221222102628251

只读 : read-only=“false” (默认)

  • true: 只读,适合查询
  • false: 默认值,可以增删改

超时: timeout , 当前事务所需数据被其他事务占用,就等待.

-1: 有数据库指定等待时间(默认)

100: 可以自己指定超时时间,单位是秒

回滚 rollback-for=“RuntimeException” ,默认只有抛出运行时异常,会回滚事务,其他异常会提交事务

可以指定rollback-for=“Exception”,这样所有异常都会回滚事务

3 注解开发事务

注解开发事务,不用编写aop:config和tx:advice,.即第6,7步不用再写

 <!-- 1,2,3,4步骤还是需要的,...->   
<!-- 5 事务管理器(相当于是切面)-->
    <bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        <!-- 需要注入数据源 -->
        <property name="dataSource" ref="dataSource"/>
    </bean>


    <!-- 6 开启事务注解 -->
    <tx:annotation-driven transaction-manager="txManager"/>
</beans>

哪里需要事务哪里加注解

@Service
@Transactional // 注解加类上,类中所有方法都有事务,加在方法上,只是单独某个方法有事务
public class UserServiceImpl implements UserService {
}
// 事务的属性,也可以在注解中配置
@Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.REQUIRED)

image-20221222111717431

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

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

相关文章

基于spring的前后端一体化积分商城系统

系统介绍 积分商城系统是一个基于Spring、MySQL和Redis等技术栈构建的全功能商城解决方案。该系统旨在为用户提供一个便捷的购物体验&#xff0c;并以积分作为支付和奖励的核心机制。 系统的核心功能包括商品浏览、购买下单、积分管理和订单处理。用户可以通过客户端访问系统…

一业余无线电爱好者因违规被罚2.4万美元,是否合理?

据一份名为《关于处罚款项的通知》&#xff0c;美国联邦通信委员会经过调查&#xff0c;对加利福尼亚州的一名业余无线电持有人菲利普J博代特&#xff08;业余电台呼号&#xff1a;N6PJB&#xff09;&#xff0c;处以巨额罚款&#xff0c;罚款金额为2.4万美元&#xff0c;折合人…

颠覆2D对象检测模型,MediaPipe 3D对象检测还原真实的对象特征

关于对象检测,我们以前分享的文章都是介绍的2D的对象检测,但是我们很多使用场景下,希望检测到的对象能够以3D的影像呈现出来,本期介绍的MediaPipe Objectron便是是用于日常对象的移动实时3D对象检测解决方案。它检测2D图像中的对象,并通过在Objectron数据集上训练的机器学…

6.17黄金反弹是否到顶,下周开盘如何布局

近期有哪些消息面影响黄金走势&#xff1f;下周黄金多空该如何研判&#xff1f; ​黄金消息面解析&#xff1a;黄金周五(6月16日)小幅收高&#xff0c;但在触及5月以来最低盘中水准后本周以下跌收官。美市尾盘&#xff0c;现货黄金收报1957.68美元/盎司&#xff0c;下跌0.19美…

干货|来自新加坡管理大学、KAUST的大模型最新进展:推荐系统、未来AI社会研究……...

点击蓝字 关注我们 AI TIME欢迎每一位AI爱好者的加入&#xff01; ChatGPT的横空出世刷新了我们对这个世界的认知和想象&#xff0c;而大型语言模型也逐渐成为学术界的研究热点。在自然语言处理、智能推荐、知识获取、智能对话等领域&#xff0c;大模型发挥着越来越重要的作用。…

自然语言处理从入门到应用——词向量的评价方法

分类目录&#xff1a;《自然语言处理从入门到应用》总目录 对于不同的学习方法得到的词向量&#xff0c;通常可以根据其对词义相关性或者类比推理性的表达能力进行评价&#xff0c;这种方式属于内部任务评价方法&#xff08;Intrinsic Evaluation&#xff09;。在实际任务中&am…

Linux学习[15]bash学习深入1---bash的功能---变量详解

文章目录 前言&#xff1a;1. bash功能2. 变量2.1 变量赋值2.2 unset取消变量2.3 环境变量 总结 前言&#xff1a; 之前在学树莓派相关内容的时候&#xff0c;对bash脚本的简单上手做了一个总结&#xff0c;并且归纳到下面三个博客。 当时参考的书为《从树莓派开始玩转linux》…

Gitlab CI/CD入门(一)Python项目的CI演示

本文将介绍CI/CD的基本概念&#xff0c;以及如何使用Gitlab来实现CI/CD。   本文介绍的CI/CD项目为个人Gitlab项目&#xff1a;gitlab_ci_test&#xff0c;访问网址为&#xff1a;https://gitlab.com/jclian91/gitlab_ci_test。 CI/CD的含义 在现代软件工程中&#xff0c;CI…

【主跑例子】 Framework01、02;QFramework00(我跟着视频的旧版本,但推荐用最新的)、01(无)、02(无)、03(无)

总体介绍 做的是 00,10,13&#xff0c;考虑做10。 11,12没下载&#xff0c;当时把这两个误认为 00,10 用到了UniRx Framework有2个 00 Unity 游戏框架搭建 2019 第一季 C# 核心知识与简易 Manager Of Managers 框架搭建 120课数 01 Unity 游戏框架搭建 2019 第二季 模块/系统…

前端Vue仿滴滴打车百度地图定位查找附近出租车或门店信息(更新版)

前端vue仿滴滴打车百度地图定位查找附近出租车或门店信息, 下载完整代码请访问uni-app插件市场地址:https://ext.dcloud.net.cn/plugin?id12982 效果图如下: # #### 使用方法 使用方法 <!-- 官方文档&#xff1a; https://dafrok.github.io/vue-baidu-map/#/zh/start/b…

五子棋:起源、原理与游戏规则、vue实现五子棋案例游戏

目录&#xff1a; 引言五子棋的历史背景五子棋的原理五子棋的游戏规则五子棋游戏的实现 5.1 创建 Vue 组件 5.2 初始化棋盘 5.3 下棋与判断胜负 5.4 渲染棋盘与棋子总结 更多知识 学习&#xff1a;https://www.processon.com/view/60504b5ff346fb348a93b4fa#map 引言 五子棋…

解密大型语言模型:从相关性中发现因果关系?

深度学习自然语言处理 原创作者&#xff1a;wkk 因果推理是人类智力的标志之一。因果关系NLP领域近年来引起了人们的极大兴趣&#xff0c;但其主要依赖于从常识知识中发现因果关系。本研究提出了一个基准数据集(CORR2CAUSE)来测试大语言模型(LLM)的纯因果推理能力。其中CORR2CA…

I/O体系结构和设备驱动程序(一)

I/O体系结构 让信息在CPU、RAM和I/O设备之间流动的数据通路称之为总线&#xff0c;即计算机内的主通信通道。所有计算机都有一条系统总线&#xff08;一种典型的系统总线是PCI总线&#xff09;&#xff0c;连接内部大部分的硬件设备。计算机内不同的总线可以通过“桥”进行连接…

lua语言的闭包设计和LClosure解读

什么是闭包 闭包是一种特殊的函数&#xff0c;它可以访问其创建时所处的环境中的变量&#xff0c;即使在函数创建后&#xff0c;环境已经不再存在&#xff0c;这些变量仍然可以被访问。 为了更好地理解闭包&#xff0c;我们可以看一个例子&#xff1a; function counter()lo…

Appium知多少

Appium我想大家都不陌生&#xff0c;这是主流的移动自动化工具&#xff0c;但你对它真的了解么&#xff1f;为什么很多同学搭建环境时碰到各种问题也而不知该如何解决。 appium为什么英语词典查不到中文含义&#xff1f; appium是一个合成词&#xff0c;分别取自“applicatio…

OpenAI官方提示词课(七)制作一个聊天机器人

大型语言模型的一个令人兴奋的方面是&#xff0c;你可以利用它来构建一个定制的聊天机器人&#xff0c;并且只需付出少量的努力。ChatGPT 的网页界面可以让你与一个大型语言模型进行对话。但其中一个很酷的功能是&#xff0c;你也可以利用大型语言模型构建你自己的定制聊天机器…

案例 | 标杆引领!人大金仓智绘数字金融

随着中央数字经济政策推进金融业数字化建设&#xff0c;数字金融已初见成效&#xff0c;但尚存在信息安全缺乏保障、转型覆盖不全面等问题。 为实现金融行业全面数字化转型升级&#xff0c;作为数据库领域国家队&#xff0c;人大金仓紧跟国家战略&#xff0c;自主研发的系列数据…

msvcp110.dll丢失原因——msvcp110.dll丢失怎么修复(最新可修复)

昨天卸载了一个垃圾软件以后&#xff0c;我的其他软件就无法打开运行&#xff0c;提示msvcp110.dll丢失&#xff0c;无法继续执行此代码。今天早上找了很多方法&#xff0c;终于把msvcp110.dll丢失的原因以及修复的方法都弄明白了。msvcp110.dll是一个非常重要的文件&#xff0…

【CVE-2022-0185】Linux kernel [文件系统挂载API] 堆溢出漏洞分析与利用

0x00.一切开始之前 CVE-2022-0185 是 2022 年初爆出来的一个位于 filesystem context 系统中的 fsconfig 系统调用中的一个堆溢出漏洞&#xff0c;对于有着 CAP_SYS_ADMIN 权限&#xff08;或是开启了 unprivileged namespace&#xff09;的攻击者而言其可以利用该漏洞完成本地…