1. feign
@FeignClient 注解属性:
Url 指定uri
name:服务名
configuration:指定fegin相关配置的配置类
2. SPEL配置基本类型成员属性的默认值
@Value("${config:myConfig}") -》:xxx指定默认值
private String config
3. Cron表达式
1 2 3 4 5 6
1: 秒
2: 分
3: 时
4: 日
5: 月
6: 星期
7: 年
4. EnableDubboConfiguration
dubbo和springboot整合的自动配置
5. canal
6. RabbitMQ
-
exchange
-
queue
-
Routing key
步骤:
-
创建队列
-
创建交换机
-
队列绑定路由key,创建Binding对象
-
发送消息
4.1 send(exchange, routing key, msg)
4.2 交换机根据路由key将消息发送到 绑定这个key的队列
7. 注解
-
@ComponentScan
如果什么属性都不配置的话,会扫面当前类所在包下的所有类
8. idea git
git config --global user.name
git config --global user.email
9. dubbo
-
group:当服务提供者同一个接口有多个实现的时候,对于消费者服务引用和提供者服务暴露,可以用这个属性来区分
-
循环依赖的问题
dubbo:
A依赖B,B依赖A。由于启动时检查的原因,这个时候会出现 dubbo服务启动不起来
默认情况下,dubbo开启启动时检查。比如说:A依赖于B的服务接口1,先启动服务B, 才可以接着启动服务A。这个时候服务B挂掉了,正在运行的服务A并不会因为服务B挂掉而挂掉。当服务B重新启动后,服务B假如改动了代码以来服务A提供的服务接口1。那么如果服务A此时也挂掉了,那就出现由于相互依赖,服务A和服务B都启动不起来。此时只能通过设置,启动时不检查 让服务成功启动
-
@service, @method
@service(methods = {@method})
-
架构演变
单一应用->垂直应用->分布式应用->流式计算架构
dubbo设计考虑:连通性,健壮性,伸缩型,升级
-
dubbo.registry.check
注册中心不存在时,是否报错,默认为true
-
dubbo.consumer.mock, dubbo.service.mock
mock只在远程调用的服务出现非业务(超时,网络异常)异常时起作用
10.mysql
- 更新表添加字段
ALTER TABLE
`productareas`
ADD
COLUMN `dc_will_shelf_life` bigint(20) NOT NULL DEFAULT 0 COMMENT 'dc临保期限'
AFTER `quantity_order_limit`,
ADD
COLUMN `dc_will_shelf_life_value` int(11) NOT NULL DEFAULT 0 COMMENT 'dc临保期限(值)'
AFTER `dc_will_shelf_life`,
ADD
COLUMN `dc_will_shelf_life_unit` int(11) NOT NULL DEFAULT 20 COMMENT 'dc临保期限(单位, 默认为20表示日)'
AFTER `dc_will_shelf_life_value`;
UPDATE
`productareas`
SET
dc_will_shelf_life = 0,
dc_will_shelf_life_value = 0,
dc_will_shelf_life_unit = 20;
11.charles抓包,反向代理工具
- 4.2.5破解版下载地址:
https://www.jianshu.com/p/ae834b455217
出现的问题
"Charles cannot configure your proxy settings while it is on a read-only volume. Perhaps you are running Charles from the disk image? If so, please copy Charles to the Applications folder and run it again. Otherwise please ensure that Charles is running on a volume that is read-write and try again."
解决上面问题:
sudo chown -R root "/Applications/Charles.app/Contents/Resources" sudo chmod -R u+s "/Applications/Charles.app/Contents/Resources"
+表示增加权限
chown改变文件的拥有者
chmod 修改文件的访问权限
- 官方charles
下载地址:https://www.charlesproxy.com/latest-release/download.do
注册码:
Registered Name: https://zhile.io
License Key: 48891cf209c6d32bf4
13.Math工具类
-
math.pow(a1, a2)
结果为a1的a2次方
14.maven
-
坐标
gav
-
scope
表明依赖打包的作用范围,控制是否将依赖打包到当前环境
网友评论