• 2024-03-06【转】[Java]引入Redisson可能会出现项目启动失败问题解决
    转自:https://blog.csdn.net/bengbuguang4321/article/details/121951650在启动项目时,Redisson自己会启动一个Redisson连接池,尝试连接redis,这时候如果遇到网络不通就会出现问题,因为redis连接不上,导致项目启动不了解决方法是:1、重新空实现了一个RedissonClient/***@ClassNa
  • 2023-11-17使用Java写一个简易web服务器
    使用Java写一个简易web服务器来替代nginx功能。main:publicstaticvoidmain(String[]args){ServerConfigLoaderserverConfigLoader=Factory.serverConfigLoader();ServerConfigserverConfig=serverConfigLoader.getServerConfig();Htt
  • 2023-06-30go使用consul-api注册服务、注销服务
    go使用consul-api注册服务、注销服务标签(空格分隔):go,consul安装包gogetgithub.com/hashicorp/consul/api注册、注销服务packageinitializeimport( "fmt" "github.com/hashicorp/consul/api" uuid"github.com/satori/go.uuid" "go.uber.org/zap&qu
  • 2023-02-19viper-读取配置文件
    测试一:typeServerConfigstruct{ServiceNamestring`mapstructure:"name"`Ageint`mapstructure:"age"`}funcmain(){v:=viper.New()//文
  • 2023-02-12024_常用计量单位应用
    application.yml:  ServerConfig.java:   
  • 2022-11-09gin-consul配置到全局
    一.配置全局变量global/golbal.go中添加: UserSrvClientproto.UserClientpackageglobalimport( ut"github.com/go-playground/universal-translator" "mxshop-a
  • 2022-10-28gin-配置文件管理
    1.使用库viper使用示例packagemainimport( "fmt" "github.com/spf13/viper")typeServerConfigstruct{ ServiceNamestring`mapstructure:"name"` Port
  • 2022-10-26QT MySQL连接自动断开
    参考链接MySQL链接10天后自动断开解决方案:<https://blog.csdn.net/xiaoxiao133/article/details/123006881方式一QT中可以通过自动重连的方式进行配置,如下所示:QSqlData