jacoco功能测试-代码覆盖率

1、下载 jacoco

官网地址:EclEmma - JaCoCo Java Code Coverage Library

2、拷贝 jar 包 

下载好后,找到这两个文件,然后找到被测项目

3、启动 jacocoagent,监控被测项目 

java -javaagent:jacocoagent.jar=includes=*,output=tcpserver,port=6300,address=localhost,append=true -jar jacoco-demo-1.0.0.jar 
#jacoco-demo-1.0.0.jar为被测项目jar包
$ java -javaagent:jacocoagent.jar=includes=*,output=tcpserver,port=6300,address=localhost,append=true -jar jacoco-demo-1.0.0.jar
16:23:53,451 |-INFO in ch.qos.logback.classic.LoggerContext[default] - This is logback-classic version 1.4.5
16:23:53,467 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
16:23:53,483 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/E:/soft/jacoco/jacoco-0.8.10/lib/jacoco-demo-1.0.0.jar!/BOOT-INF/classes!/logback.xml]
16:23:53,499 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@4808bc9b - URL [jar:file:/E:/soft/jacoco/jacoco-0.8.10/lib/jacoco-demo-1.0.0.jar!/BOOT-INF/classes!/logback.xml] is not of type file
16:23:53,658 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [stdout]
16:23:53,658 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
16:23:53,674 |-INFO in ch.qos.logback.core.model.processor.ImplicitModelHandler - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
16:23:53,722 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [ErrorFile]
16:23:53,722 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
16:23:53,738 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@1893960929 - No compression will be used
16:23:53,738 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@1893960929 - Will use the pattern c:/logs/error/error-%d{yyyy-MM-dd}.%i.log for the active file
16:23:53,770 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@2ca923bb - The date pattern is 'yyyy-MM-dd' from file name pattern 'c:/logs/error/error-%d{yyyy-MM-dd}.%i.log'.
16:23:53,770 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@2ca923bb - Roll-over at midnight.
16:23:53,786 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@2ca923bb - Setting initial period to Sun Aug 13 16:11:32 CST 2023
16:23:53,786 |-WARN in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@2ca923bb - SizeAndTimeBasedFNATP is deprecated. Use SizeAndTimeBasedRollingPolicy instead
16:23:53,786 |-WARN in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@2ca923bb - For more information see http://logback.qos.ch/manual/appenders.html#SizeAndTimeBasedRollingPolicy
16:23:53,794 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[ErrorFile] - This appender no longer admits a layout as a sub-component, set an encoder instead.
16:23:53,794 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[ErrorFile] - To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.
16:23:53,794 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[ErrorFile] - See also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details
16:23:53,794 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[ErrorFile] - Active log file name: c:/logs/error/error.log
16:23:53,794 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[ErrorFile] - File property is set to [c:/logs/error/error.log]
16:23:53,802 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [AllFile]
16:23:53,802 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
16:23:53,802 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@333392524 - No compression will be used
16:23:53,802 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@333392524 - Will use the pattern c:/logs/all/all-%d{yyyy-MM-dd}.%i.log for the active file
16:23:53,802 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@1ebea008 - The date pattern is 'yyyy-MM-dd' from file name pattern 'c:/logs/all/all-%d{yyyy-MM-dd}.%i.log'.
16:23:53,802 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@1ebea008 - Roll-over at midnight.
16:23:53,802 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@1ebea008 - Setting initial period to Sun Aug 13 16:22:01 CST 2023
16:23:53,802 |-WARN in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@1ebea008 - SizeAndTimeBasedFNATP is deprecated. Use SizeAndTimeBasedRollingPolicy instead
16:23:53,802 |-WARN in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@1ebea008 - For more information see http://logback.qos.ch/manual/appenders.html#SizeAndTimeBasedRollingPolicy
16:23:53,802 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[AllFile] - This appender no longer admits a layout as a sub-component, set an encoder instead.
16:23:53,802 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[AllFile] - To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.
16:23:53,802 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[AllFile] - See also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details
16:23:53,802 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[AllFile] - Active log file name: c:/logs/all/all.log
16:23:53,802 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[AllFile] - File property is set to [c:/logs/all/all.log]
16:23:53,802 |-INFO in ch.qos.logback.classic.model.processor.RootLoggerModelHandler - Setting level of ROOT logger to INFO
16:23:53,802 |-INFO in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Attaching appender named [stdout] to Logger[ROOT]
16:23:53,802 |-INFO in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Attaching appender named [ErrorFile] to Logger[ROOT]
16:23:53,802 |-INFO in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Attaching appender named [AllFile] to Logger[ROOT]
16:23:53,802 |-INFO in ch.qos.logback.core.model.processor.DefaultProcessor@72d6b3ba - End of configuration.
16:23:53,802 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@1787f2a0 - Registering current configuration as safe fallback point

