• 2024-09-18【第12章】SpringBoot之SpringBootActuator服务监控(上)
    文章目录前言一、准备1.地址和端口配置2.引入依赖3.ActuatorProperties二、使用1.Beans(beans)2.ConfigurationProperties(configprops)3.Environment(env)4.Health(health)5.HeapDump(heapdump)6.Mappings(mappings)7.Metrics(metrics)8.ThreadD
  • 2024-09-17C#实现扫码枪串口通信
     usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.IO.Ports;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;usingSystem.Windows.Forms;namespaceWind
  • 2024-09-11【SpringBoot】静态方法获取 bean的
    背景:使用springboot,要从spring容器里面取到一个bean,那是很容易的。但从静态方法里面取出一个bean,有什么方法呢?比如:场景1:要写一个工具类,可以提供静态方法去获取一个bean。场景2:要写一个工具类,可以提供静态方法去获取一个bean,并且这个工具类不能给spring管理(因为常规操作,交给
  • 2024-09-10Linux系统启动速度优化工具systemd-analyze
    systemd-analyze简介systemd-analyze是Linux自带的分析系统启动性能的工具。systemd-analyze可使用的命令:systemd-analyze[OPTIONS…][time]systemd-analyze[OPTIONS…]blamesystemd-analyze[OPTIONS…]critical-chain[UNIT…]systemd-analyze[OPTIONS…]plot[>
  • 2024-09-05【Azure Policy】分享Policy实现对Azure Activity Log导出到Log A workspace中
    问题描述使用AzurePolicy服务,对公司内部全部的订阅下的ActivityLog,都需要配置导出到LogAWorkspace中。以下Policy规则可以实现此目的。 Policy内容说明在PolicyRule部分中,选择资源的类型为 "Microsoft.Resources/subscriptions",效果使用 DeployIfNotExists(如果不存在,则
  • 2024-09-05【Azure Policy】分享Policy实现对Azure Activity Log导出到Log A workspace中
    问题描述使用AzurePolicy服务,对公司内部全部的订阅下的ActivityLog,都需要配置导出到LogAWorkspace中。以下Policy规则可以实现此目的。 Policy内容说明在PolicyRule部分中,选择资源的类型为 "Microsoft.Resources/subscriptions",效果使用 DeployIfNotExists(如果不
  • 2024-08-30KubeSphere 添加节点
    首先感谢这份博客https://my.oschina.net/u/4197945/blog/15510668  作者:运维有术星主 参考KubeSphere官网文档:https://www.kubesphere.io/zh/docs/v3.4/devops-user-guide/how-to-use/pipelines/create-a-pipeline-using-graphical-editing-panel/ 此份文档记录配置过
  • 2024-08-30解决Git异常 Access denied your account has 2FA enabled
    摘要:解决Git双因子身份验证问题。问题背景  在使用账号和密码的方式拉取公司GitLab代码时,遇到了以下错误提示问题:remote:HTTPBasic:Accessdenied.Theprovidedpasswordortokenisincorrectoryouraccounthas2FAenabledandyoumustuseapersonalaccesstok
  • 2024-08-20vSphere5.10.2.配置管理Fault Tolerance
    第二部分配置管理faulttolerancefaulttolerance的介绍vmwareftistheevolutionof"continuousavailability"thatworksbyutilizingvmwarevlocksteptechnologytokeepaprimarymachineandasecondarymachineinavirtuallockstep.vmwareftwillstream
  • 2024-07-26单机模式下ElasticSearch8(ES8设置账号密码访问)
     重置密码报错:ERROR:Failedtoresetpasswordforthe[elastic]user 修改配置文件/config/elasticsearch.yml修改或添加discovery.type:single-nodexpack.security.enabled:truexpack.security.http.ssl.enabled:falsexpack.security.enrollment.enabled:
  • 2024-07-11SpringBoot2.6.13版本引入Swagger
    1.引入依赖<!--https://mvnrepository.com/artifact/io.springfox/springfox-swagger2--><dependency><groupId>io.springfox</groupId><artifactId>springfox-swagger2</artifactId><version>3.0.0</version&g
  • 2024-06-17一键搭建博客系统
    前言如今CSDN,博客园等充斥着大量的重复博客,有些甚至连样式都没有经过调整。为了寻求一个干净,简洁无广告的平台,选择了自己搭建一个博客,该系统使用的Halo2一键部署。 Halo一个强大易用的开源建站框架对比了很多博客系统,因为Halo外观更加简洁,并且使用Springboot开发(笔者Ja
  • 2024-06-11QWidget 属性——enabled
  • 2024-06-07Minecraft Deluxehub 超好用大厅插件 中文文档
    最近发现了一个minecraft服务器大厅插件,可以实现菜单管理、大厅物品管理,掉落伤害等等等好用的大厅功能,不过是英文的配置文件,我自己翻译了一下MinecraftDexluxehub中文文档原插件是纯英文的,大家有需要可以拿走,记得对好版本号,我这里是3.5.5看一下我配置了一下的效果:Deluxeh
  • 2024-05-29influxdb优化建议
    #关闭上送开关reporting-disabled=false#bind-address="127.0.0.1:8088"#控制存储有关InfluxDB群集的元数据的Raft共识组的参数[meta]dir="influxdb/var/lib/influxdb/meta"#控制InfluxDB的实际分片数据的生存位置以及它从WAL中刷新的方式[data]dir="influxdb/va
  • 2024-05-10docker-compose spark集群搭建
    需求满足产品数据团队计算相关需求,搭建spark集群,本集群为一主两从(两台设备)部署环境服务器资源docker-compose安装curl-Lhttps://github.com/docker/compose/releases/download/1.24.1/docker-compose-`uname-s`-`uname-m`-o/usr/local/bin/docker-compose
  • 2024-04-29【Azure Logic App】使用 Easy Auth 在标准逻辑应用(Standard Logic App)中触发工作流
    问题描述对于StandardLogicApp,当使用HTTP请求来触发一个Workflow时,默认固定不变的SAS签名认证,因并且随着URL传递,存在泄露风险。是否可以用Header中使用BearerToken来进行验证呢? 问题解答可以的,为StandardLogicApp开启EasyAuth。EasyAuth使通过触发器对工作流调用
  • 2024-04-29C#获取CPU使用率 - 开源研究系列文章
          这次想编写一个CPU使用率的小应用,于是就用此例子来记录了这个代码。下面是源码:usingSystem;usingSystem.Diagnostics;usingSystem.Windows.Forms;namespaceWindowsFormsApp{publicpartialclassForm1:Form{///<summary>
  • 2024-04-18redis 哨兵部署
    redis生产哨兵的测试1、helmrelease的版本helmrepoaddbitnamihttps://charts.bitnami.com/bitnamihelmpullbitnami/redis--version18.2.2sentinel-redis]#lsredisredis-18.2.2.tgzvalues.yaml配置文件注意配置文件的cm部分,先使用默认的configmap配置然后再
  • 2024-04-17kubesphere的config-sample
    apiVersion:kubekey.kubesphere.io/v1alpha1kind:Clustermetadata:name:samplespec:hosts:-{name:master,address:172.34.1.205,internalAddress:172.34.1.205,user:root,password:[email protected]}-{name:worker1,address:172.34.1.138,intern
  • 2024-04-11tracer ftrace笔记(23)—— 上层trace打印流程-TODO
    1.ATRACE_INT打印不出来分析#defineATRACE_INT(name,value)atrace_int(ATRACE_TAG,name,value)///system/core/libcutils/include/cutils/trace.hstaticinlinevoidatrace_int(uint64_ttag,constchar*name,int32_tvalue){ if(CC_UNLIKELY(atrace_is_tag_enabl
  • 2024-04-11Rust 的条件编译机制
    基本原理Rust提供了一个[cfg]的编译选项,允许你基于一个传递给编译器的标记编译代码,有两种形式:#[cfg(foo)]如果foo设置了编译对应代码;#[cfg(bar="baz")]如果bar="baz",则编译对应代码;比如:fnmain(){#[cfg(feature="foo")]println!("fooenable
  • 2024-04-09packetbeat配置
    packetbeat配置文件:####################PacketbeatConfigurationExample##########################Thisfileisanexampleconfigurationfilehighlightingonlythemostcommon#options.Thepacketbeat.reference.ymlfilefromthesamedirectorycontains
  • 2024-04-02【Azure Function & Application Insights】在Azure Function的日志中,发现DrainMode mode enabled Traces。它是什么意思呢?
    问题描述ApplicaitonInsights收集了AzureFunction的日志,定期发现有”DrainModemodeenabledTraces“。DrainMode是什么意思呢? 问题解答排出模式(Drainmode) 属于FunctionApp 缩放机制中的一部分,当后台检测到FunctionApp请求量不再需要当前的instance时会停止对
  • 2024-03-24C# 异步控件 backgroundWorker
    //.net4.8WinformusingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;usingSystem.Windows.Forms;usingSystem.Threading