随笔分类 -  java

java远程debug如何配置tomcat
摘要:在tomcat的bin/startup.sh中添加: 27780debug的端口 declare -x CATALINA_OPTS="-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server
17
0
0
springboot中解析JSON参数
摘要:解析psot请求中的JSON参数 代码: Map<String, String> attrMap = new HashMap<String, String>(); BufferedReader streamReader = null; try { streamReader = new Buffere
388
0
0
转换工具类
摘要:工具类 package com.cog.utils; import java.lang.reflect.Field; import java.util.HashMap; import java.util.List; import java.util.Map; /** * 转换工具类 * @autho
30
0
0
RuntimeUtils
摘要:import java.io.BufferedReader;import java.io.IOException;import java.io.InputStream;import java.io.InputStreamReader;import java.util.LinkedList;impor
91
0
0
Git相关指令
摘要:查看当前分支记录用于查看分支基于哪个分支创建,必须在本地创建的分支才可以看到 git reflog --date=local --all | grep <branchname>
18
0
0
类字节码文件扫描工具,可以扫描jar包
摘要:/** * @description :类字节码文件扫描工具,可以扫描jar包 */ public class Utils { //从包路径下扫描 public static Set<Class> getClasses(String packagePath) { Set<Class> res = n
129
0
0
类字节码文件扫描工具,不可扫描jar包
摘要:/** * @description :类字节码文件扫描工具,不可扫描jar包 */ public class ClassScanner { /** * 获得包下面的所有的class * * @param * @return List包含所有class的实例 */ public static Lis
50
0
0
RocketMQ实例
摘要:样例 目录 1 基本样例 1.1 加入依赖: 1.2 消息发送 1、Producer端发送同步消息 2、发送异步消息 3、单向发送消息 1.3 消费消息 2 顺序消息样例 2.1 顺序消息生产 2.2 顺序消费消息 3 延时消息样例 3.1 启动消费者等待传入订阅消息 3.2 发送延时消息 3.3
784
0
1
java mailutil(java代码发送邮件)
摘要:import javax.mail.*; import javax.mail.internet.*; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Properties; public class
257
0
0
spring boot配置分页助手
摘要:1.pom <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>1.2.3</version> </depende
112
0
0
跨域问题解决方案
摘要:1 import org.springframework.core.annotation.Order; 2 import org.springframework.stereotype.Component; 3 import org.springframework.web.filter.OncePer
77
0
0
比较有意思的算法思路
摘要:1.较大分组的位置(相同字符串的下标集合长度>=3) public static List<List<Integer>> largeGroupPositions(String s){ List<List<Integer>> res = new ArrayList<>(); //相同字符串左边边界 i
72
0
0
java int
摘要:1.整数反转 /** * 整数反转 * @param x * @return */ public static int reverse(int x) { long res = 0; while (x != 0) { res = res * 10 + x % 10; x /= 10; } return
120
0
0
java String
摘要:1.indexOf() /** * Returns the index within this string of the first occurrence of the * specified substring. * * <p>The returned index is the smallest
70
0
0
java日期相关
摘要:1.获取当前月第一天 /** * 获取当前月的第一天 * * @return */ public static Date getFirstDayOfMonth() { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.
98
0
0
SpringBoot实现简单socket服务端
摘要:1.启动类 @SpringBootApplication public class serverApplication { public static void main(String[] args) { SpringApplication.run(serverApplication.class,
2044
0
0
fastdfs javaclient
摘要:1.pom 1 <dependency> 2 <groupId>net.oschina.zcx7878</groupId> 3 <artifactId>fastdfs-client-java</artifactId> 4 <version>1.27.0.0</version> 5 </depende
182
0
0
JAVA Poi工具类
摘要:Apache POI 简介是用Java编写的免费开源的跨平台的 Java API,Apache POI提供API给Java程式对Microsoft Office(Excel、WORD、PowerPoint、Visio等)格式档案读和写的功能。POI为“Poor Obfuscation Impleme
689
0
0
java常用IO
摘要:1.java递归删除某一文件夹下的文件 1 /** 2 * 递归删除文件 3 * @param file 4 */ 5 public static void delAll(File file) { 6 //获取包含file对象对应的子目录或者文件 7 File[] b = file.listFile
74
0
0
点击右上角即可分享
微信分享提示
深色
回顶
收起