16:23:54,405 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@64030b91 - URL [jar:file:/E:/soft/jacoco/jacoco-0.8.10/lib/jacoco-demo-1.0.0.jar!/BOOT-INF/classes!/logback.xml] is not of type file
16:23:54,422 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [stdout]
16:23:54,422 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
16:23:54,422 |-INFO in ch.qos.logback.core.model.processor.ImplicitModelHandler - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
16:23:54,422 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [ErrorFile]
16:23:54,422 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
16:23:54,422 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@540206885 - No compression will be used
16:23:54,422 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@540206885 - Will use the pattern c:/logs/error/error-%d{yyyy-MM-dd}.%i.log for the active file
16:23:54,422 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@4d23015c - The date pattern is 'yyyy-MM-dd' from file name pattern 'c:/logs/error/error-%d{yyyy-MM-dd}.%i.log'.
16:23:54,422 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@4d23015c - Roll-over at midnight.
16:23:54,422 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@4d23015c - Setting initial period to Sun Aug 13 16:11:32 CST 2023
16:23:54,422 |-WARN in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@4d23015c - SizeAndTimeBasedFNATP is deprecated. Use SizeAndTimeBasedRollingPolicy instead
16:23:54,422 |-WARN in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@4d23015c - For more information see http://logback.qos.ch/manual/appenders.html#SizeAndTimeBasedRollingPolicy
16:23:54,422 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[ErrorFile] - This appender no longer admits a layout as a sub-component, set an encoder instead.
16:23:54,422 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[ErrorFile] - To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.
16:23:54,422 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[ErrorFile] - See also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details
16:23:54,422 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[ErrorFile] - Active log file name: c:/logs/error/error.log
16:23:54,422 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[ErrorFile] - File property is set to [c:/logs/error/error.log]
16:23:54,422 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [AllFile]
16:23:54,422 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
16:23:54,422 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@943659381 - No compression will be used
16:23:54,422 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@943659381 - Will use the pattern c:/logs/all/all-%d{yyyy-MM-dd}.%i.log for the active file
16:23:54,422 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@441cc260 - The date pattern is 'yyyy-MM-dd' from file name pattern 'c:/logs/all/all-%d{yyyy-MM-dd}.%i.log'.
16:23:54,422 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@441cc260 - Roll-over at midnight.
16:23:54,422 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@441cc260 - Setting initial period to Sun Aug 13 16:22:01 CST 2023
16:23:54,422 |-WARN in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@441cc260 - SizeAndTimeBasedFNATP is deprecated. Use SizeAndTimeBasedRollingPolicy instead
16:23:54,422 |-WARN in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@441cc260 - For more information see http://logback.qos.ch/manual/appenders.html#SizeAndTimeBasedRollingPolicy
16:23:54,422 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[AllFile] - This appender no longer admits a layout as a sub-component, set an encoder instead.
16:23:54,422 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[AllFile] - To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.
16:23:54,422 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[AllFile] - See also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details
16:23:54,422 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[AllFile] - Active log file name: c:/logs/all/all.log
16:23:54,422 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[AllFile] - File property is set to [c:/logs/all/all.log]
16:23:54,422 |-INFO in ch.qos.logback.classic.model.processor.RootLoggerModelHandler - Setting level of ROOT logger to INFO
16:23:54,422 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@73a00e09 - Propagating INFO level on Logger[ROOT] onto the JUL framework
16:23:54,422 |-INFO in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Attaching appender named [stdout] to Logger[ROOT]
16:23:54,422 |-INFO in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Attaching appender named [ErrorFile] to Logger[ROOT]
16:23:54,422 |-INFO in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Attaching appender named [AllFile] to Logger[ROOT]
16:23:54,422 |-INFO in ch.qos.logback.core.model.processor.DefaultProcessor@26dcd8c0 - End of configuration.
16:23:54,422 |-INFO in org.springframework.boot.logging.logback.SpringBootJoranConfigurator@66e889df - Registering current configuration as safe fallback point


  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v3.0.2)

