
JAVA
koney·C
选择决定命运!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Java之冒泡排序和快速排序
冒泡排序public class bubbleSort { public static void main(String[] args) { int n = 5; int[] a = new int[n]; for(int i=0;i<a.length;i++) { a[i]=new Random().nextInt(100); } System.out.println(Arrays.toString(a)); bubbleSort(a); ArrayLi原创 2020-07-05 14:21:39 · 212 阅读 · 0 评论 -
Log4j2多线程日志配置
@Plugin(name = "thread", category = StrLookup.CATEGORY)public class ThreadLookup implements StrLookup{ @Override public String lookup(String key) { return Thread.currentThread().getName(); } @Override public String lookup(LogE原创 2020-05-22 14:26:42 · 1456 阅读 · 0 评论 -
log4j2.xml 配置及说明
<?xml version="1.0" encoding="UTF-8"?><configuration status="debug" monitorInterval="30"> <appenders> <!--这个输出控制台的配置--> <Console name="STDOUT" > <!--控制台只输出level及以上级别的信息(onMatch),其他的直接拒绝原创 2020-05-21 11:32:57 · 343 阅读 · 0 评论 -
log4j2.yml配置及说明
# 共有8个级别,按照从低到高为:ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < OFF。Configuration: status: warn monitorInterval: 30 Properties: # 定义全局变量 Property: # 缺省配置(用于开发环境)。其他环境需要在VM参数中指定,如下: #测试:-Dlog.level.console=warn -Dlog.le原创 2020-05-21 11:31:25 · 1769 阅读 · 0 评论 -
logback-spring.xml配置及说明
<?xml version="1.0" encoding="UTF-8"?> <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator"> <resetJUL>true</resetJUL></contextListener><!--ConsoleAppender 用于在屏幕上输出日志--><原创 2020-05-20 16:31:02 · 429 阅读 · 0 评论 -
删除字符串两边的 [ ] --- StringUtils
有关 StringUtils 的详细 API 请参见官方网站:[http://commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache/commons/lang/StringUtils.html]Package org.apache.commons.langStringUtils.strip(str, “[]”);...原创 2019-11-06 10:39:54 · 992 阅读 · 0 评论