jacoco功能测试-代码覆盖率

news2024/12/29 11:06:34

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

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

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

相关文章

BGP总结

前言 我们从动态路由协议的应用范围可以分为IGP(内部网关协议)和EGP(外部网关协议)。 IGP协议追求: 无环(选路佳)收敛快占用资源少 EGP协议的追求 可控性强(管理员可以方便进行…

Rx.NET in Action 第二章学习笔记

Part 1 初入反应式扩展 2 Hello, Rx 本章节涵盖的内容: 不使用Rx的工作方式向项目中添加Rx创建你的第一个Rx应用程序 Rx 的目标是协调和统筹来自社交网络、传感器、用户界面事件等不同来源的基于事件的异步计算。例如,建筑物周围的监控摄像头和移动传感器会在有人靠…

激活函数总结(三):激活函数补充

激活函数总结(三):激活函数补充 1 引言2 激活函数2.1 Softmax激活函数2.2 Softplus激活函数2.3 Mish激活函数2.4 Maxout激活函数 3. 总结 1 引言 在前面的文章中已经介绍了过去大家较为常见的激活函数 (Sigmoid、Tanh、ReLU、Leaky ReLU、PR…

42 | 航空公司客户价值分析

民航的竞争除了三大航空公司之间的竞争之外,还将加入新崛起的各类小型航空公司、民营航空公司,甚至国外航空巨头。航空产品生产过剩,产品同质化特征愈加明显,于是航空公司从价格、服务间的竞争逐渐转向对客户的竞争。 目前航空公司已积累了大量的会员档案信息和其乘坐航班…

vscode debug python 带参数

两种方法 第一种: 1,侧边栏选择运行和调试 2,请先创建一个launch.json文件 3,并选择配置文件为python文件 此时你的工作目录下会多一个目录.vscode和该目录下一个launch.json文件,该文件则配置了你的debug配置。在…

JZ40最小的K个数

题目地址:最小的K个数_牛客题霸_牛客网 题目回顾: 解题思路: 注意本题不需要去重。 最简单的方法:排序后数组顺序是由小到大的,也就是说此时数组前k个数就是我们要求的结果。 整体代码: public ArrayLi…

WPF 界面结构化处理

文章目录 概要一、xaml界面结构化处理二、逻辑树与视觉树 概要 WPF 框架是开源的,但是不能跨平台,可以使用MAUI,这个框架可以跨平台,WPF源码可以在github上下载,下载地址:https://gitbub.com/dotnet/wpf。…

【推荐系统】wss课程-排序

排序01-多目标模型 这节课的内容是推荐系统排序的多目标模型。这节课的内容分两部分。 - 第一部分是模型结构。模型把用户特征、物品特征、统计特征、场景特征作为输入,输出对多个指标的预估。 - 第二部分内容是降采样和校准。在实际的推荐系统中,正负…

Mybatis三剑客(一)在springboot中自动生成Mybatis【generator】

1、pom.xml中新增plugin <plugin><groupId>org.mybatis.generator</groupId><artifactId>mybatis-generator-maven-plugin</artifactId><version>1.3.7</version><configuration><overwrite>true</overwrite><…

Dynamic Web TWAIN Crack

Dynamic Web TWAIN Crack 文件编辑 提供 GUI 和非 GUI 图像编辑器 内置基本图像编辑界面&#xff0c;如旋转、裁剪、镜像、翻转、擦除和更改图像大小 支持向图像添加彩色矩形 支持文字注释 提供图像交换功能 支持清除图像的指定区域并用颜色填充清除的区域 内置变焦 提供多图像…

Simulink建模:位运算

本文研究Simulink中常用的按位运算的建模方法。 文章目录 1 引入2 位运算模块2.1 移位模块2.1 按位逻辑运算 3 代码生成4 位运算的应用4.1DBC矩阵解析4.2 bool信号打包 5 总结 1 引入 在计算机的基础课中&#xff0c;学过把一个十进制数转换成二进制数。例如&#xff0c;十进…

每天一道leetcode:712. 两个字符串的最小ASCII删除和(动态规划中等)

今日份题目&#xff1a; 给定两个字符串s1 和 s2&#xff0c;返回 使两个字符串相等所需删除字符的 ASCII 值的最小和 。 示例1 输入: s1 "sea", s2 "eat" 输出: 231 解释: 在 "sea" 中删除 "s" 并将 "s" 的值(115)加入…

【【萌新的STM32学习-8】】

萌新的STM32学习-8 STM32CubeMX 是由 ST 公司开发的图形化代码自动生成工具&#xff0c;能够快速生成初始化代码&#xff0c; 如配置 GPIO&#xff0c;时钟树&#xff0c;中间件等&#xff0c;使用户专注于业务代码的开发。现在 ST 主推 HAL 库代码&#xff0c; 经典的标准外设…

82. 删除排序链表中的重复元素 II

题目链接&#xff1a;力扣&#xff08;LeetCode&#xff09;官网 - 全球极客挚爱的技术成长平台 解题思路&#xff1a;设置一个新的哑元节点result&#xff0c;作为头节点&#xff0c;将head中不重复地节点依次链接到哑元节点后面&#xff0c;最后返回result.next 初始值&…

Dynamic CRM开发 - 实体介绍

实体简介 在CRM中,实体(Entity)是数据的基本载体,也是构建业务逻辑网络的基础节点。 实体可以理解为数据库中的一张表(实体中的字段对应数据库表的字段),比如创建一个实体存储客户信息,创建一个实体存储产品信息,产品实体里可以创建一个查找类型的字段(类似表的外键)…

尚医通(医院预约挂号系统)笔记

文章目录 一. 登录系统1. 手机登录1.1 业务流程1.2 代码1.3 JWT 2. 微信登陆2.1 业务流程2.2 代码2.3 OAthu2 3. 用户认证与网关整合 二. 预约挂号1. 业务流程及模块设计 一. 登录系统 1. 手机登录 1.1 业务流程 传入手机号和验证码校验手机号和验证码是否为空校验手机验证码…

阿里云新用户和老用户是如何界定的?产品首购资格是什么?

阿里云新用户条件是什么&#xff1f;针对新用户优惠有哪些&#xff1f;阿里云新用户怎么算&#xff1f;新用户购买云服务器、域名等更优惠&#xff0c;如何获取新用户特价资格&#xff1f;阿里云新用户是指从未购买阿里云产品的用户&#xff08;域名除外&#xff09;&#xff0…

《TCP IP网络编程》第十六章

第 16 章 关于 I/O 流分离的其他内容 16.1 分离 I/O 流 「分离 I/O 流」是一种常用表达。有 I/O 工具可区分二者&#xff0c;无论采用哪种方法&#xff0c;都可以认为是分离了 I/O 流。 2次 I/O 流分离&#xff1a; 第一种是第 10 章的「TCP I/O 过程」分离。通 shutdown(soc…

英语——时态

动词随着所表现出的时间而改变的形态&#xff0c;称为时态&#xff0c;包含以下12种 现在过去将来一般一般现在时一般过去时一般将来时进行现在进行时过去进行式将来进行时完成现在完成时过去完成时将来完成时完成进行现在完成进行时过去完成进行时将来完成进行时 1 现在时 …

考公-判断推理-类比推理

第七节课 例题 例题 例题 例题 目无全牛&#xff1a;很熟练 不以为然&#xff1a;不认为正确 不孚众望&#xff1a;不能让人信服 例题 步人后尘&#xff1a;走别人的老路 例题 见义勇为是助人为乐的一种 例题 例题-全同 例题 并列关系 例题 例题 例题 例题 进士…