spring boot学习第十三篇:使用jsonrpc

news2024/11/26 22:21:48

因为我学习spring boot会有很多内容,所以和spring boot有关的文章使用的pom.xml和application.yml这2个文件的内容就全列出来,不用再单独抽出来了,单独抽出来有点麻烦也不方便学习。

1、pom.xml文件内容如下:

<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.6.4</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.hmblogs</groupId>
    <artifactId>hm-jsonRpc</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>hm-jsonRpc</name>
    <description>hm-jsonRpc</description>
    <properties>
        <java.version>8</java.version>
        <druid.version>1.2.8</druid.version>
        <log4jdbc.version>1.16</log4jdbc.version>
        <es.version>7.9.2</es.version>
    </properties>
    <dependencies>
        <!-- druid数据源驱动 -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid-spring-boot-starter</artifactId>
            <version>${druid.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- mybatis -->
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
            <version>3.5.3.1</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>

        <!--Mysql依赖包-->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!--lombok插件-->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>

        <!--监控sql日志-->
        <dependency>
            <groupId>org.bgee.log4jdbc-log4j2</groupId>
            <artifactId>log4jdbc-log4j2-jdbc4.1</artifactId>
            <version>${log4jdbc.version}</version>
        </dependency>

        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.2.9</version>
        </dependency>

        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-clients</artifactId>

        </dependency>

        <dependency>
            <groupId>org.springframework.kafka</groupId>
            <artifactId>spring-kafka</artifactId>

        </dependency>

        <!-- high client-->
        <dependency>
            <groupId>org.elasticsearch.client</groupId>
            <artifactId>elasticsearch-rest-high-level-client</artifactId>
            <version>${es.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.elasticsearch</groupId>
                    <artifactId>elasticsearch</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.elasticsearch.client</groupId>
                    <artifactId>elasticsearch-rest-client</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- rest-high-level-client 依赖如下2个jar -->
        <dependency>
            <groupId>org.elasticsearch</groupId>
            <artifactId>elasticsearch</artifactId>
            <version>${es.version}</version>
        </dependency>
        <dependency>
            <groupId>org.elasticsearch.client</groupId>
            <artifactId>elasticsearch-rest-client</artifactId>
            <version>${es.version}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-mongodb</artifactId>
        </dependency>

        <dependency>
            <groupId>com.github.briandilley.jsonrpc4j</groupId>
            <artifactId>jsonrpc4j</artifactId>
            <version>1.5.3</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

2、application.yml文件内容如下:

server:
  port: 8081
  servlet.context-path: /

#配置数据源
spring:
  datasource:
    druid:
      db-type: com.alibaba.druid.pool.DruidDataSource
      driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
      url: jdbc:log4jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:eladmin}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
      username: ${DB_USER:root}
      password: ${DB_PWD:demo}
  redis:
    host: localhost
    port: 6379
    password: demo
    database: 10
  data:
    mongodb:
      host: 43.138.0.199
      port: 27017
      username: hmblogs
      password: demo
      database: hmblogs
      authentication-database: admin

es:
  host: 43.138.0.199
  port: 9200
  scheme: http
  user: elastic
  password: demo

3、启动类BackendApplication内容如下:

package com.hmblogs.backend;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class BackendApplication {

    public static void main(String[] args) {
        SpringApplication.run(BackendApplication.class, args);
    }

}

4、接口类AcceptSignedAPI内容如下:

package com.hmblogs.backend.jsonRpc;

import com.googlecode.jsonrpc4j.JsonRpcService;

@JsonRpcService(value = "acceptSigned")
public interface AcceptSignedAPI {
    public void acceptSigned(Object o);
}

5、接口实现类AcceptSignedImpl内容如下:

package com.hmblogs.backend.jsonRpc;

import com.googlecode.jsonrpc4j.spring.AutoJsonRpcServiceImpl;
import org.springframework.stereotype.Service;

@Service
@AutoJsonRpcServiceImpl
public class AcceptSignedImpl implements AcceptSignedAPI {

    @Override
    public void acceptSigned(Object o) {
        System.out.println("222"+o);
    }
}

6、工具类RpcClientUtil内容如下:

package com.hmblogs.backend.jsonRpc;

import com.googlecode.jsonrpc4j.JsonRpcHttpClient;
import java.net.URL;

/**
 * address:要送数据到哪个地址
 * params : json数据
 * methodName: 接口的方法名字
 */
public class RpcClientUtil {
    public static String postJsonRPC(String address, Object params, String methodName) throws Throwable {
        URL url = null;
        JsonRpcHttpClient jsonRpcHttpClient = null;
        String result = null;
        try {
            url = new URL(address);
            jsonRpcHttpClient = new JsonRpcHttpClient(url);
            result = jsonRpcHttpClient.invoke(methodName, params, String.class);
        } catch (Exception e) {
            throw e;
        }  finally {
            url = null;
            jsonRpcHttpClient = null;
        }
        return result;
    }

}

7、测试类RpcTest内容如下:

package com.hmblogs.backend.jsonRpc;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.junit.Test;

public class RpcTest {
    @Test
    public void sendRpc() throws Throwable {

        JSONObject jsonO = new JSONObject();
        jsonO.put("name","hem");
        jsonO.put("sex","nan");
        JSONArray jsonArray = new JSONArray();
        jsonArray.add(jsonO);
        RpcClientUtil.postJsonRPC("http://127.0.0.1:8081/acceptSigned", "[{\"sex\":\"nan\",\"name\":\"1111\"}]","acceptSigned");
    }

}

然后报错了,文件结构、运行方法、报错整体截图如下:

报错内容如下:

16:31:29,188 |-INFO in ch.qos.logback.classic.LoggerContext[logback] - Could NOT find resource [logback-test.xml]
16:31:29,188 |-INFO in ch.qos.logback.classic.LoggerContext[logback] - Found resource [logback.xml] at [file:/D:/workspace/hm-jsonRpc/target/classes/logback.xml]
16:31:29,248 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
16:31:29,254 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Will scan for changes in [file:/D:/workspace/hm-jsonRpc/target/classes/logback.xml] 
16:31:29,255 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeTask scanning period to 10 seconds
16:31:29,255 |-INFO in ch.qos.logback.classic.joran.action.ContextNameAction - Setting logger context name as [logback]
16:31:29,257 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
16:31:29,259 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [Console]
16:31:29,262 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
16:31:29,282 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
16:31:29,283 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [RollingFileBackend]
16:31:29,284 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
16:31:29,294 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@1453774246 - No compression will be used
16:31:29,295 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@1453774246 - Will use the pattern logs/hmblogs/log-hmblogs-%d{yyyy-MM-dd}.%i.log for the active file
16:31:29,297 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@18ce0030 - The date pattern is 'yyyy-MM-dd' from file name pattern 'logs/hmblogs/log-hmblogs-%d{yyyy-MM-dd}.%i.log'.
16:31:29,297 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@18ce0030 - Roll-over at midnight.
16:31:29,298 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@18ce0030 - Setting initial period to Mon Feb 19 16:15:00 CST 2024
16:31:29,298 |-WARN in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@18ce0030 - SizeAndTimeBasedFNATP is deprecated. Use SizeAndTimeBasedRollingPolicy instead
16:31:29,298 |-WARN in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@18ce0030 - For more information see http://logback.qos.ch/manual/appenders.html#SizeAndTimeBasedRollingPolicy
16:31:29,301 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[RollingFileBackend] - Active log file name: logs/hmblogs.log
16:31:29,301 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[RollingFileBackend] - File property is set to [logs/hmblogs.log]
16:31:29,302 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.springframework] to INFO
16:31:29,302 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting additivity of logger [org.springframework] to false
16:31:29,302 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [Console] to Logger[org.springframework]
16:31:29,302 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [RollingFileBackend] to Logger[org.springframework]
16:31:29,303 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.mybatis] to INFO
16:31:29,303 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.hibernate.SQL] to DEBUG
16:31:29,303 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting additivity of logger [org.hibernate.SQL] to false
16:31:29,303 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [Console] to Logger[org.hibernate.SQL]
16:31:29,303 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [RollingFileBackend] to Logger[org.hibernate.SQL]
16:31:29,303 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache.catalina] to INFO
16:31:29,303 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache.tomcat.util] to INFO
16:31:29,303 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
16:31:29,303 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [Console] to Logger[ROOT]
16:31:29,303 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [RollingFileBackend] to Logger[ROOT]
16:31:29,303 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
16:31:29,303 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@4445629 - Registering current configuration as safe fallback point


