spring cloud config是一个基于http协议的远程配置实现方式。

通过统一的配置管理服务器进行配置管理,客户端通过http协议主动的拉取服务的的配置信息,完成配置获取。

下面我们对spring cloud config配置中心进行搭建

主要有以下模块

eureka-server 服务注册中心

eureka-config config配置中心

eureka-config-resp1  git远程仓库,用于存储客户端的配置文件

eureka-client1 客户端1,它的配置从config配置中心读取

eureka-client2 客户端2,它的配置从config配置中心读取

 1. eureka-server注册中心

   1.1 eureka-server 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.2.5.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.devin</groupId>
<artifactId>eureka-server</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>eureka-server</name>
<description>Demo project for Spring Boot</description> <properties>
<java.version>1.8</java.version>
<spring-cloud.version>Hoxton.SR3</spring-cloud.version>
</properties> <dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency> <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
<scope>compile</scope>
</dependency> <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency> <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency> <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies> <dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement> <build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build> </project>

1.2  安全配置

package com.devin.eurekaserver.config;

import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; @EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Override
protected void configure(HttpSecurity http) throws Exception {
//关闭csrf
super.configure(http);
//开启认证
http.csrf().disable();
}
}

 1.3 启动类

    

package com.devin.eurekaserver;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; @EnableEurekaServer
@SpringBootApplication
public class EurekaServerApplication { public static void main(String[] args) {
SpringApplication.run(EurekaServerApplication.class, args);
} }

  1.4  eureka-server application.yml 配置

      启动端口为 7001

server:
port: 7001 #启动端口
spring:
#应用名称
application:
name: eureka-server
#安全配置
security:
basic:
enabled: true
user:
name: dev
password: 123456 #eureka配置
eureka:
server:
#设置扫描失效服务的间隔时间
eviction-interval-timer-in-ms: 20000
enable-self-preservation: true
instance:
hostname: localhost
leaseRenewalIntervalInSeconds: 10
health-check-url-path: /actuator/health
client:
register-with-eureka: false #false:不作为一个客户端注册到注册中心
fetch-registry: false #为true时,可以启动,但报异常:Cannot execute request on any known server
service-url:
defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/ # health endpoint是否必须显示全部细节。默认情况下, /actuator/health 是公开的,并且不显示细节。
# 设置actuator开关
management:
security:
enabled: false
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: ALWAYS

 2. 配置中心config

   2.1  pom.xml 完整配置

主要添加了 config-server(配置中心) ,mq ,actuator(spring bus配置中心刷新), eureka-client 的依赖

ps: 搭建时在使用idea自带的版本时,在用到配置刷新时会报mq的异常,所以这里更改了spirngboot和spirng cloud的版本,具体看配置文件

<?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.1.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.devin</groupId>
<artifactId>eureka-config</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>eureka-config</name>
<description>Demo project for Spring Boot</description> <properties>
<java.version>1.8</java.version>
<spring-cloud.version>Greenwich.RELEASE</spring-cloud.version>
</properties> <dependencies> <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
</dependency> <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</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-sleuth</artifactId>
</dependency> <!-- springcloud-bus依赖实现配置自动更新,rabbitmq -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bus-amqp</artifactId>
</dependency> <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies> <dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement> <build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build> </project>

   2.2  启动类

   @EnableConfigServer 对config配置中心的支持

@EnableEurekaClient 将配置中心也作为一个eureka-client在注册中心进行注册

package com.devin.eurekaconfig;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.config.server.EnableConfigServer;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient; @EnableConfigServer
@EnableEurekaClient
@SpringBootApplication
public class EurekaConfigApplication { public static void main(String[] args) {
SpringApplication.run(EurekaConfigApplication.class, args);
} }

  

 2.3  config配置中心的配置文件

   我们这里采用了多profile的配置,分别对应dev和test环境

    2.3.1 bootstrap.yml

      主要配置了连接git仓库的地址,这里我们查找的路径按项目进行划分,使用了{application}占位,当客户端的服务名为eureka-client时,将在git地址的eureka-client文件夹下进行配置查找并使用

server:
port: 7009 spring:
profiles:
active: dev
#应用名称
application:
name: eureka-config
cloud:
config:
server:
git:
uri: https://github.com/devinzhang0209/eureka-config-resp1.git
# username: devinzhang0209
# password: yourgithubpassword
search-paths: /{application}
label: master # health endpoint是否必须显示全部细节。默认情况下, /actuator/health 是公开的,并且不显示细节。
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: ALWAYS

    2.3.2 测试环境功能 bootstrap-dev.yml

    主要配置了向eureka-server 进行注册,以及mq的配置用于配置的刷新