[INFO ] 2023-08-13 16:23:54.557 [main] com.ybw.JacocoDemoApplication - Starting JacocoDemoApplication using Java 17.0.4.1 with PID 11912 (E:\soft\jacoco\jacoco-0.8.10\lib\jacoco-demo-1.0.0.jar started by 魏先生 in E:\soft\jacoco\jacoco-0.8.10\lib)
[INFO ] 2023-08-13 16:23:54.557 [main] com.ybw.JacocoDemoApplication - No active profile set, falling back to 1 default profile: "default"
[INFO ] 2023-08-13 16:23:55.593 [main] o.s.b.w.e.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8080 (http)
[INFO ] 2023-08-13 16:23:55.597 [main] o.a.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8080"]
[INFO ] 2023-08-13 16:23:55.597 [main] o.a.catalina.core.StandardService - Starting service [Tomcat]
[INFO ] 2023-08-13 16:23:55.597 [main] o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.5]
[INFO ] 2023-08-13 16:23:55.673 [main] o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
[INFO ] 2023-08-13 16:23:55.688 [main] o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 1042 ms
[INFO ] 2023-08-13 16:23:56.038 [main] o.a.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8080"]
[INFO ] 2023-08-13 16:23:56.054 [main] o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port(s): 8080 (http) with context path ''
[INFO ] 2023-08-13 16:23:56.054 [main] com.ybw.JacocoDemoApplication - Started JacocoDemoApplication in 2.115 seconds (process running for 2.942)

参数描述

  • includes=*:这个代表了,启动时需要进行字节码插桩的包过滤,*代表所有的class文件加载都需要进行插桩。
    • 你可以写成: includes=com.test.service.*;这个参数我们可以用来做maven多模块的覆盖率,比如我们只想查看service服务层的覆盖率,我们可以通过设置包路径的方式进行只统计当前包的覆盖率。
  • output=tcpserver:output主要四个参数
    • file: At VM termination execution data is written to the file specified in the destfile attribute.(当jvm停止掉的时候产出dump文件,即服务挂了产出dump文件)

    • tcpserver: The agent listens for incoming connections on the TCP port specified by the address and port attribute. Execution data is written to this TCP connection.(常用模式,将jacocoaget作为服务,每次通过cli包进行dump命令去获取dump包)

    • tcpclient: At startup the agent connects to the TCP port specified by the address and port attribute. Execution data is written to this TCP connection.(将jacocoagent做为客户端,向指定ip和端口的服务推送dump信息)

    • none: Do not produce any output.(不产出任何dump,dump个寂寞,忽略)

  • port=6300:这是jacoco开启的tcpserver的端口,请注意这个端口不能被占用。

  • address=localhost:这是对外开发的tcpserver的访问地址。

    • 可以配置127.0.0.1,也可以配置为实际访问ip配置为127.0.0.1的时候,dump数据只能在这台服务器上进行dump,就不能通过远程方式dump数据。配置为实际的ip地址的时候,就可以在任意一台机器上(前提是ip要通,不通都白瞎),通过ant xml或者api方式dump数据。

    • 举个栗子:我如上配置了192.168.110.1:2014作为jacoco的tcpserver启动服务,
      那我可以在任意一台机器上进行数据的dump,比如在我本机windows上用api或者xml方式调用dump。如果我配置了127.0.0.1:2014作为启动服务器,那么我只能在这台测试机上进行dump,其他的机器都无法连接到这个tcpserver进行dump

    • 如果不知道本机ip地址,可以使用0.0.0.0,这样ip地址会绑定主机ip。

  • append=true:是执行数据文件已经存在,则覆盖数据将附加到现有文件。

页面或接口调用

调用接口http://localhost:8080/user/getUser?id=1

4、cli 包 dump 生成 exec 文件(注意一定要测试完毕之后)

$ java -jar jacococli.jar dump --address localhost --port 6300 --destfile jacoco-demo.exec
[INFO] Connecting to localhost/127.0.0.1:6300.
[INFO] Writing execution data to E:\gitcode\mygit\learn\jacoco\jacoco-demo\target\jacoco-demo.exec.
  • --address localhost --port 6300 指向jacocoagent启动IP和端口

  • jacoco-demo.exec 为生成exec文件名

