在springboot项目中增加邮件功能 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-mail</artifactId> </dependency> 在配置文件中配置为 spring.mail.host=smtp.mxhichina.com spring.mail.username=from@mail.com spring.mail.port=465 spring.mail.password=ENC(XmxK15odd+SF5VUGSFNUTse10lxijBIYz) spring.mail.properties.mail.smtp.auth=true spring.mail.properties.mail.smtp.starttls.enable=true spring.mail.properties.mail.smtp.starttls.required=true spring.... 有更新! Got bad greeting from SMTP host: smtp.yandex.ru, port: 465, response: [EOF]] java
Jon’s recent Find the Time to First Byte Using Curl post reminded me about the additional timing details that cURL can provide. cURL supports formatted output for the details of the request ( see the cURL manpage for details, under “-w, –write-out ” ). For our purposes we’ll focus just on the timing details that are provided. Step one: create a new file, curl-format.txt, and paste in: time_namelookup: %{time_namelookup} time_connect: %{time_connect} time_appconnect: %{time_appconnect} time_pretr.... 有更新! Timing Details With cURL curl
前言 上周,我方的一个客户反馈,访问我们的接口,平均耗时在2s以上。但是我方对请求进入,和请求返回,整个过程都有监控,我方的耗时基本在50ms以内,非常快。 后来了解到,客户从广东访问到我方上海,公网来访问我方。那么就建议去检测,DNS耗时,TCP建立的耗时等。理论上,长距离的公网,网络延迟就非常高。遂建议使用CURL去检查。结果果然如猜想,在TCP建立的耗时就很久。 进入正题,这篇文章主要介绍使用CURL检测Client端发起的HTTP请求,各个阶段的时间。 第一、HTTP请求的过程介绍 一个HTTP请求,涉及多个阶段 DNS解析域名 请求从Clinet路由至Server,Clinet与Server建立TCP连接 如果使用了HTTPS,还涉及SSL连接的建立 server开始准备数据 开始逻辑计算、调后端接口、查数据库缓存等 server开始传递数据 数据准备完成,开始给client传数据 数据传输完毕 整个过程可能还涉及多次重定向 第二、关于CURL的介绍 CURL是利用URL语法在命令行方式下工作的开源数据传输工具。 支持:DICT, FILE, FTP, FTPS,.... 有更新! 使用CURL检测Clinet侧发起的HTTP请求各阶段时间 curl
--创建测试表 create table test( id int; ); --add支持多列,change/drop需要在每列前添加关键字,逗号隔开,'column'可有可无 --添加多列 alter table test add (c1 char(1),c2 char(1)); --正确,add支持多列 alter table test add column (c1 char(1),c2 char(1)); --正确 alter table test add c1 char(1),add c2 char(1); --正确 --修改多列 alter table test change c1 c3 char(1),change c2 c4 char(1); --正确 alter table test change column c1 c3 char(1),change column c2 c4 char(1); --正确 --name关键字作为字段名,重命名需要加反引号(`) alter table table_name change `name` field_name varchar.... mysql修改表结构(alter table),多列/多字段 mysql
swagger 2.X是springboot用于生成在线文档的工具,基于OpenApi2 springdoc-openapi-ui 则是基于OpenApi3,可以看成是swagger3,因为导入之后一些注解的包名都是 io.swagger.v3.oas.annotations baidu出来的都被swagger 2占领了,基本搜不到文档,想要查阅请自行谷歌 文档上说springdoc-openapi-ui能够在webflux的项目中使用,尚未尝试,留几个文档地址请自行查阅 https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Annotations https://github.com/springdoc-openapi https://springdoc.github.io/springdoc-openapi-demos/ 依赖 implementation 'org.springdoc:springdoc-openapi-ui:1.2.3' 使用 springdoc-openapi-ui作为spri.... springboot集成springdoc-openapi-ui java