feign 调用原理、实例 1. 实例代码https://github.com/LM917178900/feign-serverhttps://github.com/LM917178900/feign-consumer2. 原理2.1 user 调用消费者的接口;2.2 消费者调用 服务者 client 依赖中的 feign 接口;2.3 消费者中配置了 feign 接口的服务器地址和端口号;2.4 服务者服务处理接口消费者发出的请求,处理并返回结果;...
java使用日志 1. 开启添加成员private static final Logger LOGGER = LoggerFactory.getLogger(XxxController.class);2.使用LOGGER.info("before param is {}",param);...LOGGER.info("after param is {}",param);注释:不用添加依赖,spingboot 自带。import org.slf4j.Logger;import org.slf4j.L
git 提交代码三种方式 1. 新增仓库echo "# feign-server" >> README.mdgit initgit add README.mdgit commit -m "first commit"git branch -M maingit remote add origin https://github.com/LM917178900/feign-server.gitgit push -u origin main2. 已有仓库git remote add origin https:
intelliJ IDEA commit 时 sonarlint 不检查 1. commit 时 sonarlint 不检查不勾上下图中的配置即可2. sonarlint 不自动检查不勾上下图中的配置即可
maven 版本号的定义 举一个例子: 3.1.4-beta-2maven 版本定义如下<主版本>.<次版本>.<增量版本>-<里程碑版本>1. 主版本表示项目的重大架构变更2. 次版本表示较大范围的功能增加和变化,及bug 修复3. 增量版本表示重大的bug修复4. 里程碑版本表示不是很稳定的版本,还需要进行测试;...
springboot数据库和连接池配置 ############################### DRUID数据源配置 start ################################spring: datasource: driver-class-name: org.postgresql.Driver druid: filter: slf4j: enabled: true stat: log-slow-sql: true
Matcher 方法 matcher 方法总结下面这个测试能很好的体现 private static Pattern humpPattern = Pattern.compile("[A-Z]"); public static void main(String[] args) { String str="thisIsOneDog"; // 1. 使用匹配样式去匹配字符串,生成匹配对象 Matcher matcher = humpPattern.matcher(str
adfs 登录逻辑 1. 登录按钮前端直接调用adfs api;2. adfs 回调adfs api 获取系统配置,然后调用系统中配置的 callBack api;3. 获取tokencallBack api 返回用户token 给前端;4. 获取资源前端调用 系统 userInfo api,获取资源和用户的权限;...
add project to github 1. create a new repository on the command linegit initgit add README.mdgit commit -m "first commit"git branch -M maingit remote add origin https://github.com/LM917178900/2022.gitgit push -u origin main2. push an existing repository from the command
pdf 配置预览 pdf 配置预览比较简单,直接上代码 @Resource private IProductService productService; @Value("${npi.default-url}") private String domain; @RequestMapping(value = "/preview", method = RequestMethod.GET) @LogApi(value = "preview") @ApiOperatio
linux 测试 ip、端口号可用性 1. curl参考https://blog.csdn.net/leinminna/article/details/122855090?spm=1001.2014.3001.55012. telnettelnet 218.14.227.197 88893. 其他服务器内部// 查询运行的端口号netstat -tnlp|grep 8889// 直接查询运行的 jarps -ef| grep nbi-pss-server.jar...
poi设置单元格展示格式 不是很复杂,直接上代码1. controller @Resource private ExcelTest2 excelTest2; @GetMapping("excel/test") public String excelTest(HttpServletResponse response) { excelTest2.export(response); System.out.println("hello world!"); r
POI指定单元格不可编辑 1. 思路1.1 所定全表 为 lock。1.2 解锁表格所在的列 为 unlock。1.3 设置需要锁定的数据为 lock。这样整的原因是: poi 只支持全表锁定,和在全表锁定的情况下设置 cell 的锁定状态。2. 代码只列出主要方法 private Workbook workbook; private Sheet sheet; private String fileName; private List<List<String>>
fitnesse 实例 1. fitnesse 是一款轻量级测试软件2. 测试流程参考:http://www.javashuo.com/article/p-zottqeln-gp.html3. 踩坑日记3.1 编写测试类注意1: setter 方法必须要有;package com.only.huahua.model;public class Division { public double numerator; public double denominator; public v
mysql分组排序取第一条数据 需求:mysql 根据一个字段分组,各种排序,然后,取第一条数据1. 分组字段加排序字段先排序2. 再按分组字段分组,取第一条即可with t_picture as( SELECT npi_product_id,is_default_one,update_time, uri FROM datahub_product_attachment where type=1 ORDER BY npi_product_id,is_default_one DESC,update_time DESC)SEL
poi 设置单元格背景色 设置单元格正确的方法1 必须设置填充样式cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);2 设置背景色两种方法注意,设置背景色用 foreground,不能使用 background。第一种,配置colorXSSFColor bgColor = new XSSFColor(new java.awt.Color(236, 255, 243), new DefaultIndexedColorMap()); ((X
Linux curl 1. 测试连接可用性测试 服务器是否能连接外网# 测试能够访问百度# ping baidu.com 可以,但是 curl https://www.baidu.com/ 不一定可以curl https://www.baidu.com/# 测试 url 是否能够联通curl https://login.chinacloudapi.cn/a6c1b34e-d17f-48de-83b8-8e248b0f0360/oauth2/token2. 接口调用主要 包含 header 传参和 body 传
postgreSQL索引全集 1.创建索引create index idx_product_name on ludp_order_detail(product_name);2. 删除索引DROP INDEX index_name;
postgresql 数组函数全集 1. 分组聚合聚合为一个数组对象select product_name_in_sci_pdp,count(1),ARRAY_AGG(npi_product_name) from dim_product_mapping GROUP BY product_name_in_sci_pdp2 数组拆分数组拆分成字符串select product_name_in_sci_pdp,count(1),array_to_string(ARRAY_AGG(npi_product_name),',') from d