整合K8s+SpringBoot+gRpc

news2024/11/16 10:53:34

本文使用K8s当做服务注册与发现、配置管理,使用gRpc用做服务间的远程通讯

一、先准备K8s

我在本地有个K8s单机

二、准备service-provider

  1. pom

<?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.5.14</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.example</groupId>
    <artifactId>service-provider</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>service-provider</name>
    <description>service-provider</description>
    <properties>
        <java.version>11</java.version>
        <!--        <os.detected.classifier>osx-aarch_64</os.detected.classifier>-->
        <os.detected.classifier>osx-x86_64</os.detected.classifier>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <type>pom</type>
                <scope>import</scope>
                <version>2.5.14</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>2020.0.6</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-kubernetes-dependencies</artifactId>
                <version>1.1.10.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-kubernetes-client-all</artifactId>
        </dependency>

        <!-- gRpc -->
        <dependency>
            <groupId>net.devh</groupId>
            <artifactId>grpc-spring-boot-starter</artifactId>
            <version>2.13.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-protobuf</artifactId>
            <version>1.52.1</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
            <version>1.18.24</version>
        </dependency>
    </dependencies>

    <build>
        <extensions>
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>1.7.1</version>
            </extension>
        </extensions>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <classifier>exec</classifier>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.xolstice.maven.plugins</groupId>
                <artifactId>protobuf-maven-plugin</artifactId>
                <version>0.6.1</version>
                <configuration>
                    <protocArtifact>com.google.protobuf:protoc:3.21.7:exe:${os.detected.classifier}</protocArtifact>
                    <pluginId>grpc-java</pluginId>
                    <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.52.1:exe:${os.detected.classifier}</pluginArtifact>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>compile-custom</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
  1. 配置文件 application.yml

grpc:
  server:
    port: 9090
server:
  port: 30000
spring:
  application:
    name: service-provider
  cloud:
    kubernetes:
      reload:
        enabled: true
        mode: polling
        period: 5000

logging:
  level:
    org.springframework.cloud.loadbalancer: debug
  1. 主类 ServiceProviderApplication

package com.example.service.provider;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

@SpringBootApplication
@EnableDiscoveryClient
public class ServiceProviderApplication {

    public static void main(String[] args) {
        SpringApplication.run(ServiceProviderApplication.class, args);
    }
}
  1. 在 src/main/proto文件夹下新增PB文件 HelloFacade.proto

syntax = "proto3";

option java_multiple_files = true;
option java_package = "com.example.service.provider.api";
option java_outer_classname = "HelloServiceProto";

service HelloService {
  rpc SayHello (SayHelloRequest) returns (SayHelloResponse) {
  }
}

message SayHelloRequest {
  string name = 1;
}

message SayHelloResponse {
  int32 code = 1;
  string message = 2;
  bool success = 3;
  SayHelloData data = 4;
}

message SayHelloData {
  string name = 1;
  string content = 2;
}
  1. 接口实现类

package com.example.service.provider.facade;

import com.example.service.provider.api.HelloServiceGrpc;
import com.example.service.provider.api.SayHelloData;
import com.example.service.provider.api.SayHelloRequest;
import com.example.service.provider.api.SayHelloResponse;
import lombok.extern.slf4j.Slf4j;
import net.devh.boot.grpc.server.service.GrpcService;

@Slf4j
@GrpcService
public class HelloServiceImpl extends HelloServiceGrpc.HelloServiceImplBase {

    @Override
    public void sayHello(SayHelloRequest request, io.grpc.stub.StreamObserver<SayHelloResponse> responseObserver) {
        log.info("接收consumer的say hello grpc 请求");
        SayHelloData helloData = SayHelloData.newBuilder()
                .setName("maple")
                .setContent("say hello")
                .build();
        SayHelloResponse.Builder builder = SayHelloResponse.newBuilder()
                .setCode(0)
                .setMessage("success")
                .setSuccess(true)
                .setData(helloData);
        responseObserver.onNext(builder.build());
        responseObserver.onCompleted();
    }
}
  1. Dockerfile

FROM openjdk:11-jdk-slim
ENV jarName="service-provider.jar"
ADD service-provider-0.0.1-SNAPSHOT-exec.jar $jarName
ENTRYPOINT java -Duser.timezone=GMT+8 -jar  $jarName
  1. K8s声明yaml文件 service-provider-deploy.yaml

