自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

程序员光剑

杭州某头部大厂资深程序员,AI大模型应用架构师。 主业写程序,佛系写博客,有灵感写诗。藏书数万册。 畅销书作者,代表作《ClickHouse入门实战与进阶》《Kotlin 极简教程》《Spring Boot开发实战》《Kotlin从入门到进阶实战》等。

  • 博客(29)
  • 资源 (6)
  • 收藏
  • 关注

原创 Spring Boot 自定义Spring MVC 配置: WebMvcConfigurationSupport

Spring Boot 自定义Spring MVC 配置: WebMvcConfigurationSupportpackage com.easy.springboot.demo_spring_mvc.mvc_configimport com.alibaba.fastjson.serializer.SerializerFeatureimport co...

2018-01-28 02:47:00 8783 1

原创 Spring Boot 2.0 内嵌 Tomcat 定制 : WebServerFactoryCustomizer

Spring Boot 2.0 内嵌 Tomcat 定制 : WebServerFactoryCustomizer在 Spring Boot 1.x 中 ,我们通过 EmbeddedServletContainerCustomizer 接口调优 Tomcat 自定义配置。 在Spring Boot 2.0 中,通过 WebServerFactoryC...

2018-01-27 22:29:00 11406

原创 服务端有异常, 导致: Ajax 请求报错 net::ERR_INCOMPLETE_CHUNKED_ENCODING

服务端有异常, 导致: Ajax 请求报错 net::ERR_INCOMPLETE_CHUNKED_ENCODING但是,这个 Ajax Http 接口使用浏览器可以直接返回。表明,Ajax 的 Get 跟浏览器的 Http Get 在实现上有差异。浏览器做了更好的容错处理。解决方法:去掉override fun postHandle 函数上的 @...

2018-01-27 05:06:00 9076

原创 java.lang.IllegalStateException: getOutputStream() has already been called for this response

https://stackoverflow.com/questions/33982515/handlerinterceptor-getoutputstream-has-already-been-called-for-this-responsehttp://blog.csdn.net/xxj_jing/article/details/71177306sp...

2018-01-27 01:03:00 9375

原创 JS 打印对象所有属性 console.dir(obj)

JS 打印对象所有属性 console.dir(obj)

2018-01-26 16:47:00 9186

原创 JS基础——异步回调

前言一个刚入前端的小菜,虽然以前看到过关于回调的文章,但是呢,理解起来有点费劲啊。当时的脑海里就一个概念。回调:大多出现在Ajax请求,用于处理收到的请求结果。嘿嘿,当时真的就是这一个想法啊。现在真的入这行,而且这个概念也非常重要,用的地方太多太多,是时候把它捡起来好好理解一番。当然,本文适合菜鸟,因为我是以一个菜鸟的思维去理解的。回调概念...

2018-01-26 16:06:00 8518

原创 JavaScript 的 async/await : async 和 await 在干什么

回调函数 ===> Promise 对象 ===> Generator 函数JavaScript 的 async/awaitasync 和 await 在干什么async 是“异步”的简写,而 await 可以认为是 async wait 的简写。async 用于申明一个 function 是异步的,而 await 用于等待一个异步方...

2018-01-26 14:44:00 8461

原创 ES6 箭头函数: () => {} 与匿名函数 function() {}