#配置config服务的账号密码
spring:
security:
user:
name: dev-config
password: 123456
rabbitmq:
host: localhost
port: 5672
username: guest
password: guest #注册中心配置
eureka:
auth:
user: dev
password: 123456
client:
service-url:
defaultZone: http://${eureka.auth.user}:${eureka.auth.password}@localhost:7001/eureka/
instance:
#使用IP进行注册
prefer-ip-address: true
#配置实例的注册ID
instance-id: ${spring.cloud.client.ip-address}:${server.port}
#心跳时间,即服务续约间隔时间(缺省为30s)
lease-renewal-interval-in-seconds: 5
#发呆时间,即服务续约到期时间(缺省为90s)
lease-expiration-duration-in-seconds: 10
health-check-url-path: /actuator/health

    2.3.3 测试环境功能 bootstrap-test.yml

     这里的配置和dev环境一样,主要是为了测试test环境去读取git仓库中test对应的配置信息

     

#配置config服务的账号密码
spring:
security:
user:
name: dev-config-test
password: test123456 #注册中心配置
eureka:
auth:
user: dev-test
password: test123456
client:
service-url:
defaultZone: http://${eureka.auth.user}:${eureka.auth.password}@192.168.0.12:7001/eureka/
instance:
#使用IP进行注册
prefer-ip-address: true
#配置实例的注册ID
instance-id: ${spring.cloud.client.ip-address}:${server.port}
#心跳时间,即服务续约间隔时间(缺省为30s)
lease-renewal-interval-in-seconds: 5
#发呆时间,即服务续约到期时间(缺省为90s)
lease-expiration-duration-in-seconds: 10
health-check-url-path: /actuator/health

  3. git仓库 eureka-config-resp1

git仓库中主要存储了不同eureka-client客户端的不同环境对应的配置文件, 结构如下:

git的地址是 https://github.com/devinzhang0209/eureka-config-resp1.git 这里我设置的是一个公共的仓库

下面我们展示eureka-clien的配置

      3.1  application.yml 

       

spring:
application:
name: eureka-client

     3.2  application-dev.yml

server:
port: 7003
msg: this msg is response by port 7003

 

     3.3 application-test.yml

server:
port: 7004
msg: this msg is response by port 7004

4. eureka-client 

   4.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.1.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.devin</groupId>
<artifactId>eureka-client</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>eureka-client</name>
<description>Demo project for Spring Boot</description> <properties>
<java.version>1.8</java.version>
<!--<spring-cloud.version>Hoxton.SR3</spring-cloud.version>-->
<spring-cloud.version>Greenwich.RELEASE</spring-cloud.version>
</properties> <dependencies> <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency> <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
<version>1.4.1.RELEASE</version>
</dependency> <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bus-amqp</artifactId>
</dependency> <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.1.8.RELEASE</version>
</dependency> <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency> <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies> <dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement> <build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build> </project>

  4.2  启动类

    

package com.devin.eurekaclient;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient; @EnableEurekaClient
@SpringBootApplication
public class EurekaClientApplication { public static void main(String[] args) {
SpringApplication.run(EurekaClientApplication.class, args);
} }

  

4.3  controller 测试类

其中 @RefreshScope,用于后续spring config bus刷新配置文件

package com.devin.eurekaclient.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController; /**
* @author Devin Zhang
* @className HelloController
* @description TODO
* @date 2020/4/2 9:50
*/
@RefreshScope
@RestController
public class HelloController {
@Value("${server.port}")
private Integer port; @Value("${msg}")
private String msg; @GetMapping("/getMSG")
public String getMsg() {
return msg + " ,response by port:" + port;
}
}

  

4.4  eureka-client的本地配置文件

 4.4.1 bootstrap.yml

     

spring:
profiles:
active: dev
#应用名称
application:
name: eureka-client
# health endpoint是否必须显示全部细节。默认情况下, /actuator/health 是公开的,并且不显示细节。
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: ALWAYS

 4.4.2  bootstrap-dev.yml

