1.spring cloud config是什么

  官网:https://cloud.spring.io/spring-cloud-static/spring-cloud-config/2.2.1.RELEASE/reference/html/

  Spring Cloud Config项目是一个解决分布式系统的配置管理方案。它包含了Client和Server两个部分,server提供配置文件的存储、以接口的形式将配置文件的内容提供出去,client通过接口获取数据、并依据此数据初始化自己的应用

  

2.使用

  实际使用过程中,我们把配置文件放在git上面,创建一个config的server端,实时同步git上的配置文件。再把配置文件的内容以接口的形式提供除去。client去获取server的配置数据。

2.1在git上创建一个项目

  里面放入配置文件,我这里有三个配置文件。注意文件的命名格式。

 

2.2创建一个模块作为server

2.2.1 依赖

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
</dependency>

完整依赖

<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>com.atguigu.springcloud</groupId>
<artifactId>cloud-api-commons</artifactId>
<version>${project.version}</version>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency> <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency> </dependencies>

2.2.2配置文件

server:
port: 3344 eureka:
client:
service-url:
defaultZone: http://eureka7001.com:7001/eureka,http://eureka7002.com:7002/eureka #集群版 spring:
application:
name: config-server
cloud:
config:
server:
git:
uri: https://gitee.com/xxx/sprincloud-config.git #git仓库路径
search-paths:
- springcloud-config #搜索路径
username: xx
password: xxx
label: master
cloud.config.server.git:
  uri:配置文件项目的git的地址
  searc-paths:搜索路径,如下图
  

    username:git用户名

     password:git密码

  label:分支,如下图

    

 2.2.3主启动类

  注解 @EnableConfigServer

package com.atguigu.springcloud;

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

2.2.4测试

  访问三个配置文件,都访问到了

  

 

2.3创建一个client端-也就是需要使用server端配置内容的服务

2.3.1pom文件

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

完整依赖

<dependencies>

        <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency> <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency> <dependency>
<groupId>com.atguigu.springcloud</groupId>
<artifactId>cloud-api-commons</artifactId>
<version>${project.version}</version>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency> <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency> </dependencies>

2.3.2配置文件

  注意文件名称为:bootstrap.yml
  
server:
port: 3355 eureka:
client:
service-url:
defaultZone: http://eureka7001.com:7001/eureka,http://eureka7002.com:7002/eureka #集群版 spring:
application:
name: config-client
cloud:
config:
label: master #分支名称
name: config #配置文件名称
profile: dev #读取配置文件的后缀名称
uri: http://localhost:3344 #这几个组合就是 http://localhost:3344/master/config-dev.yml
cloud.config:
  label 分支名称
  name 配置文件名称
  profile 配置文件后缀名称
  uri:server地址
这几个配置合起来就是: http://localhost:3344/master/config-dev.yml

2.3.3 主启动类
  
package com.atguigu.springcloud;

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

2.3.4 业务类

package com.atguigu.springcloud.controller;

import com.atguigu.springcloud.entities.CommonResult;
import com.atguigu.springcloud.entities.Payment;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.*; import javax.annotation.Resource;
import java.util.List;
import java.util.concurrent.TimeUnit; @RestController
@Slf4j
public class PaymentController { @Value("${config.info}")
private String configInfo; //这里config.info是读取配置中心的配置 @GetMapping("/configInfo")
public String getConfigInfo(){
return configInfo;
}
}

  

 2.3.5测试

  表示配置读取成功

2.4若git上配置文件发生变化

2.4.1在git上修改config-dev的内容

 2.4.2访问server

  自动完成同步

 2.4.3访问client

  没有自动同步,只有重启client才完成同步

2.5自动同步配置

2.5.1在client加入依赖,加入actuator监控

  前面已经添加了

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

2.5.2配置文件

加入以下配置,暴露监控端点

management:
endpoints:
web:
exposure:
include: "*"

完整

server:
port: 3355 eureka:
client:
service-url:
defaultZone: http://eureka7001.com:7001/eureka,http://eureka7002.com:7002/eureka #集群版 spring:
application:
name: config-client
cloud:
config:
label: master #分支名称
name: config #配置文件名称
profile: dev #读取配置文件的后缀名称
uri: http://localhost:3344 #这几个组合就是 http://localhost:3344/master/config-dev.yml #暴露监控端点
management:
endpoints:
web:
exposure:
include: "*"