apiVersion: v1
kind: Namespace
metadata:
  name: service-k8s-demo
  labels:
    name: service-k8s-demo

---

apiVersion: v1
kind: ServiceAccount
metadata:
  name: service-k8s-demo
  namespace: service-k8s-demo

---

kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  namespace: service-k8s-demo
  name: service-k8s-demo
rules:
  - apiGroups:
    - ""
    resources:
    - services
    - configmaps
    - endpoints
    - nodes
    - pods
    - secrets
    - namespaces
    verbs:
    - get
    - list
    - watch

---

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: service-k8s-demo
  namespace: service-k8s-demo
subjects:
- kind: ServiceAccount
  name: service-k8s-demo
  namespace: service-k8s-demo
roleRef:
  kind: ClusterRole
  name: service-k8s-demo
  apiGroup: rbac.authorization.k8s.io

---

apiVersion: apps/v1
kind: Deployment
metadata:
  name: service-provider
  namespace: service-k8s-demo
  labels:
    app: service-provider
spec:
  replicas: 3
  template:
    metadata:
      name: service-provider
      labels:
        app: service-provider
    spec:
      containers:
        - name: service-provider
          image: service-provider:1.0
          ports:
            - name: http
              protocol: TCP
              containerPort: 30000
            - name: grpc
              protocol: TCP
              containerPort: 9090
          imagePullPolicy: IfNotPresent
      serviceAccountName: service-k8s-demo
      restartPolicy: Always
  selector:
    matchLabels:
      app: service-provider

---

apiVersion: v1
kind: Service
metadata:
  name: service-provider
  namespace: service-k8s-demo
spec:
  selector:
    app: service-provider
  ports:
    - port: 80
      targetPort: 30000
      name: http
    - port: 9090
      targetPort: 9090
      name: grpc
  clusterIP: None
  1. 本地启动测试

三、准备service-consumer

  1. pom

<?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.5.14</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.example</groupId>
    <artifactId>service-consumer</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>service-consumer</name>
    <description>service-consumer</description>
    <properties>
        <java.version>11</java.version>
    </properties>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <type>pom</type>
                <scope>import</scope>
                <version>2.5.14</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>2020.0.6</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-kubernetes-dependencies</artifactId>
                <version>1.1.10.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>

        <dependency>
            <groupId>com.example</groupId>
            <artifactId>service-provider</artifactId>
            <version>0.0.1-SNAPSHOT</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-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-kubernetes-client-all</artifactId>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
            <version>1.18.24</version>
        </dependency>

        <!-- gRpc -->
        <dependency>
            <groupId>net.devh</groupId>
            <artifactId>grpc-spring-boot-starter</artifactId>
            <version>2.13.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-protobuf</artifactId>
            <version>1.52.1</version>
        </dependency>
    </dependencies>

    <build>
        <extensions>
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>1.7.1</version>
            </extension>
        </extensions>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <classifier>exec</classifier>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.xolstice.maven.plugins</groupId>
                <artifactId>protobuf-maven-plugin</artifactId>
                <version>0.6.1</version>
                <configuration>
                    <protocArtifact>com.google.protobuf:protoc:3.21.7:exe:${os.detected.classifier}</protocArtifact>
                    <pluginId>grpc-java</pluginId>
                    <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.52.1:exe:${os.detected.classifier}</pluginArtifact>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>compile-custom</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>
</project>
  1. 配置文件 application.yml

grpc:
  server:
    port: 9091
  client:
    service-provider:
      negotiation-type: plaintext
      enable-keep-alive: true
      keep-alive-without-calls: true
      address: 'static://service-provider:9090'

server:
  port: 30001
spring:
  application:
    name: service-consumer
  cloud:
    kubernetes:
      reload:
        enabled: true
        mode: polling
        period: 5000

logging:
  level:
    org.springframework.cloud.loadbalancer: debug
  1. 主类 ServiceConsumerApplication

package com.example.service.consumer;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@EnableDiscoveryClient
@SpringBootApplication
@RequiredArgsConstructor
public class ServiceConsumerApplication {

    private final DiscoveryClient discoveryClient;
    private final ProviderServiceGrpcClient providerServiceGrpcClient;

    public static void main(String[] args) {
        SpringApplication.run(ServiceConsumerApplication.class, args);
    }
    
