专题二:Spring源码编译

目录

下载源码

配置Gradle

配置环境变量

配置setting文件

配置Spring源码

配置文件调整

问题解决

完整配置

gradel.properties

build.gradle

settiings.gradel


在专题一: Spring生态初探中我们从整体模块对Spring有个整体的印象,现在正式从最基础的Spring模块进一步学习,第一步当然是下载源码,因为Spring是用的Gradle编译,对于我们大部分使用Maven做jar包管理的还是不太熟悉,因此记录下。

下载源码

因为公司使用的是Spring5.2.x所以就下载了这个版本,github源码地址如下:

GitHub - spring-projects/spring-framework at v5.2.6.RELEASE:

如果网络不稳定可以使用下载压缩版即可,网络稳定的话还是建议使用git clone 这样可以看到随时切换其他版本,查看不同版本提交记录:

配置Gradle

因为Spring源码编译下选择的是Gradle,所以需要配置本地环境,目前自己电脑用的mac版本,这里先使用Mac演示配置。后面有window电脑环境的时候再补充。

官网地址:

Gradle | ReleasesFind binaries and reference documentation for current and past versions of Gradle.icon-default.png?t=N7T8https://gradle.org/releases/

下载完以后是一个压缩包

解压到本地目录:

去bin目录下执行下 gradle -v 检查下下载的文件是否有问题,如果如下所示则下载正确。

配置环境变量

# 配置gradle path
export GRADLE_HOME=/自己的全路径
export PATH=$GRADLE_HOME/bin:$PATH
# 配置生效
source ~/.bash_profile

类似java,我再上面直接贴命令了,执行上述命令以后随便进入一个目录再次执行gradle -v 看下配置的环境变量是否生效。

配置setting文件

配置阿里元仓库地址

仓库服务

配置Spring源码

配置文件调整

以下是对Spring源码导入IDEA前的Gradle配置调整的总结:

  1. 修改gradle.properties文件

    • 设置Spring版本号:version=5.2.6.RELEASE
    • 增加Gradle编译时的内存分配:org.gradle.jvmargs=-Xmx2048M,这有助于处理较大的构建任务,减少内存不足的问题。
    • 开启Gradle的缓存功能:org.gradle.caching=true,这可以提高构建速度,通过缓存避免重复编译。
    • 开启Gradle并行编译:org.gradle.parallel=true,允许Gradle在多核处理器上并行执行任务,加快构建速度。
    • 开启Gradle守护进程模式:org.gradle.daemon=true,这可以保持Gradle进程持续运行,减少启动时间。
  2. 调整settings.gradle文件

    • 通常这个文件用于指定项目根目录下的所有子项目,可能需要根据Spring源码的结构进行适当的修改,以确保所有模块都能正确识别和构建。
  3. 调整build.gradle文件

    • 这个文件定义了项目的构建逻辑,包括依赖项、插件和其他构建配置。根据Spring源码的具体需求,可能需要添加或修改依赖项和插件配置。

问题解决

如果下载的版本和我一样,都是5.2.6可能有个小问题,这个包可能下载,要不自己去仓库找到放到自己本地仓库中,或者直接注释掉

//  id 'io.spring.gradle-enterprise-conventions' version '0.0.2'

完整配置

gradel.properties

# 源码的版本
version=5.2.6.RELEASE
# JVM参数家
org.gradle.jvmargs=-Xmx2048M
# 是否开启缓存
org.gradle.caching=true
# 是否开始并行
org.gradle.parallel=true
# 石佛开启守护线程
org.gradle.daemom=true
e

build.gradle