2.5.3在业务类加入注解@RefreshScope - 刷新配置

package com.atguigu.springcloud.controller;

import com.atguigu.springcloud.entities.CommonResult;
import com.atguigu.springcloud.entities.Payment;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.*; import javax.annotation.Resource;
import java.util.List;
import java.util.concurrent.TimeUnit; @RestController
@Slf4j
@RefreshScope //刷新配置
public class PaymentController { @Value("${config.info}")
private String configInfo; @GetMapping("/configInfo")
public String getConfigInfo(){
return configInfo;
}
}

2.5.4在修改配置文件后,需向client发送一个POST请求

  http://localhost:3355/actuator/refresh

2.5.5测试

修改配置文件

  

发送post请求

访问server,配置内容已更新

访问client,配置内容已更新

2.6还存在的缺陷

  每次修改配置都需要向client发送post请求,如果存在多个client,就比较麻烦。这里就用到spring cloud bus。config和bus是相互配合的好搭档,一般都是一起使用。

 3.使用spring cloud bus

3.1基本说明

  Spring Cloud Bus 对自己的定位是 Spring Cloud 体系内的消息总线,使用 message broker 来连接分布式系统的所有节点。

  bus有两种通知方式

  方式1:

    bus通知一个client,再有client把消息通知给其他client

  方式2:

  bus通知config的server端,再由server端通知client

方式二的架构显然更加合适,方式一不适合的原因如下:

  打破了微服务的职责单一性,因为微服务本身是业务模块,它本不应该承担配置刷新职责

  破坏了微服务各节点的对等性

  有一定的局限性。例如,微服务在迁移时,它的网络地址常常会发生变化,此时如果想要做到自动刷新,那就会增加更多的修改

所以我们采取方式二

3.1环境准备

  spring cloud bus不需具备Rabbitmq或者kafka

   RabbitMq安装:https://www.cnblogs.com/jthr/p/13786746.html

3.2修改cloud-config-center-3344

3.2.1 添加依赖

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bus-amqp</artifactId>
</dependency>

完整

<dependencies>

        <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
</dependency> <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bus-amqp</artifactId>
</dependency> <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency> <dependency>
<groupId>com.atguigu.springcloud</groupId>
<artifactId>cloud-api-commons</artifactId>
<version>${project.version}</version>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency> <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency> </dependencies>

3.2.2配置文件添加

  rabbitmq:
host: localhost #rabbitmq地址
port: 5672 #端口
username: guest #账号
password: guest #密码 management: #暴露bus刷新的端点
endpoints:
web:
exposure:
include: bus-refresh

完整

server:
port: 3344 eureka:
client:
service-url:
defaultZone: http://eureka7001.com:7001/eureka,http://eureka7002.com:7002/eureka #集群版 spring:
application:
name: config-server
cloud:
config:
server:
git:
uri: https://gitee.com/xxx/sprincloud-config.git #git仓库路径
search-paths:
- springcloud-config #搜索路径
username: xxx
password: xxx
label: master rabbitmq:
host: localhost #rabbitmq地址
port: 5672 #端口
username: guest #账号
password: guest #密码 management: #暴露bus刷新的端点
endpoints:
web:
exposure:
include: bus-refresh

3.3修改cloud-config-client-3355

3.3.1添加依赖

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bus-amqp</artifactId>
</dependency>

完整

<dependencies>

        <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency> <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bus-amqp</artifactId>
</dependency> <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bus-amqp</artifactId>
</dependency> <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency> <dependency>
<groupId>com.atguigu.springcloud</groupId>
<artifactId>cloud-api-commons</artifactId>
<version>${project.version}</version>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency> <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency> </dependencies>

3.3.2配置文件添加

  rabbitmq:
host: localhost
port: 5672
username: guest
password: guest

完整