    @GetMapping("/grpc/hello")
    public String sayHello() {
        log.info("消费服务:service-consumer grpc 调用 service-provider");
        return providerServiceGrpcClient.sayHello();
    }

    @GetMapping("/consumers/services")
    public List<String> findServices() {
        log.info("当前注册中心下所有服务");
        List<String> services = discoveryClient.getServices();
        services.stream().map(discoveryClient::getInstances).forEach(v ->
                v.forEach(s -> System.out.printf("%s:%s  uri:%s%n", s.getHost(), s.getPort(), s.getUri())));

        return services;
    }
}

  1. gRpc调用Provider ProviderServiceGrpcClient

package com.example.service.consumer;

import com.example.service.provider.api.HelloServiceGrpc;
import com.example.service.provider.api.SayHelloRequest;
import com.example.service.provider.api.SayHelloResponse;
import net.devh.boot.grpc.client.inject.GrpcClient;
import org.springframework.stereotype.Service;

@Service
public class ProviderServiceGrpcClient {

    @GrpcClient("service-provider")
    private HelloServiceGrpc.HelloServiceBlockingStub helloServiceBlockingStub;

    public String sayHello() {

        SayHelloRequest request = SayHelloRequest.newBuilder().setName("maple123").build();

        SayHelloResponse sayHelloResponse = helloServiceBlockingStub.sayHello(request);

        return sayHelloResponse.toString();
    }
}
  1. Dockerfile

FROM openjdk:11-jdk-slim
ENV jarName="service-consumer.jar"
ADD service-consumer-0.0.1-SNAPSHOT-exec.jar $jarName
ENTRYPOINT java -Duser.timezone=GMT+8 -jar  $jarName
  1. K8s声明yaml文件 service-consumer-deploy.yaml

apiVersion: v1
kind: Namespace
metadata:
  name: service-k8s-demo
  labels:
    name: service-k8s-demo

---

apiVersion: v1
kind: ServiceAccount
metadata:
  name: service-k8s-demo
  namespace: service-k8s-demo

---

kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  namespace: service-k8s-demo
  name: service-k8s-demo
rules:
  - apiGroups:
      - ""
    resources:
      - services
      - configmaps
      - endpoints
      - nodes
      - pods
      - secrets
      - namespaces
    verbs:
      - get
      - list
      - watch

---

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: service-k8s-demo
  namespace: service-k8s-demo
subjects:
  - kind: ServiceAccount
    name: service-k8s-demo
    namespace: service-k8s-demo
roleRef:
  kind: ClusterRole
  name: service-k8s-demo
  apiGroup: rbac.authorization.k8s.io

---

apiVersion: apps/v1
kind: Deployment
metadata:
  name: service-consumer
  namespace: service-k8s-demo
  labels:
    app: service-consumer
spec:
  replicas: 1
  template:
    metadata:
      name: service-consumer
      labels:
        app: service-consumer
    spec:
      containers:
        - name: service-consumer
          image: service-consumer:1.0
          ports:
            - name: http
              protocol: TCP
              containerPort: 30001
            - name: grpc
              protocol: TCP
              containerPort: 9091
          imagePullPolicy: IfNotPresent
      serviceAccountName: service-k8s-demo
      restartPolicy: Always
  selector:
    matchLabels:
      app: service-consumer

---

apiVersion: v1
kind: Service
metadata:
  name: service-consumer
  namespace: service-k8s-demo
spec:
  selector:
    app: service-consumer
  ports:
    - port: 80
      targetPort: 30001
      name: http
    - port: 9091
      targetPort: 9091
      name: grpc
  type: NodePort

  1. 本地启动测试

四、打镜像

docker build -t service-provider:1.0 .
docker build -t service-consumer:1.0 .

五、执行K8s yaml文件 创建命名空间、账号、角色、部署应用、暴露端口等

kubetl apply -f service-provider-deploy.yaml
kubetl apply -f service-consumer-deploy.yaml

六、查看与测试

gRpc正常访问,但是发现一个问题,下面的图片,上面三个是Provider,发现负载均衡失效了,请求全都打在了一个Provider里,搜了下发现和 gRpc基于HTTP2.0 多路复用 有关,之后再处理吧。

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

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

相关文章

Python3 模块实例及演示