plugins {id 'io.spring.dependency-management' version '1.0.8.RELEASE' apply falseid 'org.jetbrains.kotlin.jvm' version '1.3.72' apply falseid 'org.jetbrains.dokka' version '0.10.1' apply falseid 'org.asciidoctor.jvm.convert' version '2.4.0'
//	id 'io.spring.gradle-enterprise-conventions' version '0.0.2'id 'io.spring.nohttp' version '0.0.4.RELEASE'id 'de.undercouch.download' version '4.0.0'id 'com.gradle.build-scan' version '3.2'id "com.jfrog.artifactory" version '4.12.0' apply falseid "io.freefair.aspectj" version '4.1.1' apply falseid "com.github.ben-manes.versions" version '0.24.0'
}apply from: "$rootDir/gradle/build-scan-user-data.gradle"
ext {moduleProjects = subprojects.findAll { it.name.startsWith("spring-") }javaProjects = subprojects - project(":framework-bom")withoutJclOverSlf4j = {exclude group: "org.slf4j", name: "jcl-over-slf4j"}
}configure(allprojects) { project ->apply plugin: "io.spring.dependency-management"dependencyManagement {imports {mavenBom "com.fasterxml.jackson:jackson-bom:2.10.3"mavenBom "io.netty:netty-bom:4.1.49.Final"mavenBom "io.projectreactor:reactor-bom:Dysprosium-SR7"mavenBom "io.rsocket:rsocket-bom:1.0.0-RC7"mavenBom "org.eclipse.jetty:jetty-bom:9.4.28.v20200408"mavenBom "org.jetbrains.kotlin:kotlin-bom:1.3.72"mavenBom "org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.3.5"mavenBom "org.junit:junit-bom:5.6.2"}dependencies {dependencySet(group: 'org.apache.logging.log4j', version: '2.13.2') {entry 'log4j-api'entry 'log4j-core'entry 'log4j-slf4j-impl'entry 'log4j-jul'}dependency "org.slf4j:slf4j-api:1.7.30"dependency "com.google.code.findbugs:jsr305:3.0.2"dependencySet(group: 'org.aspectj', version: '1.9.5') {entry 'aspectjrt'entry 'aspectjtools'entry 'aspectjweaver'}dependencySet(group: 'org.codehaus.groovy', version: '2.5.11') {entry 'groovy'entry 'groovy-jsr223'entry 'groovy-templates'entry 'groovy-test'entry 'groovy-xml'}dependency "io.reactivex:rxjava:1.3.8"dependency "io.reactivex:rxjava-reactive-streams:1.2.1"dependency "io.reactivex.rxjava2:rxjava:2.2.19"dependency "io.projectreactor.tools:blockhound:1.0.2.RELEASE"dependency "com.caucho:hessian:4.0.62"dependency "com.fasterxml:aalto-xml:1.2.2"dependency("com.fasterxml.woodstox:woodstox-core:6.1.1") {exclude group: "stax", name: "stax-api"}dependency "com.google.code.gson:gson:2.8.6"dependency "com.google.protobuf:protobuf-java-util:3.11.4"dependency "com.googlecode.protobuf-java-format:protobuf-java-format:1.4"dependency("com.thoughtworks.xstream:xstream:1.4.11.1") {exclude group: "xpp3", name: "xpp3_min"exclude group: "xmlpull", name: "xmlpull"}dependency "org.apache.johnzon:johnzon-jsonb:1.2.4"dependency("org.codehaus.jettison:jettison:1.3.8") {exclude group: "stax", name: "stax-api"}dependencySet(group: 'org.jibx', version: '1.3.3') {entry 'jibx-bind'entry 'jibx-run'}dependency "org.ogce:xpp3:1.1.6"dependency "org.yaml:snakeyaml:1.26"dependency "com.h2database:h2:1.4.200"dependency "com.github.ben-manes.caffeine:caffeine:2.8.1"dependency "com.github.librepdf:openpdf:1.3.14"dependency "com.rometools:rome:1.12.2"dependency "commons-io:commons-io:2.5"dependency "io.vavr:vavr:0.10.2"dependency "net.sf.jopt-simple:jopt-simple:5.0.4"dependencySet(group: 'org.apache.activemq', version: '5.8.0') {entry 'activemq-broker'entry('activemq-kahadb-store') {exclude group: "org.springframework", name: "spring-context"}entry 'activemq-stomp'}dependency "org.apache.bcel:bcel:6.0"dependency "org.apache.commons:commons-pool2:2.8.0"dependencySet(group: 'org.apache.derby', version: '10.14.2.0') {entry 'derby'entry 'derbyclient'}dependency "org.apache.poi:poi-ooxml:4.1.2"dependency "org.apache-extras.beanshell:bsh:2.0b6"dependency "org.freemarker:freemarker:2.3.30"dependency "org.hsqldb:hsqldb:2.5.0"dependency "org.quartz-scheduler:quartz:2.3.2"dependency "org.codehaus.fabric3.api:commonj:1.1.0"dependency "net.sf.ehcache:ehcache:2.10.6"dependency "org.ehcache:jcache:1.0.1"dependency "org.ehcache:ehcache:3.4.0"dependency "org.hibernate:hibernate-core:5.4.14.Final"dependency "org.hibernate:hibernate-validator:6.1.4.Final"dependency "org.webjars:webjars-locator-core:0.44"dependency "org.webjars:underscorejs:1.8.3"dependencySet(group: 'org.apache.tomcat', version: '9.0.34') {entry 'tomcat-util'entry('tomcat-websocket') {exclude group: "org.apache.tomcat", name: "tomcat-websocket-api"exclude group: "org.apache.tomcat", name: "tomcat-servlet-api"}}dependencySet(group: 'org.apache.tomcat.embed', version: '9.0.34') {entry 'tomcat-embed-core'entry 'tomcat-embed-websocket'}dependencySet(group: 'io.undertow', version: '2.0.30.Final') {entry 'undertow-core'entry('undertow-websockets-jsr') {exclude group: "org.jboss.spec.javax.websocket", name: "jboss-websocket-api_1.1_spec"}entry('undertow-servlet') {exclude group: "org.jboss.spec.javax.servlet", name: "jboss-servlet-api_3.1_spec"exclude group: "org.jboss.spec.javax.annotation", name: "jboss-annotations-api_1.2_spec"}}dependencySet(group: 'com.squareup.okhttp3', version: '3.14.7') {entry 'okhttp'entry 'mockwebserver'}dependency("org.apache.httpcomponents:httpclient:4.5.12") {exclude group: "commons-logging", name: "commons-logging"}dependency("org.apache.httpcomponents:httpasyncclient:4.1.4") {exclude group: "commons-logging", name: "commons-logging"}dependency "org.eclipse.jetty:jetty-reactive-httpclient:1.1.2"dependency "org.jruby:jruby:9.2.11.1"dependency "org.python:jython-standalone:2.7.1"dependency "org.mozilla:rhino:1.7.11"dependency "commons-fileupload:commons-fileupload:1.4"dependency "org.synchronoss.cloud:nio-multipart-parser:1.1.0"dependency("dom4j:dom4j:1.6.1") {exclude group: "xml-apis", name: "xml-apis"}dependency("jaxen:jaxen:1.1.1") {exclude group: "xml-apis", name: "xml-apis"exclude group: "xom", name: "xom"exclude group: "xerces", name: "xercesImpl"}dependency("junit:junit:4.12") {exclude group: "org.hamcrest", name: "hamcrest-core"}dependency("de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1") {exclude group: "junit", name: "junit"}dependency "org.testng:testng:6.14.3"dependency "org.hamcrest:hamcrest:2.1"dependency "org.awaitility:awaitility:3.1.6"dependency "org.assertj:assertj-core:3.15.0"dependencySet(group: 'org.xmlunit', version: '2.6.2') {entry 'xmlunit-assertj'entry('xmlunit-matchers') {exclude group: "org.hamcrest", name: "hamcrest-core"}}dependencySet(group: 'org.mockito', version: '3.3.3') {entry('mockito-core') {exclude group: "org.hamcrest", name: "hamcrest-core"}entry 'mockito-junit-jupiter'}dependency "io.mockk:mockk:1.10.0"dependency("net.sourceforge.htmlunit:htmlunit:2.39.1") {exclude group: "commons-logging", name: "commons-logging"}dependency("org.seleniumhq.selenium:htmlunit-driver:2.39.0") {exclude group: "commons-logging", name: "commons-logging"}dependency("org.seleniumhq.selenium:selenium-java:3.141.59") {exclude group: "commons-logging", name: "commons-logging"exclude group: "io.netty", name: "netty"}dependency "org.skyscreamer:jsonassert:1.5.0"dependency "com.jayway.jsonpath:json-path:2.4.0"dependencySet(group: 'org.apache.tiles', version: '3.0.8') {entry 'tiles-api'entry('tiles-core', withoutJclOverSlf4j)entry('tiles-servlet', withoutJclOverSlf4j)entry('tiles-jsp', withoutJclOverSlf4j)entry('tiles-el', withoutJclOverSlf4j)entry('tiles-extras') {exclude group: "org.springframework", name: "spring-web"exclude group: "org.slf4j", name: "jcl-over-slf4j"}}dependency("org.apache.taglibs:taglibs-standard-jstlel:1.2.5") {exclude group: "org.apache.taglibs", name: "taglibs-standard-spec"}dependency "com.ibm.websphere:uow:6.0.2.17"dependency "com.jamonapi:jamon:2.81"dependency "joda-time:joda-time:2.10.5"dependency "org.eclipse.persistence:org.eclipse.persistence.jpa:2.7.6"dependency "org.javamoney:moneta:1.3"dependency "com.sun.activation:javax.activation:1.2.0"dependency "com.sun.mail:javax.mail:1.6.2"dependencySet(group: 'com.sun.xml.bind', version: '2.3.0.1') {entry 'jaxb-core'entry 'jaxb-impl'entry 'jaxb-xjc'}dependency "javax.activation:javax.activation-api:1.2.0"dependency "javax.annotation:javax.annotation-api:1.3.2"dependency "javax.cache:cache-api:1.1.0"dependency "javax.ejb:javax.ejb-api:3.2"dependency "javax.el:javax.el-api:3.0.1-b04"dependency "javax.enterprise.concurrent:javax.enterprise.concurrent-api:1.0"dependency "javax.faces:javax.faces-api:2.2"dependency "javax.inject:javax.inject:1"dependency "javax.inject:javax.inject-tck:1"dependency "javax.interceptor:javax.interceptor-api:1.2.2"dependency "javax.jms:javax.jms-api:2.0.1"dependency "javax.json:javax.json-api:1.1.4"dependency "javax.json.bind:javax.json.bind-api:1.0"dependency "javax.mail:javax.mail-api:1.6.2"dependency "javax.money:money-api:1.0.3"dependency "javax.resource:javax.resource-api:1.7.1"dependency "javax.servlet:javax.servlet-api:4.0.1"dependency "javax.servlet.jsp:javax.servlet.jsp-api:2.3.2-b02"dependency "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1"dependency "javax.transaction:javax.transaction-api:1.3"dependency "javax.validation:validation-api:2.0.1.Final"dependency "javax.websocket:javax.websocket-api:1.1"dependency "javax.xml.bind:jaxb-api:2.3.1"dependency "javax.xml.ws:jaxws-api:2.3.1"dependency "org.eclipse.persistence:javax.persistence:2.2.0"// Substitute for "javax.management:jmxremote_optional:1.0.1_04" which// is not available on Maven Centraldependency "org.glassfish.external:opendmk_jmxremote_optional_jar:1.0-b01-ea"dependency "org.glassfish:javax.el:3.0.1-b08"dependency "org.glassfish.main:javax.jws:4.0-b33"dependency "org.glassfish.tyrus:tyrus-container-servlet:1.13.1"}generatedPomCustomization {enabled = false}resolutionStrategy {cacheChangingModulesFor 0, "seconds"}repositories {maven {url 'https://maven.aliyun.com/repository/public'}maven {url 'https://maven.aliyun.com/repository/central'}mavenCentral()maven { url "https://repo.spring.io/libs-spring-framework-build" }}}configurations.all {resolutionStrategy {cacheChangingModulesFor 0, "seconds"cacheDynamicVersionsFor 0, "seconds"}}
}configure([rootProject] + javaProjects) { project ->group = "org.springframework"apply plugin: "java"apply plugin: "java-test-fixtures"apply plugin: "checkstyle"apply plugin: 'org.springframework.build.compile'apply from: "${rootDir}/gradle/custom-java-home.gradle"apply from: "${rootDir}/gradle/ide.gradle"pluginManager.withPlugin("kotlin") {apply plugin: "org.jetbrains.dokka"compileKotlin {kotlinOptions {jvmTarget = "1.8"freeCompilerArgs = ["-Xjsr305=strict"]allWarningsAsErrors = true}}compileTestKotlin {kotlinOptions {jvmTarget = "1.8"freeCompilerArgs = ["-Xjsr305=strict"]}}}test {useJUnitPlatform()include(["**/*Tests.class", "**/*Test.class"])systemProperty("java.awt.headless", "true")systemProperty("testGroups", project.properties.get("testGroups"))systemProperty("io.netty.leakDetection.level", "paranoid")}checkstyle {toolVersion = "8.31"configDir = rootProject.file("src/checkstyle")}dependencies {testCompile("org.junit.jupiter:junit-jupiter-api")testCompile("org.junit.jupiter:junit-jupiter-params")testCompile("org.mockito:mockito-core")testCompile("org.mockito:mockito-junit-jupiter")testCompile("io.mockk:mockk")testCompile("org.assertj:assertj-core")// Pull in the latest JUnit 5 Launcher API to ensure proper support in IDEs.testRuntime("org.junit.platform:junit-platform-launcher")testRuntime("org.junit.jupiter:junit-jupiter-engine")testRuntime("org.apache.logging.log4j:log4j-core")testRuntime("org.apache.logging.log4j:log4j-slf4j-impl")testRuntime("org.apache.logging.log4j:log4j-jul")// JSR-305 only used for non-required meta-annotationscompileOnly("com.google.code.findbugs:jsr305")testCompileOnly("com.google.code.findbugs:jsr305")checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:0.0.15")}ext.javadocLinks = ["https://docs.oracle.com/javase/8/docs/api/","https://docs.oracle.com/javaee/7/api/","https://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs/",  // CommonJ"https://www.ibm.com/support/knowledgecenter/SS7JFU_8.5.5/com.ibm.websphere.javadoc.doc/web/apidocs/","https://glassfish.java.net/nonav/docs/v3/api/","https://docs.jboss.org/jbossas/javadoc/4.0.5/connector/","https://docs.jboss.org/jbossas/javadoc/7.1.2.Final/","https://tiles.apache.org/tiles-request/apidocs/","https://tiles.apache.org/framework/apidocs/","https://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/","https://www.ehcache.org/apidocs/2.10.4/","https://www.quartz-scheduler.org/api/2.3.0/","https://fasterxml.github.io/jackson-core/javadoc/2.10/","https://fasterxml.github.io/jackson-databind/javadoc/2.10/","https://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.10/","https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/","https://junit.org/junit4/javadoc/4.12/","https://junit.org/junit5/docs/5.6.2/api/"] as String[]
}configure(moduleProjects) { project ->apply from: "${rootDir}/gradle/spring-module.gradle"
}configure(rootProject) {description = "Spring Framework"apply plugin: "groovy"apply plugin: "kotlin"apply plugin: "io.spring.nohttp"apply plugin: 'org.springframework.build.api-diff'apply from: "${rootDir}/gradle/publications.gradle"apply from: "${rootDir}/gradle/docs.gradle"nohttp {source.exclude "**/test-output/**"whitelistFile = project.file("src/nohttp/whitelist.lines")def rootPath = file(rootDir).toPath()def projectDirs = allprojects.collect { it.projectDir } + "${rootDir}/buildSrc"projectDirs.forEach { dir ->[ 'bin', 'build', 'out', '.settings' ].collect { rootPath.relativize(new File(dir, it).toPath()) }.forEach { source.exclude "$it/**" }[ '.classpath', '.project' ].collect { rootPath.relativize(new File(dir, it).toPath()) }.forEach { source.exclude "$it" }}}publishing {publications {mavenJava(MavenPublication) {artifact docsZipartifact schemaZipartifact distZip}}}
}

settiings.gradel

pluginManagement {repositories {maven { url 'https://maven.aliyun.com/repository/public/' }gradlePluginPortal()maven { url 'https://repo.spring.io/plugins-release' }}
}
apply from: "$rootDir/gradle/build-cache-settings.gradle"include "spring-aop"
include "spring-aspects"
include "spring-beans"
include "spring-context"
include "spring-context-support"
include "spring-context-indexer"
include "spring-core"
include "kotlin-coroutines"
project(':kotlin-coroutines').projectDir = file('spring-core/kotlin-coroutines')
include "spring-expression"
include "spring-instrument"
include "spring-jcl"
include "spring-jdbc"
include "spring-jms"
include "spring-messaging"
include "spring-orm"
include "spring-oxm"
include "spring-test"
include "spring-tx"
include "spring-web"
include "spring-webmvc"
include "spring-webflux"
include "spring-websocket"
include "framework-bom"
include "integration-tests"rootProject.name = "spring"
rootProject.children.each {project ->project.buildFileName = "${project.name}.gradle"
}

嫌弃麻烦,可以直接我的配置应该就可以了。完成这些配置调整后,就可以将Spring源码导入IDEA,等待下载就完事。

BUILD SUCCESSFUL 

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

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

相关文章

AI产品经理需要哪些必备技能?如何成为AI产品经理?

1.AI产品经理是什么 回答这个问题前我们首先得理清楚什么是AI产品经理,它和传统的互联网产品经理有什么区别。 1.1 AI产品经理职责 主要职责一方面是规划如何将成熟的AI技术应用在各个领域不同场景中,提升原有场景的效率或效果等;另一方面…

基于蜉蝣优化的聚类算法(MATLAB)

优化问题广泛存在于人们的日常生活和工程领域,其解决如何寻找使目标值达到最优的可行解的问题。伴随着科技发展,优化问题在生产调度、神经网络训练、图像处理、能源系统等领域起到举足轻重的作用,有助于提高系统效率。优化问题依据不同标准可…

Docker安装PostgreSQL详细教程

本章教程,使用Docker安装PostgreSQL具体步骤。 一、拉取镜像 docker pull postgres二、启动容器 docker run -it --name postgres --restart always -e POSTGRES_PASSWORD=123456 -e

EXCEL返回未使用数组元素(未使用值)

功能简介: 在我们工作中,需要在EXCEL表列出哪些元素(物品或订单)已经被使用了(或使用了多少次),哪些没有被使用。 当数量过于庞大时人工筛选或许不是好办法,我们可以借助公式&…

偏微分方程笔记

极小位能原理: C 2 C^2 C2 是一个集合符号,表示所有二阶连续可微函数的集合 弱导数 C 2 C^2 C2 是一个集合符号,表示所有二阶连续可微函数的集合。 C 0 ∞ ( I ) C^{\infty}_0(I) C0∞​(I)表示于 I I I上无穷可微,且在端点a&…

2024 年人工智能和数据科学的五个主要趋势

引言 2023年,人工智能和数据科学登上了新闻头条。生成性人工智能的兴起无疑是这一显著提升曝光度的驱动力。那么,在2024年,该领域将如何继续占据头条,并且这些趋势又将如何影响企业的发展呢? 在过去几个月,…

Vue3实现点击按钮实现文字变色

1.动态样式实现 1.1核心代码解释: class"power-station-perspective-item-text": 为这个 span 元素添加了一个 CSS 类,以便对其样式进行定义。 click"clickItem(item.id)": 这是一个 Vue 事件绑定。当用户点…

SpringBoot 整合 SpringSecurity

1. 项目目录 2. pom.xml <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId><version>2.6.3</version> </dependency> <dependency><groupId>org.sprin…

基于Datax开发支持瀚高数据库的插件_插件开发_以及部署---国产瀚高数据库工作笔记006

如果想直接使用,开发好的插件,那么可以去下载笔者上传的,打包好的插件,直接放入到 datax安装目录的./datax/plugin/reader 或者writer中就可以了 https://download.csdn.net/download/lidew521/89495306 https://download.csdn.net/download/lidew521/89495301这两个一个…

Unity之创建与导出PDF

内容将会持续更新&#xff0c;有错误的地方欢迎指正&#xff0c;谢谢! Unity之创建与导出PDF TechX 坚持将创新的科技带给世界&#xff01; 拥有更好的学习体验 —— 不断努力&#xff0c;不断进步&#xff0c;不断探索 TechX —— 心探索、心进取&#xff01; 助力快速…

PyPDF2指定范围拆分PDF文件为单个页面

本文目录 前言一、指定范围拆分PDF1、过程讲解2、拆分效果图3、完整代码二、其他问题1、更改页码索引值前言 上一篇文章讲解了怎么讲一个PDF文档分割为多个单页面PDF,本文来讲解一下进阶,就是指定范围拆分PDF页面,有的时候,我们只想把PDF文档中的某几页拆分出来,而不是全…

mmcv安装失败及解决方案

假如想安装的版本是mmcv1.4.0, 但是pip install mmcv1.4.0总是失败&#xff0c;若是直接pip install mmcv会安装成功&#xff0c;但是安装的就是最新版本&#xff0c;后面代码跑起来还会报错&#xff0c;怎么办呢&#xff1f; 接下来分享一个mmcv指定版本安装的方式。 网页&a…

数据存储方案选择:ES、HBase、Redis、MySQL与MongoDB的应用场景分析

一、概述 1.1 背景 在当今数据驱动的时代&#xff0c;选择合适的数据存储技术对于构建高效、可靠的信息系统至关重要。随着数据量的爆炸式增长和处理需求的多样化&#xff0c;市场上涌现出了各种数据存储解决方案&#xff0c;每种技术都有其独特的优势和适用场景。Elasticsear…

【Threejs进阶教程-着色器篇】1. Shader入门(ShadertoyShader和ThreejsShader入门)

ThreejsShader入门 关于本Shader教程认识ShaderShader和Threejs的关系WebGLShaderThreejsShaderShadertoyShader其他Shader 再次劝退数学不好的人从ShaderToy开始Shader的代码是强类型glsl的类型&#xff0c;变量&#xff0c;内置函数&#xff0c;关键字关于uv基于UV的颜色处理…

全网最详细的软件测试面试题总结+基础知识(完整版)

一、什么是软件&#xff1f; 软件是计算机系统中的程序和相关文件或文档的总称。 二、什么是软件测试&#xff1f; 说法一&#xff1a;使用人工或自动的手段来运行或测量软件系统的过程&#xff0c;以检验软件系统是否满足规定的要求&#xff0c;并找出与预期结果之间的差异…

【深海王国】小学生都能玩的语音模块?ASRPRO打造你的第一个智能语音助手(4)

Hi~ (o^^o)♪, 各位深海王国的同志们&#xff0c;早上下午晚上凌晨好呀~ 辛勤工作的你今天也辛苦啦(/≧ω) 今天大都督继续为大家带来系列——小学生都能玩的语音模块&#xff0c;帮你一周内快速学会语音模块的使用方式&#xff0c;打造一个可用于智能家居、物联网领域的语音助…

qtreewidget 美化,htmlcss和qss 不是一个概念!已解决

这种样式的美化&#xff0c; 能气死个人&#xff0c;css 一个单词搞定&#xff0c;非要 在qss中。多少个单词不知道了。 m_tree_widget->setStyleSheet("QTreeView{background:transparent; selection-background-color:transparent;}""QTreeView::branch{b…

linux 安装腾讯会议和解决ubuntu打开腾讯会议提示:不兼容 wayland 协议

一. 下载腾讯会议安装包 腾讯会议下载链接 二. 命令行安装 cd [安装包路径] sudo dpkg -i TencentMeeting_0300000000_3.19.1.400_x86_64_default.publish.deb 三. 打开腾讯会议提示无法支持wayland 协议 解决方法: 打开终端 sudo vi /etc/gdm3/custom.conf打开 #Wayland…

哪个牌子的充电宝牌子便宜好用?2024年性价比高充电宝排行榜!

在 2024 年&#xff0c;充电宝市场依旧琳琅满目&#xff0c;让人眼花缭乱。大家都在寻找那个既便宜又好用的充电宝&#xff0c;可面对众多品牌和产品&#xff0c;常常感到无从下手。别担心&#xff01;经过深入的市场调研和实际使用体验&#xff0c;我们为您精心整理出了 2024 …

轻度图像处理工具,匹敌photoshop

一、简介 1、一款功能强大的在线图片编辑工具,用户可以将其安装为渐进式网页应用(PWA)。它提供了与 Photoshop 相似的核心功能,能够满足大多数图像编辑需求,非常适合那些不愿或无法安装 Photoshop 的用户。即使使用免费版本,用户也能享受所有功能,是轻度图像处理的理想选…