Redisson源码分析(1)源码下载及本地调试

news2024/11/18 4:01:01

目录

前言

源码下载

其他准备


前言

新开个坑,关于Redisson源码分析的,感觉不记一下,看完以后,过段时间又忘了...

源码下载

Redisson:https://github.com/redisson/redisson

本次源码我这下载的是3.17.7版本

3.17.7版本地址:Release redisson-3.17.7 · redisson/redisson · GitHub

其他准备

1.redis-server 

Releases · microsoftarchive/redis · GitHub

因为用的系统是windows,所以redis可以直接下载windows 版本的,即开即用

2.RedisDesktopManager

开源Redis 可视化工具,这个有没有都可,主要是可视化,看起来方便点。

 源码启动

  1. idea引入redisson-redisson-3.17.7 的pom看了一眼,分为很多包,其实看redisson的源码,核心的代码在redisson文件中。
  2. 退出来,重新在idea引入redisson中的pom.xml
  3. maven目录配置一下,拉下包
  4. 拉好以后,找下test 直接跑一个看看,理所当然的失败了

我的问题是因为默认的pom中的jar包版本,有些是必须要求jdk16的,有些是版本高了,不支持jdk8的。统一调一下。以下是我的pom文件配置,可以直接copy一下。

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.redisson</groupId>
        <artifactId>redisson-parent</artifactId>
        <version>3.17.7</version>
        <relativePath>../</relativePath>
    </parent>

    <artifactId>redisson</artifactId>

    <name>Redisson</name>
    <description>Redis Java client with features of In-Memory Data Grid</description>
    <inceptionYear>2014</inceptionYear>
    <url>http://redisson.org</url>

    <organization>
       <name>Redisson</name>
       <url>http://redisson.org/</url>
    </organization>

    <profiles>
        <profile>
            <id>unit-test</id>
            <properties>
                <maven.test.skip>false</maven.test.skip>
            </properties>
        </profile>
    </profiles>

    <!--属性-->
    <properties>
        <project.encoding>UTF-8</project.encoding>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-transport-native-kqueue</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-transport-native-epoll</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-common</artifactId>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-codec</artifactId>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-buffer</artifactId>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-transport</artifactId>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-resolver</artifactId>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-resolver-dns</artifactId>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-handler</artifactId>
        </dependency>

        <dependency>
            <groupId>javax.cache</groupId>
            <artifactId>cache-api</artifactId>
            <version>1.1.1</version>
        </dependency>
        <dependency>
            <groupId>io.projectreactor</groupId>
            <artifactId>reactor-core</artifactId>
            <version>3.4.18</version>
        </dependency>
        <dependency>
            <groupId>org.reactivestreams</groupId>
            <artifactId>reactive-streams</artifactId>
            <version>1.0.4</version>
        </dependency>
        <dependency>
            <groupId>io.reactivex.rxjava3</groupId>
            <artifactId>rxjava</artifactId>
            <version>3.1.5</version>
        </dependency>

        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jmockit</groupId>
            <artifactId>jmockit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jooq</groupId>
            <artifactId>joor-java-8</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-core</artifactId>
            <version>8.5.79</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-jasper</artifactId>
            <version>8.5.79</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat</groupId>
            <artifactId>tomcat-jasper</artifactId>
            <version>8.5.79</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>fluent-hc</artifactId>
            <version>4.5.13</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>[4.1,5.2]</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>[4.1,5.2]</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-expression</artifactId>
            <version>[4.1,5.2]</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webflux</artifactId>
            <version>[4.1,5.2]</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>net.jpountz.lz4</groupId>
            <artifactId>lz4</artifactId>
            <version>1.3.0</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.jboss.marshalling</groupId>
            <artifactId>jboss-marshalling</artifactId>
            <version>2.0.11.Final</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.marshalling</groupId>
            <artifactId>jboss-marshalling-river</artifactId>
            <version>2.0.11.Final</version>
        </dependency>
        <dependency>
            <groupId>org.msgpack</groupId>
            <artifactId>jackson-dataformat-msgpack</artifactId>
            <version>0.9.1</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.xerial.snappy</groupId>
            <artifactId>snappy-java</artifactId>
            <version>1.1.8.4</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>de.ruedigermoeller</groupId>
            <artifactId>fst</artifactId>
            <version>2.57</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.esotericsoftware</groupId>
            <artifactId>kryo</artifactId>
            <version>5.3.0</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.36</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-yaml</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.ben-manes.caffeine</groupId>
            <artifactId>caffeine</artifactId>
            <version>2.8.0</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-ion</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-cbor</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-smile</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-avro</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jsr310</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy</artifactId>
            <version>1.12.10</version>
        </dependency>
        <dependency>
            <groupId>org.jodd</groupId>
            <artifactId>jodd-bean</artifactId>
            <version>5.1.6</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>[4.1,5.2]</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>[4.1,5.2]</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
            <version>[4.1,5.2]</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>[4.1,5.2]</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>[4.1,5.2]</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.springframework.session</groupId>
            <artifactId>spring-session-core</artifactId>
            <version>[2.0.0]</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-actuator</artifactId>
            <version>[2.0.0]</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure</artifactId>
            <version>[2.0.0]</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-core</artifactId>
            <version>[1.0.1,)</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>io.projectreactor</groupId>
            <artifactId>reactor-test</artifactId>
            <version>3.4.13</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