server:
port: 3355 eureka:
client:
service-url:
defaultZone: http://eureka7001.com:7001/eureka,http://eureka7002.com:7002/eureka #集群版 spring:
application:
name: config-client
cloud:
config:
label: master #分支名称
name: config #配置文件名称
profile: dev #读取配置文件的后缀名称
uri: http://localhost:3344 #这几个组合就是 http://localhost:3344/master/config-dev.yml rabbitmq:
host: localhost
port: 5672
username: guest
password: guest #暴露监控端点 management:
endpoints:
web:
exposure:
include: "*"

3.4新建cloud-config-client-3366

  前面有了cloud-config-client-3355,这里新建一个3366,这样子就有两个client,演示效果更好。

   3366和3355内容除了端口号,其它一模一样

3.4.1新建

3.4.2pom文件依赖

<dependencies>

        <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency> <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bus-amqp</artifactId>
</dependency> <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency> <dependency>
<groupId>com.atguigu.springcloud</groupId>
<artifactId>cloud-api-commons</artifactId>
<version>${project.version}</version>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency> <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency> </dependencies>

3.4.3配置文件

名字:bootstrap.yml

server:
port: 3366 eureka:
client:
service-url:
defaultZone: http://eureka7001.com:7001/eureka,http://eureka7002.com:7002/eureka #集群版 spring:
application:
name: config-client
cloud:
config:
label: master #分支名称
name: config #配置文件名称
profile: dev #读取配置文件的后缀名称
uri: http://localhost:3344 #这几个组合就是 http://localhost:3344/master/config-dev.yml rabbitmq:
host: localhost
port: 5672
username: guest
password: guest #暴露监控端点
management:
endpoints:
web:
exposure:
include: "*"

3.4.4主启动类

package com.atguigu.springcloud;

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

3.4.5业务类

package com.atguigu.springcloud.controller;

import lombok.extern.slf4j.Slf4j;
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; @RestController
@Slf4j
@RefreshScope //刷新配置
public class PaymentController { @Value("${config.info}")
private String configInfo; @GetMapping("/configInfo")
public String getConfigInfo(){
return configInfo;
}
}

3.5测试

  启动项目

3.5.1访问

   访问server3344

  

  访问3355

  

  访问3366

3.5.3修改git上的配置文件

3.5.4发送POST请求

http://localhost:3344/actuator/bus-refresh

3.5.5再次访问

  配置内容已经自动更新

 3.5.6说明

  上面的测试说明,在修改git上配置文件后,只需要发送一次POST请求到server,所有的client会更新配置文件内容。这样子就不用去对每个client端发送POST请求了。

3.6差异化通知

  如果我们只需要部分client更新而不是全部client更新,该怎么做,只需要对发送的POST请求进行修改

3.5.1修改git上配置文件

3.5.2发送POST请求

http://localhost:3344/actuator/bus-refresh/config-client:3355

config-client:微服务名称   3355:端口号

3.5.3再次访问

server3344和client3355都更新了,client3366没有更新


 

springcloud11 spring cloud config的更多相关文章

  1. spring cloud config 入门

    简介 Spring cloud config 分为两部分 server client config-server 配置服务端,服务管理配置信息 config-client 客户端,客户端调用serve ...

  2. Spring Cloud Config

    Spring Cloud Config provides server and client-side support for externalized configuration in a dist ...

  3. Spring Cloud官方文档中文版-Spring Cloud Config(上)

    官方文档地址为:http://cloud.spring.io/spring-cloud-static/Dalston.SR2/#spring-cloud-feign 文中例子我做了一些测试在:http ...

  4. Spring Cloud官方文档中文版-Spring Cloud Config(下)-客户端等

    官方文档地址为:http://cloud.spring.io/spring-cloud-static/Dalston.SR2/#_serving_alternative_formats 文中例子我做了 ...

  5. SpringCloud的配置管理:Spring Cloud Config

    演示如何使用ConfigServer提供统一的参数配置服务 ###################################################################一.概 ...

  6. 搭建spring cloud config

    很久没更新了,因为不是专职研究spring cloud,因此更新速度得看工作强度大不大,每天能抽出的时间不多,如果更新太慢了,并且有小伙伴看的话,请见谅了. Spring Cloud简介 Spring ...

  7. Spring Cloud Config - RSA简介以及使用RSA加密配置文件

    简介 RSA非对称加密有着非常强大的安全性,HTTPS的SSL加密就是使用这种方法进行HTTPS请求加密传输的.因为RSA算法会涉及Private Key和Public Key分别用来加密和解密,所以 ...

  8. Spring Cloud Config 分布式配置中心使用教程

    一.简介 在分布式系统中,由于服务数量巨多,为了方便服务配置文件统一管理,实时更新,所以需要分布式配置中心组件.在Spring Cloud中,有分布式配置中心组件spring cloud config ...

  9. 【spring实战第五版遇到的坑】第14章spring.cloud.config.uri和token配置项无效

    本文使用的Spring Boot版本为:2.1.4.RELEASE Spring Cloud版本为:Greenwich.SR1 按照书上的做法,在application.yml中配置配置服务器的地址和 ...

  10. .NET Core微服务之基于Steeltoe使用Spring Cloud Config统一管理配置

    Tip: 此篇已加入.NET Core微服务基础系列文章索引 =>  Steeltoe目录快速导航: 1. 基于Steeltoe使用Spring Cloud Eureka 2. 基于Steelt ...

