spring注解排除某些bean
劳动是唯一导向知识的道路。——萧伯纳 使用: 12@ComponentScan(excludeFilters = {@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, value = {WillExludeBean.class, AnotherWillExludeBean.class})}) 即可 这里还有其他的过滤类型 例如注解 123@ComponentScan(excludeFilters = @Filter( type = FilterType.ANNOTATION, value = Service.class)) 切面 123@ComponentScan(includeFilters = @Filter( type = FilterType.ASPECTJ, pattern = "com.example..*Service+")) 正则 123@ComponentScan(includeFilters ...
alipay密钥工具生成证书
家庭关系的和睦依赖于各方履行自己的义务。——雪莱 分享一下支付宝支付生成密钥 首先是下载密钥工具 小程序文档 - 支付宝文档中心 然后是生成 接下来上传即可
docker运行seata
怀疑一切与信任一切是同样的错误,能得乎其中方为正道。——乔叟 https://hub.docker.com/r/seataio/seata-server 命令: 1docker run --name seata-server -p 8091:8091 -p 7091:7091 seataio/seata-server:latest 自定义配置文件: 123456docker run --name seata-server \ -p 8091:8091 \ -p 7091:7091 \ -e SEATA_CONFIG_NAME=file:/root/seata-config/registry \ -v /PATH/TO/CONFIG_FILE:/root/seata-config \ seataio/seata-server 指定ip 12345docker run --name seata-server \ -p 8091:8091 \ -p 7091:7091 \ ...
android毛玻璃效果
恭维不会使女人飘然,却往往使男人丧志。——王尔德 安卓实现一个毛玻璃效果可以使用Blurry https://github.com/wasabeef/Blurry 代码: 1234567// 覆盖,父级必须是 ViewGroupBlurry.with(context).radius(25).sampling(2).onto(rootView)// 添加// from ViewBlurry.with(context).capture(view).into(imageView)// from Bitmap Blurry.with(context).from(bitmap).into(imageView) Blur Options 模糊选项 Radius 半径 Down Sampling 下采样 Color Filter 彩色滤光片 Asynchronous Support 异步支持 Animation (Overlay Only)动画(仅限叠加) 1234567Blurry.with(context) .radius(10) .sampling(8) .color...
spring-state-machine持久化restore踩坑
没有人事先了解自己到底有多大的力量,直到他试过以后才知道。——歌德 今天遇到的问题是在响应式编程中发生禁止block异常: 1org.springframework.statemachine.persist.AbstractStateMachinePersister#restore 源码如下: 12345678@Overridepublic final StateMachine<S, E> restore(StateMachine<S, E> stateMachine, T contextObj) throws Exception { final StateMachineContext<S, E> context = stateMachinePersist.read(contextObj); stateMachine.stopReactively().block(); stateMachine.getStateMachineAccessor().doWithAllRegions(function -> function.r...
nacos坏了临时排除掉依赖
冬天动一动,少闹一场病;冬天懒一懒,多喝药一碗。——佚名 可以配置文件配置 123spring: autoconfigure: exclude: org.springframework.cloud.alibaba.nacos.* 也可以手动注解声明 12345678910NacosConfigAutoConfiguration: Nacos配置管理的自动配置。NacosDiscoveryAutoConfiguration: Nacos服务发现的自动配置。NacosServiceAutoConfiguration: Nacos服务相关的自动配置。NacosConfigEndpointAutoConfiguration: Nacos配置端点的自动配置。NacosDiscoveryEndpointAutoConfiguration: Nacos服务发现端点的自动配置。NacosServiceRegistryAutoConfiguration: Nacos服务注册的自动配置。NacosDiscoveryClientConfiguration: Nacos发现客户端的配置。N...
boolean自然排序顺序
聪明人警告我说,生命只是荷叶上的一颗露珠。——泰戈尔 代码如下: 12345678910111213import java.util.ArrayList;import java.util.Comparator;import java.util.List;class Scratch { public static void main(String[] args) { List<Boolean> list = new ArrayList<>(); list.add(true); list.add(false); list.sort(Comparator.naturalOrder()); System.out.println(list); }} 输出如下: 1[false, true] 因此java中自然排序,false是小于true的 这里可以用一般orm的boolean转换为int来方便记忆 false为0 true为1 因此...
Hutool-通过Lambda结缘开源到6.0探索之路
花开如火,也如寂寞。——顾城 分享自己参加ITPUB的开源小秀场
mediapipe
不要讥笑老年人,因为你也会有老年。——米南德 分享一个机器学习的项目mediapipe 可以实现人体姿态识别和其他的一些功能 这是相关的文档和案例代码 https://github.com/googlesamples/mediapipe
state-machine持久化踩坑
植物借栽培而生育,人类借教育而成人。——罗素 今天使用spring-state-machine踩坑了,这里配了持久化,然后在事件里更改了额外数据 12gameInfo = stateMachine.getExtendedState().get(WordChainConst.GAME_INFO, GameInfo.class);gameInfo.setXxx(xxx); 结果在interceptor或者guard等其他地方使用的时候,却获取不到正确的值 原来在修改值后,还需要持久化保存一下。。。 1public class RedisSmPersister extends AbstractStateMachinePersister<StateEnum, EventEnum, String> 1redisSmPersister.persist(sm, sm.getId());