com.googlecode.jsonrpc4j.HttpException: stream is closed

	at com.googlecode.jsonrpc4j.JsonRpcHttpClient.invoke(JsonRpcHttpClient.java:161)
	at com.googlecode.jsonrpc4j.JsonRpcHttpClient.invoke(JsonRpcHttpClient.java:118)
	at com.googlecode.jsonrpc4j.JsonRpcHttpClient.invoke(JsonRpcHttpClient.java:176)
	at com.hmblogs.backend.jsonRpc.RpcClientUtil.postJsonRPC(RpcClientUtil.java:19)
	at com.hmblogs.backend.jsonRpc.RpcTest.sendRpc(RpcTest.java:16)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
	at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
 at [Source: (com.googlecode.jsonrpc4j.NoCloseInputStream); line: 1, column: 2]
	at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:2391)
	at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:735)
	at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:659)
	at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._handleUnexpectedValue(UTF8StreamJsonParser.java:2737)
	at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._nextTokenNotInObject(UTF8StreamJsonParser.java:902)
	at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:794)
	at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4761)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4667)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3666)
	at com.googlecode.jsonrpc4j.ReadContext.nextValue(ReadContext.java:25)
	at com.googlecode.jsonrpc4j.JsonRpcClient.readResponseNode(JsonRpcClient.java:312)
	at com.googlecode.jsonrpc4j.JsonRpcClient.getValidResponse(JsonRpcClient.java:246)
	at com.googlecode.jsonrpc4j.JsonRpcClient.readResponse(JsonRpcClient.java:194)
	at com.googlecode.jsonrpc4j.JsonRpcClient.readResponse(JsonRpcClient.java:531)
	at com.googlecode.jsonrpc4j.JsonRpcHttpClient.invoke(JsonRpcHttpClient.java:159)
	... 31 more