#注册中心配置
eureka:
auth:
user: dev
password: 123456
client:
service-url:
defaultZone: http://${eureka.auth.user}:${eureka.auth.password}@localhost:7001/eureka/
instance:
#使用IP进行注册
prefer-ip-address: true
#配置实例的注册ID
instance-id: ${spring.cloud.client.ip-address}:${server.port}
#心跳时间,即服务续约间隔时间(缺省为30s)
lease-renewal-interval-in-seconds: 5
#发呆时间,即服务续约到期时间(缺省为90s)
lease-expiration-duration-in-seconds: 10
health-check-url-path: /actuator/health spring:
cloud:
#config服务配置
config:
username: dev-config
password: 123456
fail-fast: false
#重试间隔时间
retry:
initial-interval: 3000
#从注册中心获取配置服务,以及配置服务名称
discovery:
enabled: true
service-id: eureka-config
rabbitmq:
host: localhost
port: 5672
username: guest
password: guest

    4.4.3  bootstrap-test.yml  

#注册中心配置
eureka:
auth:
user: dev
password: 123456
client:
service-url:
defaultZone: http://${eureka.auth.user}:${eureka.auth.password}@localhost:7001/eureka/
instance:
#使用IP进行注册
prefer-ip-address: true
#配置实例的注册ID
instance-id: ${spring.cloud.client.ip-address}:${server.port}
#心跳时间,即服务续约间隔时间(缺省为30s)
lease-renewal-interval-in-seconds: 5
#发呆时间,即服务续约到期时间(缺省为90s)
lease-expiration-duration-in-seconds: 10
health-check-url-path: /actuator/health spring:
cloud:
#config服务配置
config:
username: dev-config
password: 123456
fail-fast: false
#重试间隔时间
retry:
initial-interval: 3000
#从注册中心获取配置服务,以及配置服务名称
discovery:
enabled: true
service-id: eureka-config
rabbitmq:
host: localhost
port: 5672
username: guest
password: guest

5. eureka-client2 

eureka-client2 和 eureka-client 完全一样只是实例的名称不一样,方便我们验证多个client在配置中心注册 ,此处代码就不在展示

7. 消息队列RabbitMQ

配置中心刷新时需要用到消息队列

   7.1 安装RabbitMQ  

本文直接在windows上验证,需要安装如下软件:

Erlang  otp_win64_22.3.exe

RabbitMQ rabbitmq-server-3.8.3.exe

   7.2 配置环境变量

安装完成后需要如下环境变量

ERLANG_HOME=D:\Program Files\erl10.7

RABBITQM_SERVER=D:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.3

path=%Path%;%ERLANG_HOME%\bin;%RABBITQM_SERVER%\sbin;

    7.3 启动mq的服务

 7.4 开启RabbitMQ管理服务端

 rabbitmq-plugins enable rabbitmq_management

     

    开启后访问的默认地址: http://localhost:15672/  默认账号密码 guest/guest

8 验证配置中心

分别启动

eureka-server

eureka-config

eureka-client

eureka-client2

 

启动 eureka-client 和eureka-clent2 从启动日志中可以看到程序已经去配置中心7009读取配置并从github上读取了配置文件并使用

分别访问

http://localhost:7003/getMSG

http://localhost:7005/getMSG

可以看到euerka-client 和 eureka-client2 已经读取了启动端口,Controller也通过@Value读取了git中的配置信息

 9. Spring Cloud Bus 刷新配置 

刷新配置我们需要注意如下几点

   1. 在使用刷新配置时,需要去掉eureka-config 和eueka-client 中的安全验证 ,直接在pom文件中去掉如下依赖即可

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

   2. 在eureka-config 和eueka-client 的yml配置文件中添加RabbitMQ的配置

#配置config服务的账号密码
spring:
security:
user:
name: dev-config
password: 123456
rabbitmq:
host: localhost
port: 5672
username: guest
password: guest

  3. 在客户端所有用到读取配置文件的类上加上 @RefreshScope

  4. 刷新配置

刷新配置可以访问eureka-config也可以访问任何一个eureka-client的服务进行刷新,如下刷新请求只能通过post请求去调用

    通过eureka-config 去刷新   http://localhost:7009/actuator/bus-refresh

    通过eureka-client 去刷新   http://localhost:7003/actuator/bus-refresh

刷新后我们再后台log中可以看到,客户端已经去github上重新读取了最新的配置

再次访问客户端,可以看到客户端已经读取到了最新的配置

http://localhost:7003/getMSG

http://localhost:7005/getMSG

至此,spring cloud config配置中心搭建完毕