<!--
            <plugin>
              <groupId>com.github.spotbugs</groupId>
              <artifactId>spotbugs-maven-plugin</artifactId>
              <version>4.5.0.0</version>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>spotbugs</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <testSource>${java.version}</testSource>
                    <testTarget>${java.version}</testTarget>
                    <encoding>${project.encoding}</encoding>
                </configuration>
                <version>3.6.2</version>
            </plugin>

            <plugin>
         	<artifactId>maven-javadoc-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>3.13.0</version>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>pmd</goal>
                            <goal>cpd</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <linkXRef>true</linkXRef>
                    <minimumTokens>100</minimumTokens>
                    <targetJdk>${source.version}</targetJdk>
                    <verbose>true</verbose>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.1.2</version>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <consoleOutput>true</consoleOutput>
                    <enableRSS>false</enableRSS>
                    <configLocation>/checkstyle.xml</configLocation>
                    <propertyExpansion>checkstyle.config.path=${basedir}</propertyExpansion>
                </configuration>
                <dependencies>
                    <dependency>
                       <groupId>com.puppycrawl.tools</groupId>
                       <artifactId>checkstyle</artifactId>
                       <version>10.3</version>
                  </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.2</version>
                    <configuration>
                        <redirectTestOutputToFile>true</redirectTestOutputToFile>
                        <excludes>
                            <exclude>LRUCacheMapTest</exclude>
                            <exclude>SoftCacheMapTest</exclude>
                            <exclude>SpringNamespaceTest</exclude>
                            <exclude>SpringNamespaceWikiTest</exclude>
                            <exclude>SpringNamespaceObjectTest</exclude>
                            <exclude>RedissonFairLockTest</exclude>
                            <exclude>RedissonStreamTest</exclude>
                            <exclude>RedissonLockHeavyTest</exclude>

                            <exclude>RedissonDoubleAdderTest</exclude>
                            <exclude>RedissonListReactiveTest</exclude>
                            <exclude>RedissonLocalCachedMapSerializationCodecTest</exclude>
                            <exclude>RedissonLocalCachedMapTest</exclude>
                            <exclude>RedissonLongAdderTest</exclude>
                            <exclude>RedissonPriorityBlockingQueueTest</exclude>
                            <exclude>RedissonCodecTest</exclude>
                            <exclude>RedissonTest</exclude>
                            <exclude>RedissonSetReactiveTest</exclude>
                            <exclude>RedissonSetTest</exclude>
                            <exclude>RedissonRedLockTest</exclude>
                            <exclude>RedissonMapCacheReactiveTest</exclude>

    <!--

                            <exclude>RedissonMapReactiveTest</exclude>
                            <exclude>RedissonGeoTest</exclude>
                            <exclude>RedissonScoredSortedSetTest</exclude>
                            <exclude>RedissonScheduledExecutorServiceTest</exclude>
                            <exclude>RedissonBlockingQueueTest</exclude>
                            <exclude>RedissonExecutorServiceTest</exclude>
    -->
                        </excludes>
                        <forkCount>4</forkCount>
                        <reuseForks>true</reuseForks>
                        <argLine>
                           -javaagent:"${settings.localRepository}"/org/jmockit/jmockit/1.49/jmockit-1.49.jar
                        </argLine>
                    </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <archive>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                        <manifestEntries>
                            <Build-Time>${maven.build.timestamp}</Build-Time>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>5.1.1</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <DynamicImport-Package>*</DynamicImport-Package>
                    </instructions>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>2.11</version>
                <configuration>
                    <basedir>${basedir}</basedir>
                    <header>${basedir}/../header.txt</header>
                    <quiet>false</quiet>
                    <failIfMissing>true</failIfMissing>
                    <aggregate>false</aggregate>
                    <includes>
                        <include>src/main/java/org/redisson/</include>
                    </includes>
                    <excludes>
                        <exclude>target/**</exclude>
                    </excludes>
                    <useDefaultExcludes>true</useDefaultExcludes>
                    <mapping>
                        <java>JAVADOC_STYLE</java>
                        <xsd>XML_STYLE</xsd>
                    </mapping>
                    <strictCheck>true</strictCheck>
                    <useDefaultMapping>true</useDefaultMapping>
                    <encoding>UTF-8</encoding>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>

再试试,看看能不能起起来,还是报错。这次说是

品一品,也很正常,毕竟环境和redis这类的都没给人家配置,人按默认test走,链接得上还有鬼了。

看下代码:

我要test的是 RedissonLockTest#testTryLockWait

该类继承->BaseConcurrentTest->BaseTest

BaseTest 中有代码

  @BeforeAll
    public static void beforeClass() throws IOException, InterruptedException {
        //尝试调用redis文件,启动一个redis-server
        RedisRunner.startDefaultRedisServerInstance();
        //连接redis-server,向test暴露一个由redisson实现的可用客户端
        redisson = createInstance();
    }

实际上windows的这个redis启动,是一个exe程序,不需要代码帮助启动。我能否把第一行注释掉,直接改下配置,链接我已经启动的redis-server?

  @BeforeAll
    public static void beforeClass() throws IOException, InterruptedException {
        //尝试调用redis文件,启动一个redis-server
        //RedisRunner.startDefaultRedisServerInstance();
        //连接redis-server,向test暴露一个由redisson实现的可用客户端
        redisson = createInstance();
    }


    public static Config createConfig() {
//        String redisAddress = System.getProperty("redisAddress");
//        if (redisAddress == null) {
//            redisAddress = "127.0.0.1:6379";
//        }
        Config config = new Config();
//        config.setCodec(new MsgPackJacksonCodec());
//        config.useSentinelServers().setMasterName("mymaster").addSentinelAddress("127.0.0.1:26379", "127.0.0.1:26389");
//        config.useClusterServers().addNodeAddress("127.0.0.1:7004", "127.0.0.1:7001", "127.0.0.1:7000");
        config.useSingleServer()
                .setAddress("redis://127.0.0.1:6379");
//        .setPassword("mypass1");
//        config.useMasterSlaveConnection()
//        .setMasterAddress("127.0.0.1:6379")
//        .addSlaveAddress("127.0.0.1:6399")
//        .addSlaveAddress("127.0.0.1:6389");
        return config;
    }

或者 把 RedissonRuntimeEnvironment类中的redisBinaryPath 地址配置好(既上文准备1中redis-server.exe 的地址),createConfig不变:

config.useSingleServer() .setAddress(RedisRunner.getDefaultRedisServerBindAddressAndPort());

推荐这种做法,端口号自动生成,比较灵活。

执行:

成了,再看RDM中也有个30s过期的key

 到这里,前期准备已经完全好了,只要能跑起来,能debug,剩余就是愿意花多少时间和精力的问题了

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

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

相关文章

Java期末复习基础题编程题

文章目录 基础题记录实践题记录&&与C比较题目1&#xff1a;题目2&#xff1a;题目3&#xff1a; 基础题记录 编译型语言&#xff1a; 定义&#xff1a;在程序运行之前&#xff0c;通过编译器将源程序编译成机器码(可运行的二进制代码)&#xff0c;以后执行这个程序时&…

【图像分类】CNN+Transformer结合系列.2

介绍几篇利用CNNTransformer实现图像分类的论文&#xff1a;CMT&#xff08;CVPR2022&#xff09;&#xff0c;MaxViT(ECCV2022)&#xff0c;MaxViT&#xff08;ECCV2022&#xff09;&#xff0c;MPViT&#xff08;CVPR2022&#xff09;。主要是说明Transformer的局限性&#x…

【DFS】CF598D

Problem - D - Codeforces 题意&#xff1a; 思路&#xff1a; 直接搜索即可&#xff0c;对于每个连通块都去染色&#xff0c;对于每一个色块都维护这个色块的墙壁数 或者麻烦点用并查集维护也行 Code&#xff1a; int n, m, k; bool st[N][N]; char g[N][N]; int ans[N *…

C#时间轴曲线图形编辑器开发2-核心功能实现

目录 三、关键帧编辑 1、新建Winform工程 &#xff08;1&#xff09;界面布局 &#xff08;2&#xff09;全局变量 2、关键帧添加和删除 &#xff08;1&#xff09;鼠标在曲线上识别 &#xff08;2&#xff09;键盘按键按下捕捉 &#xff08;3&#xff09;关键帧添加、删…

脉冲信号测试应如何选择示波器带宽?

示波器模拟带宽的定义大家都比较熟悉&#xff0c;是针对于正弦波信号定义的。从频域上看&#xff0c;正弦波信号的频谱就是单根谱线&#xff0c;只要示波器的带宽不小于信号的频率&#xff0c;那么就可以有效观测到波形。若要追求更高的幅度测试精度&#xff0c;则可以按照5倍法…

全球视频编码领域顶级大赛放榜,网易云信首次参赛即斩获H.265赛道多项指标第一

近日&#xff0c;2022 MSU 世界视频编码器大赛正式放榜&#xff0c;网易云信首次参赛就获得骄人成绩&#xff0c;自研的结合智码超清技术的 NE265E 编码器以公开身份参赛&#xff0c;在 H.265 赛道下获得多项指标第一名。 首次参赛&#xff0c;斩获 3 项指标第一 MSU Video Co…

【JVM】详细解析java创建对象的具体流程

目录 一、java创建对象的几种方式 1.1、使用new关键字 1.2、反射创建对象 1.2.1、Class.newInstance创建对象 1.2.2、调用构造器再去创建对象Constructor.newInstance 1.3、clone实现 1.4、反序列化 二、创建对象的过程 2.1、分配空间的方式 1、指针碰撞 2、空闲列表 …

Mac代码编辑器sublime text 4中文注册版下载

Sublime Text 4 for Mac简单实用功能强大&#xff0c;是程序员敲代码必备的代码编辑器&#xff0c;sublime text 4中文注册版支持多种编程语言&#xff0c;包括C、Java、Python、Ruby等&#xff0c;可以帮助程序员快速编写代码。Sublime Text的界面简洁、美观&#xff0c;支持多…

数据库访问和组件技术相关概念(ADO、ActiveX、DLL、ODBC等)详解

目录 背景概念ADO核心组件代码展示 ActiveX组件对象模型ADO与ODBC的关系 总结 背景 最近又再重新学习vb&#xff0c;老师说过无论学习什么知识一定不能独立的学习&#xff0c;学习编程语言也是一样&#xff0c;把两种或者三种语言放到一起进行比较&#xff0c;通过比较每种语言…

短视频矩阵源码/系统搭建/源码

一、短视频矩阵系统开发需要具备以下能力 短视频技术能力&#xff1a;开发人员应具备短视频相关技术能力&#xff0c;如视频编解码、视频流媒体传输等。 大数据存储和处理能力&#xff1a;短视频矩阵系统需要处理大量的视频数据&#xff0c;因此需要具备大数据存储和处理的能力…

【Spring Boot】

目录 &#x1f36a;1 Spring Boot 的创建 &#x1f382;2 简单 Spring Boot 程序 &#x1f370;3 Spring Boot 配置文件 &#x1f36e;3.1 properties 基本语法 &#x1fad6;3.2 yml 配置文件说明 &#x1f36d;3.2.1 yml 基本语法 &#x1f369;3.3 配置文件里的配置类…

CSDN浏览如何解决

一、对于平时我们苦恼csdn数据不够好看 当面试等各个场合需要我们装*或者秀技术无法拿出亮眼的时候&#xff0c;刚好我闲时间编译的在线模块适合你 二、如何操作&#xff08;虚拟平台我已给大家放到最后直接使用即可&#xff09; 重点&#xff1a;pc端必须拥有python环境 win…

【lesson6】Linux make和makefile

文章目录 make和Makefile的介绍make和Makefile的使用make和Makefile的项目测试 make和Makefile的介绍 make是一个命令 Makefile是一个文件 make和Makefile是Linux自动化构建项目的工具。 makefile带来的好处就是——“自动化编译”&#xff0c;一旦写好&#xff0c;只需要一个…

6门新兴语言,小众亦强大

编码语言在塑造我们创建软件的方式方面起着至关重要的作用。多年来&#xff0c;我们观察到Python&#xff0c;Java和C等成熟语言的流行。然而&#xff0c;如今一波新的编码语言浪潮已经出现&#xff0c;提出了创造性的解决方案&#xff0c;并推动了软件工程领域所能完成的极限。…

12页线性代数图解教程,github星标9.1k,适合小白

线性代数“困难户”注意&#xff0c;今天我给大家分享一个超适合小白的线性代数学习笔记&#xff0c;只有12页纸&#xff0c;一半都是图解&#xff0c;不用担心看不懂。 这份笔记名为《线性代数的艺术》&#xff0c;是日本学者Kenji Hiranabe基于Gilbert Strang教授的《每个人…

Vue 组件传参 prop/emit

学习了组件用法&#xff0c;就像一种嵌套引用关系&#xff0c;在这个关系中&#xff0c;经常会涉及相互传数据的需求&#xff0c;即父组件传子组件&#xff0c;子组件传父组件。 父、子组件的关系可以总结为&#xff1a; prop 向下传递&#xff08;父传子&#xff09;&#xf…

Docker复习

目录 1. Docker的理解1.1 Docker三要素 2 安装Docker2.1 安装命令2.2 配置阿里云加速器 3 Docker命令3.1 启动类命令3.2 镜像类命令 4 实战4.1 启动容器&#xff0c;自动创建实例4.2 查看Docker内启动的容器4.3 退出容器4.4 其他4.5 导入导出文件4.6 commit 5 Dockerfile5.1 理…

MySQL数据库局域网连接

目录 前言 客户端 开启访问权限 防火墙设置 windows Linux 测试连接 前言 MySQL数据库远程连接&#xff08;局域网&#xff09;是指在局域网内的不同计算机或设备之间&#xff0c;通过网络连接到MySQL数据库服务器的过程。在这种情况下&#xff0c;MySQL数据库服务器位…

编译原理

一&#xff0c;基本概念 二&#xff0c;词法分析

使用python部署chineseocr_lite

使用python部署chineseocr_lite 简介安装报错解决python调用结果 简介 项目地址&#xff1a;https://github.com/DayBreak-u/chineseocr_lite chineseocr_lite 是一个开源项目&#xff0c;用来实现中文的文字识别&#xff0c;支持竖排文字识别、繁体识别&#xff0c;总模型只…