随笔 - 42  文章 - 0 评论 - 1 阅读 - 18177
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

11 2021 档案
参数传递
摘要:public class DemoTest5 { public static void main(String[] args) { int i = 1; String str = "hello"; Integer num = 2; //缓存范围是-128到127 超过缓存范围则存入堆中,没超过就存入 阅读全文
posted @ 2021-11-12 20:19 我叫福禄娃 阅读(47) 评论(0) 推荐(0) 编辑
代码执行顺序
摘要:public class Demotest3 { private int anInt = test(); private static int j = method(); static { System.out.println("1"); } Demotest3(){ System.out.prin 阅读全文
posted @ 2021-11-12 19:54 我叫福禄娃 阅读(119) 评论(1) 推荐(0) 编辑
单例设计模式
摘要:/** * 标准的饿汉式单例设计模式 */public enum DemoTest { DEMO_TEST("a","b"); private String name; private String age; public String getName() { return name; } publ 阅读全文
posted @ 2021-11-12 19:17 我叫福禄娃 阅读(17) 评论(0) 推荐(0) 编辑
gateway跨域配置
摘要:import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframework.web.cors.Cor 阅读全文
posted @ 2021-11-10 15:47 我叫福禄娃 阅读(285) 评论(0) 推荐(0) 编辑
idea打开springboot的run dashboard
摘要:在idea的项目目录中,有一个.idea目录:其中,有一个workspace.xml:打开,搜索Rundashboard然后在Component中添加下面的内容:<option name="configurationTypes"> <set> <option value="SpringBootApp 阅读全文
posted @ 2021-11-07 19:10 我叫福禄娃 阅读(102) 评论(0) 推荐(0) 编辑
logback-spring.xml 完整配置
摘要:<?xml version="1.0" encoding="UTF-8"?><!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,比如: 如果设置为WARN,则低于WARN的信息都不会输出 --><!-- scan:当此属性设置为tru 阅读全文
posted @ 2021-11-07 17:24 我叫福禄娃 阅读(4042) 评论(0) 推荐(2) 编辑
MD5 密码加密
摘要:import java.security.MessageDigest;import java.security.NoSuchAlgorithmException;public final class MD5 { public static String encrypt(String strSrc) 阅读全文
posted @ 2021-11-06 20:03 我叫福禄娃 阅读(52) 评论(0) 推荐(0) 编辑
4位或6位随机数生成(用于短信验证码)
摘要:import java.text.DecimalFormat;import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Random;/** * 生成四位和六位的随机数字 */ 阅读全文
posted @ 2021-11-06 20:02 我叫福禄娃 阅读(692) 评论(0) 推荐(0) 编辑
jwt token生成与验证
摘要:import com.rwj.srb.common.ResponseEnum;import com.rwj.srb.exception.BusinessException;import io.jsonwebtoken.*;import org.springframework.util.StringU 阅读全文
posted @ 2021-11-06 20:00 我叫福禄娃 阅读(588) 评论(0) 推荐(0) 编辑
RedisTemplate序列化
摘要:import com.fasterxml.jackson.databind.ObjectMapper;import com.fasterxml.jackson.databind.SerializationFeature;import com.fasterxml.jackson.databind.js 阅读全文
posted @ 2021-11-06 19:42 我叫福禄娃 阅读(812) 评论(0) 推荐(0) 编辑
处理LocalDataTime 格式化
摘要:import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;import org.springframework.beans.factory.annotation.Value;import org.springfr 阅读全文
posted @ 2021-11-06 19:41 我叫福禄娃 阅读(361) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示