(七)Spring Cloud 配置中心config的更多相关文章

  1. Spring Cloud配置中心(Config)

    Spring Cloud配置中心(Config) Spring Cloud是现在流行的分布式服务框架,它提供了很多有用的组件.比如:配置中心.Eureka服务发现. 消息总线.熔断机制等. 配置中心在 ...

  2. 记录一个 spring cloud 配置中心的坑,命令行端口参数无效,被覆盖,编码集问题无法读取文件等.

    spring cloud 配置中心 结合GIT , 可以运行时更新配置文件.发送指令让应用重新读取配置文件. 最近在测试服务器实现了一套,结果CPU 实用率暴增,使用docker compose启动 ...

  3. spring cloud 配置中心

    1. spring cloud配置中心server 1.1 创建git仓库 首先在github上搭建一个存储配置中心的仓库,需要创建两个分支,一个是master,一个是dev分支.自己学习可以用公开库 ...

  4. springcloud(五):Spring Cloud 配置中心的基本用法

    Spring Cloud 配置中心的基本用法 1. 概述 本文介绍了Spring Cloud的配置中心,介绍配置中心的如何配置服务端及配置参数,也介绍客户端如何和配置中心交互和配置参数说明. 配置中心 ...

  5. springcloud(六):Spring Cloud 配置中心采用数据库存储配置内容

    Spring Cloud 配置中心采用数据库存储配置内容 转自:Spring Cloud Config采用数据库存储配置内容[Edgware+] Spring Cloud Server配置中心采用了G ...

  6. Spring Cloud配置中心搭建(集成Git)

    1. 在Github(或其他)创建配置中心仓库bounter-config-repo,然后在仓库创建两个配置文件:simon.properties.susan.properties,链接如下: htt ...

  7. Spring Cloud配置中心内容加密

    从配置获取的配置默认是明文的,有些像数据源这样的配置需要加密的话,需要对配置中心进行加密处理. 下面使用对称性加密来加密配置,需要配置一个密钥,当然也可以使用RSA非对称性加密,但对称加密比较方便也够 ...

  8. Spring Cloud配置中心高可用搭建

    本文通过config server连接git仓库来实现配置中心,除了git还可以使用svn或者系统本地目录都行. 引入依赖 <dependencies> <dependency> ...

  9. Spring Cloud配置中心客户端读取配置

    微服务连接配置中心来实现外部配置的读取. 引入依赖 <dependencies> <dependency> <groupId>org.springframework ...

随机推荐

  1. vue 打包体积过大 实现懒加载 ????

    import Vue from ‘vue’ import Router from 'vue-router' //把路由对应的组件定义成异步组纪检 const hello = resolve => ...

  2. 写react项目要注意的事项

    1,className一定是大写字母开头,例如:App-logo,App,App-header. 2,有关react元素的更新,唯一办法是创建新元素,然后重新将其传入ReactDOM.render() ...

  3. libra共识算法分析

    ​​ 核心算法说明 基于chained实现,整体上是当前轮推动下一轮共识继续下去, 如此来持续运转下去, 数据有效性证明基于(QC)实现 leader广播proposal消息{round, qc, p ...

  4. MongoDB复制集概念架构浅析

    一.复制集的作用 (1) 高可用 防止设备(服务器.网络)故障. 提供自动failover 功能. 技术来保证数 (2) 灾难恢复 当发生故障时,可以从其他节点恢复. (3) 功能隔离 用于分析.报表 ...

  5. Simulink仿真入门到精通(七) Simulink的回调函数

    7.1 什么是回调函数 Callback functions(回调函数)是因某种操作而除法对其调用的函数,如按下按钮或双击操作等. 常用的Simulink回调函数可应用在以下场合: 打开Simulin ...

  6. 深入理解yield from语法

    本文目录 为什么要使用协程 yield from的用法详解 为什么要使用yield from . 为什么要使用协程# 在上一篇中,我们从生成器的基本认识与使用,成功过渡到了协程. 但一定有许多人,只知 ...

  7. javaScript 基础知识汇总(八)

    1.Map Set WeakMap 和WeakSet Map 是一个键值对的集合,主要的方法包括: new Map() 创建Map map.set(key,value)  根据键(key)存储值(va ...

  8. 【Weiss】【第03章】练习3.17:懒惰删除

    [练习3.17] 不同于我们已经给出的删除方法,另一种是使用懒惰删除的方法. 为了删除一个元素,我们只标记上该元素被删除的信息(使用一个附加的位域). 表中被删除和非被删除的元素个数作为数据结构的一部 ...

  9. Spring框架——AOP

    Spring AOP 面向切面编程,OOP面向对象编程,将程序中所有参与模块都抽象成对象,然后通过对象之间的相互调用完成需求. AOP是OOP的一种补充,是在另外一个维度上抽象出对象,具体是指程序运行 ...

  10. 各种WAF绕过手法学习

    原文:https://mp.weixin.qq.com/s/aeRi1lRnKcs_N2JLcZZ0Gg 0X00    Fuzz/爆破 fuzz字典 1.Seclists/Fuzzing https ...