- 博客(18)
- 资源 (3)
- 收藏
- 关注
原创 gitbook 3.2.3及之后流程图解决方案
gitbook 3.2.3及之后流程图解决方案 原因: 编写公司api接口文档使用gitbook时,想要绘画流程图,结果渲染不出来 解决方案: 引入插件 “plugins”: [ “mermaid-gb3” ] 流程图绘画 AB 在第2点实际的语法是这样子的 这样就????️了 ...
2020-07-14 10:51:38
1245
原创 Spring的pageable对象接收分页参数时的字段与swagger上的不一致
Spring的pageable对象接收分页参数时的字段与swagger上的不一致 在写分页接口时用到了pageable对象 使用@PageableDefault注解可以达到收到默认分页参数的效果 具体使用:sort = "created", direction = Sort.Direction.DESC 然后在项目中使用的swagger来构建接口文档,在swagger上显示的pageable参数字段是 但是实际接收参数的字段是: /** * Page index parameter name.
2020-05-29 14:39:06
2003
原创 Spring中@Validated的使用
Spring中@Validated的使用 近期在写接口中,要对同一个bean进行自定义校验 这就要用到@Validated这个注解了,使用: 在类中定义自定义接口,主要是用于分组来校验不同字段 public interface VerifyOne { } public interface VerifyTwo { } 之后将接口引入到定义校验的字段名上 @NotNull(groups = VerifyOne.class) @ApiModelProperty(value =
2020-05-27 11:51:34
1266
原创 There is no PasswordEncoder mapped for the id "null"
在spring-security登陆时报错:There is no PasswordEncoder mapped for the id “null” 版本问题 用spring-security5.0以上报错 使用内存获取认证信息 auth .inMemoryAuthentication() .withUser("user").pa...
2019-06-11 11:10:49
707
原创 Springboot 集成 Activiti时启动报错!'org.activiti.spring.boot.SecurityAutoConfiguration
Springboot 集成 Activiti时启动报错! org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.activiti.spring.boot.SecurityAutoConfiguration': Initialization of bean failed;...
2019-05-17 10:34:56
6372
原创 linux上搭建kafka
首先要拥有java环境 可以测试一下是否拥有 java -version 好啦! 开始 下载kafka wget http://mirrors.cnnic.cn/apache/kafka/0.10.0.1/kafka_2.10-0.10.0.1.tgz 解压 tar -zxvf kafka_2.10-0.10.0.1.tgz 解压后其实就可以了 感谢并借鉴简书博客:https://...
2019-05-08 22:00:28
850
原创 logback中使用MDC自定义日志输出格式
logback-MDC 相当于自定义日志格式输出 写在过滤器中 示例: try { Context context = createContext(request, response); processSysNo(request, response, context); processSeqNo(request, response, context); ...
2019-04-29 15:55:23
3119
原创 logback日志写入kafka
配置kafka kafka: bootstrap-servers: 127.0.0.1:9092 producer: retries: 0 batch-size: 16384 buffer-memory: 33554432 key-serializer: org.apache.kafka.common.serialization.St...
2019-04-25 21:58:07
1686
原创 springboot集成Kafka
kafka集成到springboot项目中 依赖 <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web&l...
2019-04-25 21:56:21
203
原创 kafka入门学习使用
安装(mac版) 1. 安装命令: brew install kafka 出现: zookeeper-server-start /usr/local/etc/kafka/zookeeper.properties & kafka-server-start /usr/local/etc/kafka/server.properties 表示:安装成功 2. 首先要启动zookeeper(博主...
2019-04-23 14:25:26
235
原创 MongoDB入门学习记录
数据库 Collection Document 概念解析 术语 mongoDb 解释说明 database database 数据库 table collection 表/集合 row document 数据/文档 column field 字段/域 index index 索引 table joins 表连接,MongoDB不支持 primary ...
2019-04-22 14:59:30
227
原创 gateway替代zuul 遇到的bug:Parameter 0 of method hystrixGatewayFilterFactory in org.springframework.
gateway替代zuul 遇到的bug:Parameter 0 of method hystrixGatewayFilterFactory in org.springframework. 首先我的依赖是这样的 报错信息是: Parameter 0 of method hystrixGatewayFilterFactory in org.springframework。。。好一长串 解决方案:...
2019-04-22 14:52:58
2507
1
原创 Java 1.8 stream,filter,map 练习
stream,filter,map 练习 public class FunctionTest { private List<Person> people = null; @Before public void before() { Person wu = new Person("小鱼", 18, "男"); Person y...
2018-09-01 15:51:32
1062
原创 Springboot自定义注解校验
Springboot自定义注解校验 自定义注解类 package com.kiet.springboot_project.setting; import com.kiet.springboot_project.configuration.FlagValidatorClass; import javax.validation.Constraint; import javax.vali...
2018-08-18 09:49:52
3274
原创 报错:could not extract ResultSet
调接口时报错: could not extract ResultSet 原因:数据库字段与实体bean属性对不上
2018-08-16 16:01:37
69216
原创 使用fastjson修改json字符串数据
使用fastjson修改json字符串数据 String jsonString = orderAppService.getItemJson(orderId); JSONArray jsonArray = JSONObject.parseArray(jsonString); for (Integer i = 0; i < jsonArray.size();...
2018-08-13 09:44:28
5486
原创 实现Spring+SpringMVC+MyBatis的整合
maven依赖配置<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/m
2017-11-06 17:36:27
326
原创 Mybatis-逆向工程实现
generatorConfig.xml(配置文件)<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis
2017-11-06 16:49:06
467
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人