在前面的几个章节中我们基本上是用 python 解释器来编程&#xff0c;如果从 Python 解释器退出再进入&#xff0c;那么定义的所有的方法和变量就都消失。 为此 Python 提供了1个办法&#xff0c;把这些定义存放在文件中&#xff0c;为一些脚本或者交互式的解释器实例使用&…

[oeasy]python0085_ASCII之父_Bemer_COBOL_数据交换网络

编码进化 回忆上次内容 上次 回顾了 字符编码的 进化过程 IBM 在数字化过程中 作用 非常大IBM 的 BCDIC 有 黑历史 &#x1f604; 6-bit的 BCDIC 直接进化成 8-bit的 EBCDIC补全了 小写字母 和 控制字符 在ibm就是信息产业的年代 ibm的标准 怎么最终 没有成为 行业的标准 呢…

OCR标注方法

虽然说标注工作不是由算法工程师负责的&#xff0c;但是如何标注&#xff0c;标注要求却是由算法工程师指导标注人员去实施的&#xff0c;如果标注工作人员标注的数据有问题&#xff0c;就会出现模型训练不收敛的问题&#xff0c;导致很多问题的出现&#xff0c;所以标注要求很…

MySql调优基础知识

MySql调优 调优金字塔 系统设计&#xff1a;数据不适合放入mysql&#xff0c;es、MQ、Redis、读写分离。 mysql调优&#xff1a;主要是索引且要熟悉业务。 mysql导致慢查询的原因是因为数据太多了。 1.sql查询 1.1尽量使用覆盖索引 1.2数据表结构&#xff0c;统计汇总&am…

普通单双面板的生产工艺流程之图形转移,华秋一文告诉你

衔接上文&#xff0c;继续为朋友们分享普通单双面板的生产工艺流程。 如图&#xff0c;第五道主流程为图形转移。 图形转移的目的为&#xff1a; 利用光化学原理&#xff0c;将图形线路的形状转移到印制板上&#xff0c;再利用化学原理&#xff0c;将图形线路在印制板上制作出…

Tomcat- AJP协议文件读取/命令执行漏洞(CVE-2020-1938 / CNVD-2020-10487)

CVE-2020-1938 1.概述1.1 tomcat概述1.2 gostcat概述 - 漏洞概述2. 漏洞成因2.1 前置基础2.1.1 Tomcat Connector(连接器)2.1.2 Servlet(服务程序)2.1.3 Tomcat内部处理请求流程2.2 源码追踪分析两个利用方案的执行流程2.2.1 获取利用poc2.2.2 文件读取漏洞关键点1&#xff1a;…

CSDN城市开发者联盟、C友会期待你的加入

文章目录&#x1f31f; 课前小差&#x1f31f; chatGPT&#x1f31f; CSDN中的持续学习&#x1f31f; 23年原力计划&#x1f31f; C友会、CDC&#x1f31f; 如何关联本地的开发者&#xff1f;&#x1f31f; 写在最后&#x1f31f; 课前小差 哈喽&#xff0c;大家好&#xff0c…

2月datawhale组队学习:大数据

文章目录一、大数据概述二、 Hadoop2.1 Hadoop概述2.2 su:Authentication failure2.3 使用sudo命令报错xxx is not in the sudoers file. This incident will be reported.2.4 创建用户datawhale&#xff0c;安装java8&#xff1a;2.5 安装单机版Hadoop2.5.1 安装Hadoop2.5.2 修…

excel报表技巧:几个关于汇报演示方面的小功能

年终了&#xff0c;总结汇报避免不了。如果你的PPT还不够好&#xff0c;那就直接用Excel做汇报吧~这里有5条小技巧&#xff0c;可以帮助你最高效地展示自己的成绩报表&#xff01;想象一下&#xff0c;用SHIFTCTRLF1全屏显示你的工作表&#xff0c;配合上CtrlPageDown进行工作表…

WMS系统解决方案,数据从“人工采集”转为“自动采集”

今年以来&#xff0c;新冠疫情危机促使国内企业重新审视自我发展&#xff0c;加速了行业转型的步伐。很多制造企业放慢了规模扩张的脚步&#xff0c;应需而变&#xff0c;从规模速度型向质量效率型转型升级。纵观市场现状&#xff0c;很多制造企业面临产能过剩、成本上升、库存…