5、生成report 

$ java -jar jacococli.jar report jacoco-demo.exec --classfiles E:/gitcode/mygit/learn/jacoco/jacoco-demo/target/classes --sourcefiles E:/gitcode/mygit/learn/jacoco/jacoco-demo/src/main/java --html html-report --xml report.xml --encoding=utf-8
[INFO] Loading execution data file E:\gitcode\mygit\learn\jacoco\jacoco-demo\target\jacoco-demo.exec.
[INFO] Analyzing 4 classes.
  • --sourcefiles 和 --classfiles 为本地被测项目源码和字节码路径。
  • --html 为生成报告目录。

6、查看覆盖率报告

 

表格

  • Element:元素;
  • Missed Instructions    Cov:未覆盖字节码行数;
  • Missed Branches    Cov:未覆盖的分支数;
  • Cxty:圈复杂度;
  • Lines:行;
  • Methods:方法;
  • Classes:类; 

覆盖率标识

  • 条件覆盖:红钻:表示未覆盖;黄钻:表示部分覆盖;绿钻:表示全部覆盖;
  • 行覆盖:全覆盖(绿色),未覆盖(红色),半覆盖(黄色),无视(白色)

只调用http://localhost:8080/user/getUser?id=1,效果如下

调用如下接口

http://localhost:8080/user/getUser?id=1、http://localhost:8080/user/getUser?id=2、http://localhost:8080/user/getUser?id=3​​​​​​​、http://localhost:8080/user/getUser?id=5

效果如下,覆盖率为100%:

 

 

 

7、单元测试

上面都是功能测试代码覆盖率,jacoco单元测试文章可以看:

idea 测试覆盖率_idea单元测试覆盖率_xixingzhe2的博客-CSDN博客

8、demo代码

share: 分享仓库 - Gitee.com

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

Filament for Android 编译搭建(基于Ubuntu20.04系统)

一、Filament 源代码下载 github下载地址: 2、安装clang 我是直接安装clang-10 Ubuntu 20.04 ,sudo apt install clang 命令默认就是clang-10 $sudo apt-get install clang-10 # 安装 AST.h 等头文件 $sudo apt-get install libclang-10-dev $sudo …

【Linux操作系统】文件描述符fd

🔥🔥 欢迎来到小林的博客!!       🛰️博客主页:✈️林 子       🛰️博客专栏:✈️ Linux之路       🛰️社区 :✈️ 进步学堂       &#x1…

使用logback异步打印日志

文章目录 一、介绍二、运行环境三、演示项目1. 接口2. 日志配置文件3. 效果演示4. 异步输出验证 四、异步输出原理五、其他参数配置六、源码分析1. 同步输出2. 异步输出 七、总结 一、介绍 对于每一个开发人员来说,在业务代码中添加日志是至关重要的,尤…

docker基本使用方法

docker使用 1. Docker 介绍 Docker 可以让开发者打包他们的应用以及依赖包到一个轻量级、可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化。Docker 使您能够将应用程序与基础架构分开,从而可以快速交付软件。通过利用 …

Oracle 开发篇+Java通过DRCP访问Oracle数据库

标签:DRCP、Database Resident Connection Pooling、数据库驻留连接池释义:DRCP(全称Database Resident Connection Pooling)数据库驻留连接池(Oracle自己的数据库连接池技术) ★ Oracle开启并配置DRCP sq…

神码ai伪原创文章生成器软件【php源码】

大家好,本文将围绕python二级用哪个版本的软件展开说明,二级python 值不值得考是一个很多人都想弄明白的事情,想搞清楚python二级用什么软件需要先了解以下几个事情。 火车头采集ai伪原创插件截图: 问题一:安装python…

java+springboot+mysql智能社区管理系统

