Spring专题一:源码编译

news2024/11/24 4:23:25

下载源码

因为公司使用的是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 false
	id 'org.jetbrains.kotlin.jvm' version '1.3.72' apply false
	id 'org.jetbrains.dokka' version '0.10.1' apply false
	id '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 false
	id "io.freefair.aspectj" version '4.1.1' apply false
	id "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 Central
			dependency "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-annotations
		compileOnly("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 docsZip
				artifact schemaZip
				artifact 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.coloradmin.cn/o/1877673.html

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

相关文章

C语言的数据结构:树与二叉树(哈夫曼树篇)

前言 上篇讲完了二叉树,二叉树的查找性能要比树好很多,如平衡二叉树保证左右两边节点层级相差不会大于1,其查找的时间复杂度仅为 l o g 2 n log_2n log2​n,在两边层级相同时,其查找速度接近于二分查找。1w条数据&am…

今日AI提示词|新媒体运营场景-小红薯笔记通用指令

指令写作的技巧与步骤 明确定义需求 提供足够的上下文 使用简单直白的语言 举例说明 添加限制条件 多次迭代优化,给出详细的要求 小红薯笔记通用指令 从现在开始,你担任我的小红书创作者。你的任务是根据我提供给你的主体,撰写一篇小…

运维锅总详解HAProxy

本文尝试从HAProxy简介、HAProxy工作流程及其与Nginx的对比对其进行详细分析;在本文最后,给出了为什么Nginx比HAProxy更受欢迎的原因。希望对您有所帮助! HAProxy简介 HAProxy(High Availability Proxy)是一款广泛使…

开源项目-商城管理系统

哈喽,大家好,今天主要给大家带来一个开源项目-商城管理系统 商城管理系统分前后端两部分。前端主要有商品展示,我的订单,个人中心等内容;后端的主要功能包括产品管理,门店管理,会员管理,订单管理等模块 移动端页面

汽车电子工程师入门系列——AUTOSAR通信服务框架(上)

我是穿拖鞋的汉子,魔都中坚持长期主义的汽车电子工程师。 老规矩,分享一段喜欢的文字,避免自己成为高知识低文化的工程师: 屏蔽力是信息过载时代一个人的特殊竞争力,任何消耗你的人和事,多看一眼都是你的不对。非必要不费力证明自己,无利益不试图说服别人,是精神上的节…

uniapp+vue3开发微信小程序踩坑集

本文主要记录使用uniappvue3开发微信小程序遇见的各种常见问题及注意点。(持续更新) 问题: 自定义组件为什么有些样式加不上去 给自定义组件增加class的时候,有时候不生效有时候生效,一度让我怀疑自己记忆错乱。后来…

实验 1 图像基本操作

1. 实验目的 ①熟悉 Photoshop 基本操作; ②掌握 Matlab 、PythonOpenCV 中处理图像的基本方法; ③掌握图像的半调转换和抖动转换。 2. 实验内容 ①Photoshop 基本操作:打开图像文件,选择区域,旋转、裁剪图像、图层…

PHP电商系统开发指南数据库管理

回答:数据库管理是电商系统开发的关键,涉及数据的存储、管理和检索。选择合适的数据库引擎,如mysql或 postgresql。创建数据库架构,定义数据的组织方式(如产品表、订单表)。进行数据建模,考虑实…

华润万家超市卡怎么用?

华润的礼品卡不仅能线下门店使用,还能直接叫送货上门 我最近用积分兑了几张华润卡,但是又没有购物需求,送朋友吧面值又不大,朋友也说用不上 最后朋友建议我在收卡云上把卡出掉,我试了下92折出掉了,价格还…

MySQL高级-MVCC-基本概念(当前读、快照读)

文章目录 1、MVCC基本概念1.1、当前读1.1.1、创建表 stu1.1.2、测试 1.2、快照读 1、MVCC基本概念 全称Multi-Version Concurrency Control,多版本并发控制。指维护一个数据的多个版本,使得读写操作没有冲突,快照读为MySQL实现MVCC提供了一个…

Python之父推荐!Star 60k!这本 CPython 书把内部实现全讲透了!

都说 Python 是人工智能的“天选”语言,为什么呢? 可能很多读者都知道,Python 的解释器是用 C 语言写的,所以其实我们在谈论 “Python” 的时候,99.9% 的情况说的就是 “CPython”! CPython 是目前最流行的…

《昇思25天学习打卡营第11天 | 昇思MindSpore基于 MindSpore 实现 BERT 对话情绪识别》

11天本节学习到BERT全称是来自变换器的双向编码器表征量,它是Google于2018年末开发并发布的一种新型语言模型。BERT模型的主要创新点都在pre-train方法上,即用了Masked Language Model和Next Sentence Prediction两种方法分别捕捉词语和句子级别的repres…

数学学习与研究杂志社《数学学习与研究》杂志社2024年第6期目录

课改前沿 基于核心素养的高中数学课堂教学研究——以“直线与圆、圆与圆的位置关系”为例 张亚红; 2-4 核心素养视角下初中生数学阅读能力的培养策略探究 贾象虎; 5-7 初中数学大单元教学实践策略探索 耿忠义; 8-10《数学学习与研究》投稿:cn7kantougao…

x3daudio1_7.dll在哪个文件夹?打开游戏提示找不到x3daudio1_7.dll怎么解决?

电脑打开游戏软件时候,我相信大部分人都会遇到提示找不到x3daudio1_7.dll文件。或错误代码126:加载x3daudio1_7.dll失败等等问题,那这个是怎么回事呢?需要怎么解决这个问题?下面我给大家一一解答。 一、x3daudio1_7.dl…

C#测试调用DotnetSpider爬取网页内容

微信公众号“DotNet”的文章《.NET快速实现网页数据抓取》介绍了调用开源网页爬取模块DotnetSpider爬取cnblog网站文章的基本方式。之前学习过使用HtmlAgilityPack抓取并分析网页内容,DotnetSpider也依赖HtmlAgilityPack模块,不过前者属于轻量、高效的爬…

昇思MindSpore学习笔记5--数据变换Transforms

摘要: 昇思MindSpore的数据变换,包括通用变换Common Transforms、图像变换Vision Transforms、标准化Normalize、文本变换Text Transforms、匿名函数变换Lambda Transforms。 一、数据变换Transforms概念 原始数据需预处理后才能送入神经网络进行训练…

docker网络功能介绍

一、 网络启动过程二、 修改容器dns和主机名① 临时处理(容器终止或重启后不会保存)② 通过参数指定 三、 容器内访问控制① 容器访问外部网络② 容器间互相访问(1)访问所有端口(2)访问指定端口 四、 docke…

.[emcrypts@tutanota.de].mkp勒索病毒新变种该如何应对?

引言 在数字化时代,随着信息技术的迅猛发展,网络安全问题日益凸显。其中,勒索病毒作为一种极具破坏力的恶意软件,给个人和企业带来了巨大的经济损失和数据安全风险。近期,一种名为“.mkp勒索病毒”的新型威胁开始在网络…

2000-2021年县域金融机构存贷款数据

2000-2021年县域金融机构存贷款数据 1、时间:2000-2021年 2、指标:统计年度、地区编码ID、县域代码、县域名称、所属地级市、所属省份、年末金融机构贷款余额/亿元、年末金融机构存款余额/亿元、年末城乡居民储蓄存款余额/亿元 3、来源:县…

VBA技术资料MF171:创建指定工作表数的工作簿

我给VBA的定义:VBA是个人小型自动化处理的有效工具。利用好了,可以大大提高自己的工作效率,而且可以提高数据的准确度。“VBA语言専攻”提供的教程一共九套,分为初级、中级、高级三大部分,教程是对VBA的系统讲解&#…