怎么处理呢,搜了一圈资料没解决该问题。

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

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

相关文章

[深度学习] 卷积神经网络“卷“在哪里?

​ &#x1f308; 博客个人主页&#xff1a;Chris在Coding &#x1f3a5; 本文所属专栏&#xff1a;[深度学习] ❤️ 热门学习专栏&#xff1a;[Linux学习] ⏰ 我们仍在旅途 目录 1.卷积的定义 2.卷积的"卷"在哪里 3.什么又是卷积神…

【HTML】SVG实现炫酷的描边动画

前沿 今天闲来无事&#xff0c;看到Antfu大佬的个性签名&#xff0c;觉得还是非常炫酷的&#xff0c;于是也想要搞一个自己的个性签名用来装饰自己的门面&#xff0c;不过由于手写的签名太丑了&#xff0c;遂放弃。于是尝试理解原理&#xff0c;深入研究此等密法&#xff0c;终…

读写分离的利器——MySQL Proxy

0 引言 MySQL Proxy是一个位于客户端和MySQL服务器端之间的程序&#xff0c;通过它可以实现监听和管理客户端与MySQL服务器端之间的通信&#xff0c;最大的作用是实现数据库的读写分离&#xff0c;从而达到负载均衡的目的。 MySQL Proxy的常用用途包括负载平衡、故障分析、查…

纯前端低代码平台demo,vue框架,nodejs,简单的pm2纯前端部署实践

文章目录 目录结构说明本地运行项目启动后的页面demo前端部署打包pm2nginx 后话 前段时间开发了一个纯前端的低代码平台demo&#xff0c;vue框架&#xff0c;nodejs&#xff0c;pm2纯前端部署实践。为此记录一下开发过程以及各方面遇到的问题&#xff0c;并作说明。 表单用了若…

74VHC4040使用方法

74VHC4040芯片是一款12位异步二进制计数器 Q:数据输出引脚。 CP:计数引脚。当CP引脚接收到下降沿&#xff08;从高电平电平变为低电平&#xff09;时&#xff0c;计数器的输出Q会加一。MR:复位输入。当MR引脚接收到高电平时&#xff0c;计数器的所有输出都会变为低电平&#…

特征提取匹配方案不止SuperPoint

局部特征匹配在计算机视觉领域广泛应用&#xff0c;涵盖图像检索、3D重建和目标识别等领域。然而&#xff0c;由于视点和光照变化等因素&#xff0c;改进匹配的准确性和鲁棒性仍然面临挑战。近年来&#xff0c;深度学习模型的引入引发了对局部特征匹配技术的广泛探索。这些方法…

MoonBit新增functional for loop控制流支持

1. 增加functional for loop控制流支持 与传统的命令式for loop 不同&#xff0c;循环变量是不可变的。这样的设计将来也容易抽取出来做形式化验证&#xff1a; fn init {for i 0; i < 5; i i 1 {debug(i)// i i 4 error: The variable i is not mutable.} }输出&am…

基于物联网的工业企业能耗监控系统

上海安科瑞电气股份有限公司 胡冠楠 咨询家&#xff1a;“Acrelhgn”&#xff0c;了解更多产品资讯 摘要&#xff1a;针对工业制造企业存在高能耗、高污染的问题&#xff0c;提出了一种用于工业企业能耗监控的多层级网络系统。本系统可完成企业内部电力、水资源以及燃气等能源…

【内网穿透】如何在小米4A中刷OpenWRT并实现公网访问本地路由器

文章目录 前言1. 安装Python和需要的库2. 使用 OpenWRTInvasion 破解路由器3. 备份当前分区并刷入新的Breed4. 安装cpolar内网穿透4.1 注册账号4.2 下载cpolar客户端4.3 登录cpolar web ui管理界面4.4 创建公网地址 5. 固定公网地址访问 前言 OpenWRT是一个高度模块化、高度自…