项目介绍: 使用javaspringbootmysql开发的社区住户综合管理系统,系统包含超级管理员、管理员、住户角色,功能如下: 超级管理员:管理员管理;住户管理;房屋管理(楼栋、房屋&#xff…

代码详解——Transformer

文章目录 整体架构Modules.pyScaledDotProductAttention SubLayers.pyMultiHeadAttentionPositionwiseFeedForward Layers.pyEncoderLayerDecoderLayer Models.pyget_pad_maskget_subsequent_maskPositionalEncodingEncoderDecoderTransformer 整体架构 源码地址(py…

电商3D产品渲染简明教程

3D 渲染让动作电影看起来更酷,让建筑设计变得栩栩如生,现在还可以帮助营销人员推广他们的产品。 从最新的《阿凡达》电影到 Spotify 的上一次营销活动,3D 的应用让一切变得更加美好。 在营销领域,3D 产品渲染可帮助品牌创建产品的…

Docker+rancher部署SkyWalking8.5并应用在springboot服务中

1.Skywalking介绍 Skywalking是一个国产的开源框架,2015年有吴晟个人开源,2017年加入Apache孵化器,国人开源的产品,主要开发人员来自于华为,2019年4月17日Apache董事会批准SkyWalking成为顶级项目,支持Jav…

Kafka消息队列学习(一)

文章目录 概述核心概念生产者示例同步 / 异步发送消息生产者参数配置ack-确认机制retries - 重试次数compression_type - 消息压缩类型 分区机制分区策略 消费者消息有序性提交和偏移量偏移量提交方式手动提交 高可用设计 SpringBoot集成Kafka基本使用传递对象消息 概述 核心概…

2023企业微信0day漏洞复现以及处理意见

2023企业微信0day漏洞复现以及处理意见 一、 漏洞概述二、 影响版本三、 漏洞复现小龙POC检测脚本: 四、 整改意见 免责声明:请勿利用文章内的相关技术从事非法测试,由于传播、利用此文所提供的信息或者工具而造成的任何直接或者间接的后果及损失&#x…

Arduino+esp32学习笔记

学习目标: 使用Arduino配置好蓝牙或者wifi模块 学习使用python配置好蓝牙或者wifi模块 学习内容(笔记): 一、 Arduino语法基础 Arduino语法是基于C的语法,C又是c基础上增加了面向对象思想等进阶语言。那就只记录没见过的。 单多…

Mysql in 查询的奇怪方向

Mysql in 查询的奇怪方向 关于表字段存储的数据为 num1,num2,num3时, 还要通过多个num1,num2入参针对该字段进行查询 建表语句 CREATE TABLE test (test_ids varchar(100) DEFAULT NULL COMMENT 保存ids 以逗号分隔 ) ENGINEInnoDB;数据项 查询语句 SELECT test_ids FROM t…

Android之版本号、版本别名、API等级对应关系(全)(一百六十二)

简介: CSDN博客专家,专注Android/Linux系统,分享多mic语音方案、音视频、编解码等技术,与大家一起成长! 优质专栏:Audio工程师进阶系列【原创干货持续更新中……】🚀 人生格言: 人生…

数据结构:选择排序

简单选择排序 选择排序是一种简单直观的排序算法。首先在未排序序列中找到最大(最小)的元素,存放到排序学列的其实位置,然后在剩余的未排序的元素中寻找最小(最大)元素,存放在已排序序列的后面…

NLP文本分类

NLP文本分类 落地实战五大利器!_kaiyuan_sjtu的博客-CSDN博客https://zhuanlan.zhihu.com/p/432619164 https://github.com/alibaba/EasyNLP/blob/master/README.cn.md

【5G 核心网】5G 多PDU会话锚点技术介绍

博主未授权任何人或组织机构转载博主任何原创文章,感谢各位对原创的支持! 博主链接 本人就职于国际知名终端厂商,负责modem芯片研发。 在5G早期负责终端数据业务层、核心网相关的开发工作,目前牵头6G算力网络技术标准研究。 博客…

Docker部署rabbitmq遇到的问题 Stats in management UI are disabled on this node

1. Stats in management UI are disabled on this node #进入rabbitmq容器 docker exec -it {rabbitmq容器名称或者id} /bin/bash#进入容器后,cd到以下路径 cd /etc/rabbitmq/conf.d/#修改 management_agent.disable_metrics_collector false echo management_age…

什么是gRPC?

1. GRPC是google开源的rpc框架 2. 核心是一个.proto的服务描述文件 3. 添加依赖的grpc相关的包,配置IDEA的grpc插件,就可以很方便的生成调用代码 4. 通过在IDEA的protobuf插件上分别执行以下两个服务,就可以生成需要的调用代码 1&#xff…