• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
牛牛
牛牛在线
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

随笔分类 -  java

 
springboot 自动配置 自动监控demo
摘要:1、注解定义 @Target({java.lang.annotation.ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface Ump { public abstract Stri 阅读全文
posted @ 2023-01-12 18:04 蜗牛无敌 阅读(106) 评论(1) 推荐(0)
log4j2.xml
摘要:<?xml version="1.0" encoding="utf-8"?> <configuration> <properties> <!-- 文件输出格式 --> <property name="PATTERN">%d{yyyy-MM-dd HH:mm:ss.SSS} |-%-5level [% 阅读全文
posted @ 2023-01-11 14:14 蜗牛无敌 阅读(44) 评论(0) 推荐(0)
java aop 打印controller的入参和出参
摘要:package com.sleep.demo.intercepter; import com.alibaba.fastjson.JSONObject; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.ArrayUti 阅读全文
posted @ 2022-12-30 17:13 蜗牛无敌 阅读(1024) 评论(0) 推荐(0)
java 读取json文件到对象
摘要:1、新建json文件 [ { "id": 1, "name": "酒水专区", "imageUrl": "7cf/e61b0aec87f07393.png", "previewImageUrl": "/9f8d4360d3a125b5.png" }, { "id": 2, "name": "日用百货 阅读全文
posted @ 2022-12-30 14:44 蜗牛无敌 阅读(2704) 评论(0) 推荐(0)
springboot HandlerIntercept
摘要:1、新建上下文类工具类 public class ContextHolder { private static final InheritableThreadLocal<RequestContext> REQUEST_CONTEXT_INHERITABLE_THREAD_LOCAL = new In 阅读全文
posted @ 2022-12-30 14:32 蜗牛无敌 阅读(61) 评论(0) 推荐(0)
定时300 + 300 随机缓存类
摘要:@Component public class ProductCacheKeyService { private static String PRODUCT_BASE_INFO = "product_info_%s"; //商品信息BIG KEY private Random random = ne 阅读全文
posted @ 2022-12-28 14:34 蜗牛无敌 阅读(22) 评论(0) 推荐(0)
zookeeper的安装
摘要:zookeeper的安装1、下载wget --no-check-certificate --no-cookies https://downloads.apache.org/zookeeper/zookeeper-3.8.0/apache-zookeeper-3.8.0-bin.tar.gz2、解压t 阅读全文
posted @ 2022-12-27 21:52 蜗牛无敌 阅读(38) 评论(0) 推荐(0)
jdk1.8的安装 linux
摘要:1、下载 wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/ 阅读全文
posted @ 2022-12-27 21:28 蜗牛无敌 阅读(38) 评论(0) 推荐(0)
springboot 配置类
摘要:@Data @ConfigurationProperties(prefix = "recruitment.config") @Component public class RecruitmentConfigProperty { /** * 完成招募跳转url */ private String co 阅读全文
posted @ 2022-09-23 17:26 蜗牛无敌 阅读(31) 评论(0) 推荐(0)
redis distributed lock redis分布式锁试下
摘要:@Resourceprivate DistributedRedisLockTemplate lockTemplate;String distributedKey="lockKey" ; DistributedLockCallback<String> callback = new Distribute 阅读全文
posted @ 2022-09-20 15:50 蜗牛无敌 阅读(96) 评论(0) 推荐(0)
restTemplate 使用1
摘要:public String getCode(String jsCode) { try { String url= "http://www.baidu.com" ResponseEntity responseEntity = restTemplate.getForEntity(url, WeChatS 阅读全文
posted @ 2022-09-20 15:37 蜗牛无敌 阅读(47) 评论(0) 推荐(0)
restTemplate post使用
摘要:private String generateScheme(GetWechatSchemeReq req, String accessToken) { String path = req.getPath(); String query = req.getQuery(); String url = " 阅读全文
posted @ 2022-09-20 15:33 蜗牛无敌 阅读(75) 评论(0) 推荐(0)
 

公告


博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3