随机推荐

  1. Linux 使用打印机

    前言 在 deepin 上打印机好使,在我的mint上不好使,简单的查看一下deepin上驱动及软件.安装上就行了. 软件及驱动 ii hpijs-ppds 3.18.12+dfsg0-2 all H ...

  2. MySQL进阶实战4,MySQL索引详解,下篇

    一.索引 索引是存储引擎用于快速查找记录的一种数据结构.我觉得数据库中最重要的知识点,就是索引. 存储引擎以不同的方式使用B-Tree索引,性能也各有不同,各有优劣.例如MyISAM使用前缀压缩技术使 ...

  3. JavaEE Day02MySQL

    今日内容 数据库的基本概念 MySQL数据库软件 安装 卸载 配置 SQL语句 一.数据库的基本概念 1.数据库DataBase,简称DB 2.什么是数据库?         用于存储和管理数据的仓库 ...

  4. VMware ESXi 8.0 SLIC & Unlocker 集成网卡驱动和 NVMe 驱动 (集成驱动版)

    发布 ESXi 8.0 集成驱动版,在个人电脑上运行企业级工作负载 请访问原文链接:VMware ESXi 8.0 SLIC & Unlocker 集成网卡驱动和 NVMe 驱动 (集成驱动版 ...

  5. 创建第一个WebService项目

    前提: 保证联网的情况下创建webservice实例,需下载依赖jar 一.创建WebService服务端 1.创建服务端的工程 2.创建javaee的WebServices服务 3.命名server ...

  6. MySQL字符编码、存储引擎、严格模式、字段类型之浮点 字符串 枚举与集合 日期类型

    目录 字符编码与配置文件 数据路储存引擎 创建表的完整语法 字段类型之整型 严格模式 字段类型之浮点型 字段类型之字符串类型 数字的含义 字段类型之枚举与集合 字段类型之日期类型 字符编码与配置文件 ...

  7. Nmap常用方法

    1.扫描单个目标地址  在Nmap后面直接添加目标地址即可扫描  nmap 目标地址  2.扫描多个目标地址  如果目标不在同一网段,或在同一网段但不连续且数量不多,可以使用该方法进行扫描  nmap ...

  8. 使用浏览器inspect调试app

    使用浏览器inspect调试app 在开发混合项目的过程中,常常需要在app环境排查问题,接口可以使用fiddler等工具来抓包,但是js错误就不好抓包了,这里介绍一种调试工具-浏览器. 1.调试过程 ...

  9. CMS可视化---ECharts图表

    一.ECharts介绍 ECharts,全称Enterprise Charts,商业级数据图表,一个纯Javascript的图表库,能够流畅的运行在PC以及移动设备上,兼容当前绝大部分浏览器.为我们许 ...

  10. JUC源码学习笔记7——FutureTask源码解析,人生亦如是,run起来才有结果

    系列文章目录和关于我 一丶我们在哪里会使用到FutureTask 基本上工作中和Future接口 打交道比较多,比如线程池ThreadPoolExecutor#sumbit方法,返回值就是一个Futu ...