CHAPTER 4 监控全网服务器

监控全网服务器4.1 需求说明4.2 规划方案4.2.1 api接口使用&#xff08;curl&#xff09;4.3 具体实施规划4.3.1 硬件、系统、网络监控4.3.2 应用服务监控4.3.3 监控服务通用方法4.4 实施全网监控4.4.1 使用自动发现规则4.4.2 监控备份服务器1. 添加模板2. 添加应用集3. 添加监…

【观察】Solidigm P44 Pro SSD评测:原厂品质+软硬兼施=性能怪兽

众所周知&#xff0c;目前SSD&#xff08;固态硬盘&#xff09;已取代HDD&#xff08;机械硬盘&#xff09;成为电脑中常见的存储设备&#xff0c;特别是在技术创新的持续推动下&#xff0c;如今SSD的速度和效率都在不断地提高&#xff0c;从SATA2 3GB发展到SATA3 6GB&#xff…

计算机组成原理学习笔记:循环冗余校验码

循环冗余校验码 CRC 码 循环冗余校验码 (cyclic redundancy Check, CRC) 十进制除法 从熟悉的十进制出发&#xff0c;假设现在你要给另一个人传送882这样的一个10进制数据&#xff0c;为了防止传送数据的过程中某一个数据发生错误你可以和你的另一个小伙伴约定一个除数&…

英文论文(sci)解读复现【NO.5】让RepVGG再次变得更强大:一种量化感知方法

此前出了目标检测算法改进专栏&#xff0c;但是对于应用于什么场景&#xff0c;需要什么改进方法对应与自己的应用场景有效果&#xff0c;并且多少改进点能发什么水平的文章&#xff0c;为解决大家的困惑&#xff0c;此系列文章旨在给大家解读发表高水平学术期刊中的SCI论文&am…

2023年可见光通信(LiFi)研究新进展

可见光无线通信Light Fidelity&#xff08;LiFi&#xff09;又称“光保真技术”&#xff0c;是一种利用可见光进行数据传输的全新无线传输技术。LiFi是一种以半导体光源作为信号发射源&#xff0c;利用无需授权的自由光谱实现无线连接的新型无线通信技术&#xff0c;支持高密度…

内网渗透(三十六)之横向移动篇-Password Spraying密码喷洒攻击和域内用户枚举横向移动

系列文章第一章节之基础知识篇 内网渗透(一)之基础知识-内网渗透介绍和概述 内网渗透(二)之基础知识-工作组介绍 内网渗透(三)之基础知识-域环境的介绍和优点 内网渗透(四)之基础知识-搭建域环境 内网渗透(五)之基础知识-Active Directory活动目录介绍和使用 内网渗透(六)之基…

【原创】java+swing+mysql宿舍报修管理系统设计与实现

本文主要想利用javaswingmysql等开发技术设计一个高校宿舍报修管理系统&#xff0c;方便广大学生对宿舍中损坏的物品进行报修处理&#xff0c;提高报修效率。 功能分析&#xff1a; 宿舍报修管理系统的使用角色&#xff0c;一般分为管理员和学生&#xff0c;管理员主要进行学…

深入理解顺序io和随机io(全网最详细篇)

MySql系列整体栏目 内容链接地址【一】深入理解mysql索引本质https://blog.csdn.net/zhenghuishengq/article/details/121027025【二】深入理解mysql索引优化以及explain关键字https://blog.csdn.net/zhenghuishengq/article/details/124552080【三】深入理解mysql的索引分类&a…

汽车如何实现制动

汽车如何实现制动 汽车如何实现制动 难点答疑&#xff1a;汽车刹车时&#xff0c;四个车轮是如何制动的&#xff1f;制动机理是什么&#xff1f; 第一步&#xff1a;驾驶员踩下制动踏板&#xff0c;推动制动主缸 第二步&#xff1a;制动主缸将制动液的压力通过制动管道传递到四…

数据结构代码总结(C语言实现)

目录如何应对数据结构的代码题&#xff1f;采取的学习流程①首先对C语言的语法的熟悉②学习掌握基本代码的写法&#xff0c;做到熟练2.1插入排序2.2快速排序2.3二分查找2.4树的遍历③跟着网上视频开始熟悉对一些问题的解答④结合真题的代码&#xff0c;寻找其中的结题规律如何应…