StringTek StringTek
4年前
Golang异常处理
Golang中对于异常的处理通常是返回Error的形式。假设我需要封装httpResponse返回,代码可能会是如下情况golangtypeHeaderstructKey,ValuestringtypeStatusstructCodeintMessagestringfuncResponse(wio.Writer,statusSta
红烧土豆泥 红烧土豆泥
4年前
Java的数值数据类型以及命名规范
一、Java中的数值数据类型<table<tbody<tr<tdwidth"75"valign"top"style"wordbreak:breakall;"<spanstyle"backgroundcolor:rgb(255,254,213);"类型名<br</span</td<tdwidth"299
Stella981 Stella981
4年前
Jenkins Pipeline集成Sonar进行代码质量检测
JenkinsPipeline集成Sonar进行代码质量检测简介jenkinspipelineJenkinsPipeline(或简称为"Pipeline")是一套jenkins插件,将持续交付的实现和实施集成到Jenkins中。Jenk
Stella981 Stella981
4年前
Spring Cloud Gateway 全局通用异常处理
为什么需要全局异常处理在传统SpringBoot应用中,我们@ControllerAdvice来处理全局的异常,进行统一包装返回//摘至springcloudalibabaconsole模块处理@ControllerAdvicepublicclassConsol
Wesley13 Wesley13
4年前
php查询mysql并缓存到redis
首先安装redis,并在php环境中开启php\_redis扩展。下面不多说了,直接上代码<?php$redisnewredis();$redisconnect('127.0.0.1',6379);$blog$redisget('redisrow');//如果$blog数组为空
Wesley13 Wesley13
4年前
PHP开发APP接口1——APP接口简介
第1章APP接口简介1、APP接口介绍lPHP面向对象中的接口:就是用interface定义的抽象类如:<?php    interface video {        public function getVideos();        publ
Wesley13 Wesley13
4年前
ThinkPHP Mysql表结构修改类
<?php/\ \  mysql表结构处理类 \  创建数据表,增加,编辑,删除表中字段 \ \/classMysqlManage{  /\   \创建数据库,并且主键是aid   \table要查询的表名   \/  functionc
Wesley13 Wesley13
4年前
Java学习笔记(44)——Java枚举
一、枚举在Switch中的应用public enum MyColor{   //每个枚举值用逗号隔开,   RED,   BLUE,   GREEN;//最后的分号可要或不要}public class Test1{    public stat
Stella981 Stella981
4年前
Guava(函数式编程)
函数式编程:使用Function接口(jdk8中已经存在):/  其功能就是将输入类型转换为输出类型 /public interface Function<F, T {  T apply(@Nullable F input);
Stella981 Stella981
4年前
HashedWheelTimer源码学习
基本概念tickDuration:每tick一次的时间间隔ticksPerWheel:轮中的slot数remainingRounds:第几轮(calculatedtick)/wheel.lengthdeadline:得到过期时间。longdeadlineSystem.nanoTime()