linux基础学习(10):基本权限与相关命令

1.基本权限 用ls -l查看当前目录文件时&#xff0c;可以看到文件的基本权限 其由10位组成&#xff0c;其中&#xff1a; 第1位&#xff1a;代表文件类型。 - d lbc普通文件目录文件软链接文件块设备文件&#xff0c;也就是硬盘等存储设备的文件字符设备文件&#xff0c;是鼠…

迈向AI时代:掌握Python编程与ChatGPT的强强联手

文章目录 一、ChatGPT与Python编程的结合二、利用ChatGPT学习Python编程的优势三、如何使用ChatGPT学习Python编程四、学习技巧与建议《码上行动&#xff1a;用ChatGPT学会Python编程》特色内容简介作者简介目录获取方式 随着人工智能技术的飞速发展&#xff0c;编程已经成为了…

如何在三维地球上加载obj、fbx、ifc、dae、3ds、gltf/glb模型?

通过以下方法可以在三维地球上加载obj、fbx、ifc、dae、3ds、gltf/glb模型。 方法/步骤 下载三维地图浏览器 http://www.geosaas.com/download/map3dbrowser.exe&#xff0c;安装完成后桌面上出现”三维地图浏览器“图标。 2、双击桌面图标打开”三维地图浏览器“ 3、点击“…

element-ui 中合并表格的总结

合并表头 <el-table :span-method"objectSpanMethod" :header-cell-style"headerMethod"/>// 合并表头headerMethod6({ row, cloumn, rowIndex, columnIndex }) {// row数组对应的是每一列row[0].colSpan 0row[1].colSpan 2if (columnIndex 0) {r…

基础antdesign的业务型 短时间控件封装(复制即可使用)

{/* startFieldName 开始时间标识 endFieldName 结束时间标识 label 同form lable rules 是否开启规则校验 默认开启 detailData 详情数据&#xff0c;用于编辑回显 dateRange 限制结束时间的范围 例如&#xff1a;开始时间选择了 2024-02-05 &#xff0c;加上 dateRange3 后 只…

【Jvm】性能调优(下)线上问题排查思路汇总

文章目录 前言性能调优&#xff08;上&#xff09;线上问题排查工具汇总JVM调优&#xff08;中&#xff09;Java中不得不了解的OOM Error 一.JVM参数1.参数分类2.非稳定参数&#xff08;-XX&#xff09;说明3.查询JVM默认参数及运行时生效参数4.常用参数5.GC日志相关参数6.发生…

linux基础命令和示例

redis在go语言中的使用 以下说明以读者有redis基础的前提下进行 未学习redis的可以到b站1小时浅学redis了解大概&#xff0c;学会如何使用 【GeekHour】一小时Redis教程_哔哩哔哩_bilibili 以下开发环境以windows为测试环境&#xff0c;旨在练习redis在go语言中的使用 red…

并查集,真好用,一次AC不是梦!

文章目录 &#x1f680;前言&#x1f680;并查集&#x1f680;并查集的两个优化✈️路径压缩✈️按秩合并 &#x1f680;并查集代码模板 &#x1f680;前言 大家好啊&#xff01;今天阿辉来给大家介绍一种简洁而优雅的数据结构——并查集&#xff0c;不知道各位是否了解它&…

IC会员卡写编号,写印刷卡号,卡面卡号,加密D3读卡器R330读卡器会员卡系统

IC卡作为会员卡来使用&#xff0c;比磁条卡安全耐用 游戏厅会员卡、酒店会员卡、美容养生会所会员卡等 IC卡片印刷好以后&#xff0c;要把卡面印刷编号写入到卡片中&#xff0c;才可以在会员卡系统上使用 用以下软件可以批量写入 写入以后&#xff0c;我读取卡片内的数据 把数…

旧衣回收小程序开发,市场发展潜力巨大

在当下快节奏生活下&#xff0c;人们的闲置衣物越来越多&#xff0c;为了减少浪费&#xff0c;旧衣回收成成为了大众的选择。旧衣回收能够降低人们的损失&#xff0c;减少我国资源浪费&#xff0c;又能循环利用&#xff0c;是我国一个环保商业模式。 “互联网旧衣回收”推动市场…

【Effective Objective - C】—— block 块

【Effective Objective - C】—— block 块 前言37.理解块的概念块的基础知识块可以捕获变量内联块的用法块的内部结构栈块堆块全局块要点 38.为常用的块类型创建typedef要点 39.用handler块降低代码分散程度协议传值实现异步块实现异步回调操作里的块要点 40.用块引用其所属对…