function foo() { setTimeout( () => { console.log("id:", this.id); },100);}foo.call( { id: 42 } );id: 42function foo() { setTimeout( function() { cons...

2018-01-26 14:09:00 9555

原创 NodeJS 发送 POST 请求 curl -d & JS 类的静态属性使用

NodeJS 发送 POST 请求 curl -d & JS 类的静态属性使用'use strict';const Service = require('../lib/ServiceBase')const tables = require('../lib/tables')var http = require('http')var que...

2018-01-26 14:01:00 9214

原创 【error】jQuery ajax请求错误返回status 0和错误error的问题 : ajax error:{"readyState":0,"status":0,"statusText":"er...

【error】jQuery ajax请求错误返回status 0和错误error的问题 : ajax error:{"readyState":0,"status":0,"statusText":"error"}异常描述:第一次ajax,后台都没问题,但是却进入error方法,错误码0,错误信息error。以后再ajax就没问题。解决方法:将butt...

2018-01-25 22:18:00 12839 1

原创 axios : Promise based HTTP client for the browser and node.js

axiosPromise based HTTP client for the browser and node.jsFeaturesMake XMLHttpRequests from the browserMake http requests from node.jsSupports the Promise APIIntercept requ...

2018-01-25 22:15:00 8878

原创 js 获取 url 查询参数

例如:http://30.7.212.45:3000/#/?id=100获取 id 的值的 js 代码如下: var id; var href = window.location.href console.log(`href = ${href}`) var reg = new RegExp...

2018-01-19 15:33:00 8336

原创 基于NodeJS的全栈式开发(基于NodeJS的前后端分离)【转】

最开始组内讨论的过程中我发现,每个人对前后端分离的理解不一样,为了保证能在同一个频道讨论,先就什么是”前后端分离”达成一致。大家一致认同的前后端分离的例子就是SPA(Single-page application),所有用到的展现数据都是后端通过异步接口(AJAX/JSONP)的方式提供的,前端只管展现。WEB服务中,SPA类占的比例很少。很多场景下还有同步/同步+异步混合的模式,SPA不能作为一种通用的解决方案。

2018-01-19 14:37:00 8795 1

原创 技术架构图集锦(选自《Spring Boot 实战开发》)

使用Spring MVC 的系统架构.pngGRADLE DAG 图.pngGRADLE 构建生命周期.pngSpring Data 生态.pngHibernate Session工作原理流程.pngHibernate 框架详细架构图.pngHibernate ...

2018-01-18 20:14:00 9065

原创 JPA @Column 字段命名 默认驼峰转换

JPA @Column 字段命名 默认驼峰转换spring data jpa 使用的默认策略是 ImprovedNamingStrategy所以修改配置下 hibernate 的命名策略就可以了在application.properties文件中加入:#PhysicalNamingStrategyStandardImplspring.jpa.h...

2018-01-13 22:46:00 13231

原创 MySQL 计算两个日期之间相差的秒数 SQL

update h5perf_task set run_state = 0 where id in(SELECT t.id from (SELECT * FROM h5perf_task WHERE run_state = 2and UNIX_TIMESTAMP( now() )-UNIX_TIMESTAMP(begin_run_time) > ...

2018-01-10 21:21:00 10392

原创 颜色六位码和八位码表示

image八位码表示:1 白色 #FFFFFFFF  2 红色    #FFFF0000  3 绿色    #FF00FF00  4 蓝色    #FF0000FF  5 牡丹红    #FFFF00FF  6 青色    #FF00FFFF  7 黄色     #FFFFFF00  8 黑色      #FF000000 ...

2018-01-09 17:47:00 13178

原创 $ spring init --list

Supported dependenciesIdDescriptionRequired versionactivemqJava Message Service API via Apache ActiveMQ>=1.4.0.RC1activiti-basicActiviti BPMN workflow engine&...

2018-01-08 14:26:00 8520

原创 《Spring Boot 实战开发》 附录 II : Spring Boot 2.0 新特性

《Spring Boot 实战开发》 附录 II : Spring Boot 2.0 新特性本节我们介绍 Spring Boot 2.0 版本的众多新特性,内容包括了 M1~M7里程碑版本的核心新功能特性。不过,我们首先把对 Kotlin 的特性的支持放在最前面讲,因为这是一个让人兴奋、迫不及待想要第一时间了解的特性。Kotlin 特性支持由于Ko...

2018-01-07 00:23:00 8687

原创 《Spring Boot 2.0 极简教程》附录 I : Spring 5.0 新特性

《Spring Boot 2.0 极简教程》附录 I : Spring 5.0 新特性因为Spring Boot 2.0 是基于Spring Framework 5.0而开发的,所以我们这里对 Spring 5.0的新功能特性做一个简单的介绍。.Spring Framework 项目的领导人 Juergen Hoeller 于 2016 年 7 月 ...

2018-01-07 00:18:00 8782

原创 Couchbase 中的分布式储存

Couchbase 中的分布式储存原文:http://blog.jiguang.cn/couchbase_distributed_storage/概述Couchbase 是一个具有高性能、可扩展性和可 用性强的数据库引擎。它可以让开发人员通过 NoSQL 的键值存储(二进制或者JSON)或者使用 N1QL 的形式对数据进行操作(N1QL 是非常类...

2018-01-06 20:00:00 8532

原创 罗马数字体系介绍

Ⅰ、Ⅱ、Ⅲ、Ⅳ、Ⅴ、Ⅵ、Ⅶ、Ⅷ、Ⅸ、Ⅹ、Ⅺ、Ⅻ、十二个主要是用在钟表的刻度表示上。Ⅰ、Ⅱ、Ⅲ、Ⅳ、Ⅴ、Ⅵ、Ⅶ、Ⅷ、Ⅸ、Ⅹ、Ⅺ、ⅫXIII XIV XV XVI XVII XVIII XIX XX罗马数字共有七个,即I(1),V(5),X(10),L(50),C(100),D(500),M(1000)。按照下面的规则可以表示任意正整数。重复数次:一...

2018-01-06 16:44:00 9667

原创 正则表达式 删除 Java 代码中的注释

想如何删掉所有java 或xml 中的注释,还在寻找eclipse 中的快捷键了吗,你out了,现在都用正则表达式了、首先我们了解java 中的注释无非3种: // 单行注释 /* */ 多行注释 /** */ 文档注释我们可以使用 Ctrl+F 中替换方式来解决,把注释都替换为为空,这样就解决了删除注释的...

2018-01-05 00:21:00 10608

原创 Spring Boot : 使用 Zuul 实现 API Gateway 的路由和过滤 ( Routing and Filtering )

Spring Boot : 使用 Zuul 实现 API Gateway 的路由和过滤 ( Routing and Filtering )image.png本节通过使用 Netflix Zuul 实现微服应用中的路由(简单代理转发)和过滤功能。API Gateway 的搭建工作,技术选型是 Netflix ZuulAPI Gatew...

2018-01-03 02:21:00 9183 3

原创 使用 spring-cloud-starter-zuul 报错 :0 can't find referenced pointcut hystrixCommandAnnotationPointcut...

使用 spring-cloud-starter-zuul 报错 :0 can't find referenced pointcut hystrixCommandAnnotationPointcut原因: org/aspectj/weaver/ 的 JDK 版本与项目的 JDK 版本 不一致。image.png统一改成 JDK 8 。 ...

2018-01-03 01:38:00 9016

原创 jquery + Bootstrap : data-toggle="popover"鼠标放上去显示悬浮层 Tips

image.pngjquery鼠标放上去显示悬浮层 Tipshtml<div class="input-group-addon" style="border: 0;"><a id="time_range_fa" href="#" class="fa fa-info-circle col-sm-1"

2018-01-02 18:02:00 10760

原创 Spring Boot actuator

配置 application.propertiesendpoints.default.web.enabled=trueactuator 依赖:compile('org.springframework.boot:spring-boot-starter-actuator')image.png/* * Copyright 2012-2...

2018-01-02 14:14:00 8601

原创 SpringBoot AOP 记录日志实例

SpringBoot AOP 记录日志实例image.pngimage.pngimage.pngimage.png散布于应用中多处的功能(日志、安全、事务管理等)被称为横切关注点。把横切关注点与业务逻辑分离是AOP要解决的问题。在运行时,动态地将代码切入到类的指定方法、指定位置上.这样的编程...

2018-01-01 23:23:00 9239

原创 你的时间有限,不要为别人而活 ! 2018-01-01!

你的时间有限,不要为别人而活 ! 2018-01-01!

2018-01-01 12:28:00 8733

ClickHouse 高性能、可扩展和低成本的OLAP数据库 陈光剑 20230912

ClickHouse 设计哲学 具体问题具体分析 use good algorithms in a good context; 深入细节 dig into details; 度量指标 measure everything; 贴近生产环境 be close to production; 基准测试 do benchmarks, more of them; 不断试验、实践never stop experimenting; 大规模测试 test at scale; 大胆创新 do weird stuff; have fun! It is a database: A database has both a storage engine and a query engine. ClickHouse can efficiently ingest data from various sources and its query engine provides low-latency query responses. It is an OLAP database: An On-Line Analytic

2023-09-14

Will AI Fix Work? 工作节奏超过了我们的跟上能力 人工智能有望创造一种全新的工作方式

The pace of work is outpacing our ability to keep up. AI is poised to create a whole new way of working. 工作节奏超过了我们的跟上能力。人工智能有望创造一种全新的工作方式。 微软工作趋势指数年度报告( Work Trend Index Annual Report ) Key findings: The data points to three urgent insights business leaders must know now as they look to quickly and responsibly adopt AI. 1. Digital debt is costing us innovation: 64% of people have struggled with finding time and energy to get their work done, and those workers are 3.5x more likely to say they

2023-05-17

THE AI INDEX REPORT 人工智能指数报告 Measuring trends in Artificial Inte

THE AI INDEX REPORT 人工智能指数报告 Measuring trends in Artificial Intelligence 衡量人工智能的趋势 TOP TAKEAWAYS 最重要的要点 Industry races ahead of academia. 工业界领先于学术界。 Until 2014, most significant machine learning models were released by academia. Since then, industry has taken over. In 2022, there were 32 significant industry-produced machine learning models compared to just three produced by academia. Building state-of-the-art AI systems increasingly requires large amounts of data, compute, and money, resources

2023-04-06

四大常用限流算法原理详解:计数器固定窗口、计数器滑动窗口、漏桶、令牌桶算法.pdf

四大常用限流算法原理详解:计数器固定窗口、计数器滑动窗口、漏桶、令牌桶算法.pdf

2021-05-28

Kotlin Coroutines by Tutorials (1st Edition)

Kotlin Coroutines by Tutorials (1st Edition)

2021-04-28

Principles of programming languages by Gilles Dowek (auth.) (z-lib.org).pdf

Principles of programming languages by Gilles Dowek (auth.) (z-lib.org).pdf

2021-04-28

A Brief History of Artificial Intelligence

A Brief History of Artificial Intelligence What It Is, Where We Are, and Where We Are Going by Michael Wooldridge (z-lib.org).pdf

2021-04-28

An introduction to functional programming through lambda calculus.PDF.zip

Author: Michaelson, Greg Functional programming is rooted in lambda calculus, which constitutes the world's smallest programming language. This well-respected text offers an accessible introduction to functional programming concepts and techniques for students of mathematics and computer science. The treatment is as nontechnical as possible, and it assumes no prior knowledge of mathematics or functional programming. Cogent examples illuminate the central ideas, and numerous exercises appear throughout the text, offering reinforcement of key concepts. All problems feature complete solutions.

2019-09-22

《Kotlin项目实战开发》第3章+类型系统与可空类型

《Kotlin项目实战开发》 第3章 类型系统与可空类型 跟Java、C和C ++ 一样, Kotlin也是“静态类型编程语言”。 通常,编程语言中的类型系统中定义了  如何将数值和表达式归为不同的类型  如何操作这些类型  这些类型之间如何互相作用 我们在编程语言中使用类型的目的是为了让编译器能够确定类型所关联的对象需要分配多少空间。 在每一个编程语言中,都有一个特定的类型系统。静态类型在编译时期时,就能可靠地发现类型错误。因此通常能增进最终程序的可靠性。 类型系统在各种语言之间有非常大的不同,主要的差异存在于编译时期的语法,以及运行时期的操作实现方式。 本章我们简单介绍一下Kotlin的类型系统。

2017-09-30

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除