项目地址https://github.com/yinjihuan/kitty-cloud[1]异常处理不用我讲,大家都清楚。单独的异常处理太繁琐,全局异常处理可以在一个应用中统一进行异常的处理,非常方便。目前全局异常处理用的也越来越广泛,今天跟大家来聊一聊KittyCloud中的全局异常是如何处理的?为什么要使用全局异常处理呢?使用全局异常处理后,我们不需要定义固定类型的返回值,当业务代码报错的时
分类:
Web程序 时间:
2020-07-31 01:10:14
阅读次数:
84
import pytz, time from datetime import datetime # 将datetime转换成纪元时间 # @param dt datetime时间 # @param format 时间格式 # @return 纪元时间 def __unix_time(dt, form ...
分类:
编程语言 时间:
2020-07-30 18:21:19
阅读次数:
102
Optional of 与 ofNullable 的区别 /** * Returns an {@code Optional} with the specified present non-null value. * * @param <T> the class of the value * @par ...
分类:
其他好文 时间:
2020-07-30 14:39:39
阅读次数:
64
php 压缩文件夹 例子来源于php官方文档。 <?php { /** * Add files and sub-directories in a folder to zip file. * @param string $folder * @param ZipArchive $zipFile * @p ...
分类:
Web程序 时间:
2020-07-28 16:55:09
阅读次数:
90
测试代码Github地址:https://github.com/zhouyanger/java_demo/tree/master/netty 五.自定义 RPC 5.1 概述 RPC(Remote Procedure Call),即远程过程调用,它是一种通过网络从远程计算机程序 上请求服务,而不需要 ...
分类:
其他好文 时间:
2020-07-28 13:58:23
阅读次数:
69
//使用var filename = OpenfileDlg();#region 通过路径取文件方法 /// <summary> /// 通过路径取文件方法 /// </summary> /// <param name="Defaultpath"></param> /// <returns></re ...
import requests import json if __name__ == "__main__": url = 'https://movie.douban.com/j/chart/top_list' param = { 'type':'24', 'interval_id':'100:90' ...
分类:
其他好文 时间:
2020-07-28 10:16:51
阅读次数:
79
1 <!-- 插入数据:返回记录的id值 --> 2 <insert id="insertOneTest" parameterType="org.chench.test.mybatis.model.Test" useGeneratedKeys="true" keyProperty="id" keyC ...
分类:
其他好文 时间:
2020-07-28 10:04:04
阅读次数:
82
一.消息的可靠投递 在使用RabbitMq的时候,作为消息发送方希望杜绝任何消息丢失或者投递失败的场景。RabbitMQ为我们提供了两种方式用来控制消息的投递可靠性 rabbitMQ 整个消息投递过程为: producer -> rabbitMQ broker -> exchange -> queu ...
分类:
其他好文 时间:
2020-07-27 17:53:27
阅读次数:
116
import Vue from 'vue' import axios from 'axios' Vue.prototype.$download = function download(url,param) { axios.get(url, { responseType: 'blob', params ...
分类:
其他好文 时间:
2020-07-27 16:07:33
阅读次数:
101