@Test
public void testLoggerLoaction() {
String loggerBinderClassName = "org.slf4j.impl.StaticLoggerBinder";
Class<?> loggerBinderClass = null;
try {
loggerBinderClass = Class.forName(loggerBinderClassName);
} catch (ClassNotFoundException e) {
System.out.println(loggerBinderClassName + " is not found");
}
URL loaction = loggerBinderClass.getProtectionDomain().getCodeSource().getLocation();
System.out.println(loaction);
}
判断使用的日志框架
乱蜂朝王2023-12-30 17:15
相关推荐
karry_k10 小时前
MyBatis批量insert-select踩坑:useGeneratedKeys=true 可能让PostgreSQL返回大量插入结果karry_k10 小时前
PostgreSQL 在 MyBatis 中执行正常 SQL 失效:一次 DELETE USING 踩坑记录SamDeepThinking14 小时前
从源码到代码:MyBatis-Flex 与 MyBatis-Plus 的逐项对比她的男孩17 小时前
Spring Boot 接 Flowable 工作流:用 3 个注解搭一个请假审批流程荣码19 小时前
LLM结构化输出:让AI返回JSON而不是废话,我踩了4个坑plainGeekDev20 小时前
Gson → kotlinx.serialization小bo波1 天前
Java Swing 图形用户界面实验 —— 从算术练习到游戏开发的完整实践咖啡八杯1 天前
GoF设计模式——备忘录模式