
后端开发
Spring、Mysql、Redis、Mybatis等
kabcko
这个作者很懒,什么都没留下…
展开
-
唯一Id生成器
基于 Redis 的全局唯一性ID生成器的一些实现思路干货 | 分布式架构系统生成全局唯一序列号的一个思路 丁宜人 携程技术中心分布式ID生成器 | 架构师之路 58沈剑 架构师之路...转载 2019-06-17 14:12:30 · 752 阅读 · 0 评论 -
S3 - Linux命令行访问
在Ubuntu或者Debian上安装s3cm$ sudo apt-get install s3cmd在Fedora上安装s3cmd$ sudo yum install s3cmd第一次运行s3cmd需要运行下面的命令做配置:$ s3cmd –configure它将会问你一系列问题:AWS S3的访问密钥和安全密钥对AWS S3双向传输的加密密码和加密数据为加密数据设定...原创 2019-03-13 20:05:54 · 3157 阅读 · 0 评论 -
S3命令
s3cmd lss3cmd ls s3://xxx-public/cd workspace/lss3cmd ls s3://xxx-public/s3cmd ls s3://xxx-public/xxx/s3cmd ls s3://xxx-public/xxx/xxx/s3cmd put error.png s3://xxx-public/xxx/xxx/s3cmd put pee...原创 2019-03-13 19:52:16 · 1518 阅读 · 0 评论 -
手动删除nginx日志后,没有access.log error.log文件
[root@logs]# ../sbin/nginx -s reload原创 2020-05-29 23:08:15 · 1702 阅读 · 0 评论 -
nginx使用openresty时failed to load the resty.core module
报错信息:nginx: [alert] failed to load the 'resty.core' module (https://github.com/openresty/lua-resty-core); ensure you are using an OpenResty release from openresty.org/en/download.html (reason: module 'resty.core' not found: no field package.preloa原创 2020-05-29 22:44:46 · 19772 阅读 · 0 评论 -
Nginx access.log中文变成十六进制解决
log_format postdata escape=json '$remote_addr | $remote_user | [$time_local] | ' '"$request" | $status | $body_bytes_sent | ' '"$http_referer" | "$http_user_agent" | $request_...原创 2019-10-23 17:11:25 · 4022 阅读 · 0 评论 -
Spring 出入参时间格式化
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") //入参@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") //出参或全局配置:配置返回时间戳spring jackson: serialization: write-dates-as-ti...原创 2019-07-15 22:04:25 · 2017 阅读 · 0 评论 -
org.springframework.web.HttpMediaTypeNotAcceptableException:Could not find acceptable representation
1,在controller返回的对象中必须包含getter/setter方法;2,在controller的@RequestMapping(value= “/findWxmpType”, method = RequestMethod.POST,produces=“application/json”)3,配置jackson转换器,指定返回数据类型;参考:spring 4 异常HttpMedia...原创 2019-06-26 16:05:07 · 21472 阅读 · 5 评论 -
SpringSide
转:SpringSideSpringSide实战(一)----SpringSide简介转载 2019-07-23 11:00:31 · 200 阅读 · 0 评论 -
@RefreshScope
@RefreshScopehttps://blog.youkuaiyun.com/Anenan/article/details/85134208转载 2019-06-14 19:45:57 · 4274 阅读 · 0 评论 -
mybatis+mysql动态字段添删改小结
转:https://blog.youkuaiyun.com/qqtt789632147/article/details/41206095一、批量操作的数据源Map的json形式{“id”: “E4FCC73D0E0A452D9CB8FFA56E2F030C”,“tablename”: “table11”,“fields”: [{“value”: “题名”,“key”: “c1”},{“...转载 2019-01-29 18:19:19 · 1426 阅读 · 0 评论 -
Mybatis插件
参考:itfsw/mybatis-generator-plugin转载 2019-06-28 17:33:52 · 110 阅读 · 0 评论 -
Mysql - 常用命令
连接正式环境02上的数据库:xxx@ip-172-10-0-01:~$ mysql -udump1 -p -h 172.10.0.02;从01上导出正式环境02上的数据库:xxx@ip-172-10-0-01:~$ mysqldump -u dump1 -p xxx> xxx.dump -h 172.10.0.02从01上导出某个数据库表结构(不含数据):mysqldump -h ...原创 2019-03-14 14:38:17 · 115 阅读 · 0 评论 -
Mysql DELETE 使用别名
delete a from table1 a where a.status=2and EXISTS (select b.id from table2 b where b.fid=a.id)如上,delete使用别名的时候,要在delete和from间加上删除表的别名,这样才是正确的写法。DELETE的语法这是MySQL的要求,在oracle上没有参考:Mysql DELETE 不能使用...转载 2019-07-01 16:56:00 · 418 阅读 · 0 评论 -
SQL语句如何在同一个表内复制一条记录
SQL: insert into A(a,b,c)select top 3 a,b,c from B说明:A,B是表,而且字段对应。原创 2019-02-13 12:00:29 · 11464 阅读 · 0 评论 -
Mysql - 管理
查看当前设置的最大连接数:SHOW VARIABLES LIKE ‘%max_connections%’;查看已用连接数:SHOW GLOBAL STATUS LIKE ‘Max_used_connections’;设置最大连接数:SET GLOBAL max_connections=256;...原创 2019-03-14 17:42:11 · 88 阅读 · 0 评论 -
mysql Specified key was too long; max key length is 767 bytes
SHOW VARIABLES LIKE ‘%innodb_large_prefix%’;SET GLOBAL innodb_large_prefix=ON;SHOW VARIABLES LIKE ‘%innodb_file_format%’;SET GLOBAL innodb_file_format=Barracuda;SHOW TABLE STATUS FROM MyDatabaseNa...原创 2019-01-23 21:29:55 · 178 阅读 · 0 评论 -
StopWatch
StopWatch sw = new StopWatch();//业务一sw.start(“吃饭”);Thread.sleep(1000);sw.stop();//业务二sw.start(“刷碗”);Thread.sleep(2000);sw.stop();//获取并输出结果String result = stopWatch.prettyPrint();System.out...原创 2019-01-17 15:20:20 · 981 阅读 · 0 评论 -
Swagger2
1、@ApiOperation(value = “”, produces = “application/json;charset=utf-8”)@ApiResponses({@ApiResponse(code = 200, message = “OK”, response = ),@ApiResponse(code = 503, message = “”, response =)})@...原创 2019-01-31 16:52:41 · 114 阅读 · 0 评论 -
try-with-resource
java try(){}catch(){}自动资源释放**从 Java 7 build 105 版本开始,Java 7 的编译器和运行环境支持新的 try-with-resources 语句,称为 ARM 块(Automatic Resource Management) ,自动资源管理。使用try(){}catch(){}效果:private static void customBuffer...转载 2019-01-15 11:07:03 · 6491 阅读 · 0 评论 -
Redis日常用法
参考:redis五大类型用法转载 2019-06-18 22:02:37 · 117 阅读 · 0 评论 -
Springboot 2.X与redis整合
<groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId></dependency>Redis数据库索引(默认为0)spring.redis.database=0Redis服务器地...原创 2019-01-17 11:18:21 · 170 阅读 · 0 评论 -
缓存-redis-在window系统上安装redis服务-Invalid argument during startup: Failed to open the .conf
当前redis版本:redis-cli -vredis-cli 3.0.503网上给的命令(在redis所在文件夹下执行):redis-server –service-install redis.windows.conf –loglevel verbose问题1:Invalid argument during startup: Failed to open the .conf fil...转载 2019-01-16 20:34:46 · 2048 阅读 · 0 评论 -
Springboot put 请求
@PutMapping (@RequestParam ArrayList list) ,请求方式:put body formdata原创 2019-01-29 17:17:26 · 764 阅读 · 0 评论 -
Springboot整合Shiro
转:Springboot整合Shiro:简洁的身份认证转载 2019-07-22 16:34:58 · 219 阅读 · 0 评论 -
Springboot - logback
参考:Spring Boot日志升级篇—logback【从零开始学Spring Boot】转载 2019-06-19 11:43:16 · 92 阅读 · 0 评论 -
SpringBoot @RequestBody 注解的List参数传递
格式:application/json两种样式:1、(@RequestBody List ids) ==&amp;gt; [360,361,362]2、(@RequestBody List list) ==&amp;gt;[{“age”: 1,“name”: “tom”},{“age”: 2,“name”: “jack”}]...原创 2019-01-10 11:11:39 · 36315 阅读 · 0 评论